Ad Widget

Collapse

alertscript failing when calling " /usr/bin/snmptrap "

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinathan
    Junior Member
    • Apr 2020
    • 4

    #1

    alertscript failing when calling " /usr/bin/snmptrap "

    So I created a shell script based on one of my old nagios servers. The script pasrse the macro {ALERT.MESSAGE} and then sends everything off to Netcool. The script works when I populate it with bogus info and run it manually. When I cause and alarm for zabbix to fire the script it works all the way to the end of the script where it suppose to run

    (/usr/bin/snmptrap -D TOKEN[ALL] -v 2c -c $2 $1 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "$3" nSvcDesc s "$4" nSvcStateID i $5 nSvcOutput s "$6")

    at this point it fails.

    It works when I run it manually root but not if I run it manually as zabbix users.

    script permissions were 750, but now 777. Still nothing and nothing in the centos message logs.

    Any ideas?
  • vinathan
    Junior Member
    • Apr 2020
    • 4

    #2
    Disregard. I have it working now. The netcool community string, ip and port number were formatted incorrectly

    Comment

    Working...