Hello Silvio,
I have a shell script called PulseAlarm.sh under /spectrum/custom/bin/ like following:
#!/bin/sh # Send pulse trap to SPECTRUM DEBUG=0 #0=false 1=true HOSTNAME=`hostname` SSSERVER=$HOSTNAME SENDTIME=`perl -e 'print time()'` logfile='/app/spectrum/custom/logs/rbcPulseAlarmLog.out' case $HOSTNAME in ulvxxxxxxxxxxxx) AGENTHOST=<hostname1> ;; ulvxxxxxxxxxxxx) AGENTHOST=<hostname2> ;; esac DATE=`date` echo "$DATE: Sent $AGENTHOST SNMP TRAP to $SSSERVER from $HOSTNAME, CurrentTime = $SENDTIME" >> $logfile; if [ $DEBUG -eq 1 ]; then echo "$DATE: /usr/bin/snmptrap -v 1 -c public $SSSERVER .1.3.6.1.4.1.1.590.2 $AGENTHOST 6 1 '' .1.3.6.1.4.1.1.590.2.1.1 s $SENDTIME .1.3.6.1.4.1.590.2.1.2 s \"pulse\" " | tee -a $logfile fi /usr/bin/snmptrap -v 1 -c public $SSSERVER .1.3.6.1.4.1.1.590.2 $AGENTHOST 6 1 '' .1.3.6.1.4.1.590.2.1.1 s $SENDTIME .1.3.6.1.4.1.590.2.1.2 s "pulse" |
When I run the script under RHEL, I got the error, but working under Solaris:
Under RHEL Linux;
<928 spectrum@ulvxxxxxxxx11.fg.rbc.com /spectrum/custom/bin>
$./PulseAlarm.sh
s: Bad variable type ("1")
<929 spectrum@ulvxxxxxxxx11.fg.rbc.com /spectrum/custom/bin
Under Solaris:
<502 pxbh0app@usvxxxxxxxx1 /app/spectrum/custom/bin>
$./PulseAlarm.sh
Monday, April 22, 2019 02:14:06 PM EDT: /usr/sfw/bin/snmptrap -v 1 -c public usvspecd01 .1.3.6.1.4.1.1.590.2 usvspecd01 6 1 '' .1.3.6.1.4.1.1.590.2.1.1 s 1555956846 .1.3.6.1.4.1.590.2.1.2 s "pulse"
<503 spectrum@uusvxxxxxxxx1 /app/spectrum/custom/bin>
Yes, we customized the EventDisp for the 0x053609ae event code. But Southbound Gateway is not used for this.
It is just using snmptrap to send our private trap.
Thanks,
Kevin