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 172.19.40.51 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 #else snmp-server enable traps <- This is what should have been entered in the job #end
#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
#end #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 #if($port_no) snmp-server host $ip_address traps $com_string udp-port $port_no $notification-type #else snmp-server host $ip_address traps $com_string $notification-type #end #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!!!! #end
#if($timeout) <-Didn't specify this either snmp-server trap-timeout $timeout <- So this should be skipped #end
#if($length) <-Same with this snmp-server queue-length $length #end
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?