Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Dear Prime Infrastructure, Please stop being awful

I'm trying to figure out how to push out the "Trap Receiver" CLI configuration template to a single lab switch.  I went to:


Configuration Tasks -> Templates -> CLI Templates -> System Templates - CLI -> Trap Receiver

1.) I checked the checkbox next to "Trap Receiver" and click on the "Deploy" icon.

2.) A "Template Deployment- Prepare and schedule : Trap Receiver" dialog box appeared.

3.) I expanded the "All" group and located the one switch on which I wanted PI to push the configuration.

4.) I checked that device.

5.) I went to the "Value Assignment" section.

6.) I entered an IP address in the "IP Address" field

7.) I entered a community string in the "Community String" field.

NOTE: These are the only mandatory fields.

8.) I clicked "Apply" to apply the text I placed into those mandatory fields.

9.) Then I clicked "OK" to submit the job.

At no time did I receive anything but green popup bubbles telling me that it accepted my actions.

The job failed.

Here is what it says about the job:


"Error : Command returned an error : snmp-server host traps version <redacted> udp-port ^ % Invalid input detected at '^' marker. pocwfc-4550-dsw1(config_#"


I'll be the first to admit that I'm not a programming genius but I can read code and pseudo code when I need to.

Here's the code behind the configuration task:

#if($notification-type)                               <- I didn't have anything here because it wasn't required
    snmp-server enable traps $notification-type       <- So this should not happen
    snmp-server enable traps                          <- This is what should have been entered in the job

#if($version)                                         <- I didn't have anything here, either (again, because it wasn't required)
       #if($notification-type)                        <- So this code should not get evaluated
               snmp-server host $ip_address traps version $version $com_string udp-port $port_no $notification-type
            snmp-server host $ip_address traps version $version $com_string $notification-type
               snmp-server host $ip_address traps version $version $com_string udp-port $port_no
             snmp-server host $ip_address traps version $version $com_string

#else                                                      <- Instead, this code should get evaluated
       snmp-server host $ip_address traps $com_string      <- This should have happened

       #if($notification-type)                             <- Didn't have this but thanks for checking again
                                                           <- Nothing in this section should happen           
               snmp-server host $ip_address traps  $com_string udp-port $port_no $notification-type
            snmp-server host $ip_address traps  $com_string $notification-type
       #else                                      <- Instead, this should have happened
          #if($port_no)                           <- But I didn't specify this so this whole section gets skipped
               snmp-server host $ip_address traps $com_string udp-port $port_no  <- Should not happen!!!!



#if($timeout)                                      <-Didn't specify this either
       snmp-server trap-timeout $timeout   <- So this should be skipped

#if($length)                                        <-Same with this
       snmp-server queue-length $length

#if($inform)                                        <-Same with this entire thing.
       snmp-server inform
                 snmp-server inform retries $inform_retries
                 snmp-server inform timeout $inform_timeout
                 snmp-server inform pending $inform_pending

Working with PI is exhausting.  Just because I'm a glutton for punishment, I submitted the job a second time and this time I included 162 as the port and 2c as the version (although I should not have to do that).  It managed to enter the "snmp-server host" command but then failed with a cause of "Error : Command returned an error : snmp-server trap-timeout % Incomplete command. pocwfc-3550-dsw1(config)#".  What am I missing here?  Is there a checkbox under Adminstration -> System Settings that makes this work?  Is it suppose to suck by default?

CreatePlease to create content