I'm trying to get my Ubuntu LTS 16.04 server to send SNMPTraps to my HP OVO server.
The reason for this is that there are legacy devices on the network that cannot send an SNMP warning upon failure, but can still be accessed through a network-connected card. Due to this, my Ubuntu server connects to that card to assess the failed nodes. I've achieved this already using Bash and Expect - so now what I want to do is send an snmptrap
as part of my script. My question is:
Question
Does the snmptrap
command require underlying configuration? Or does it work from the commandline the way we (or maybe just I) take the telnet
command for granted?
I ask because I'm trying to achieve this on a corporate network, and currently my OVO Server doesn't receive the trap. So I want to narrow down if it's one of the several firewalls or if the issue is, as mentioned, an underlying configuration problem.
Context:
My expect script basically returns the status of each card managed by the network connected card back to bash as an array - 0 for OK 1 for didn't respond. So Bash does:
errors=$((expect ~/assets/connect))
for i in ${!errors[@]}:
do
if [[ ${errors[$i]} -eq 1 ]]:
then:
snmptrap #stuff goes here; the relevant source IP is saved elsewhere & available - I want the SNMP trap to send a "node $i" down.
fi
done