/usr/share/doc/argus-server/examples/events/argus-snmp.sh is in argus-server 2:3.0.8.2-1+b1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #!/bin/sh
#
# Argus Software
# Copyright (c) 2006-2015 QoSient, LLC
# All rights reserved.
#
# argus-snmp - collect snmp stats and report them as XML oriented argus events.
# This program requires a lot of site specific customization, and
# so, be sure and change the community string for snmp agent access
# and pick the interfaces of interest.
#
# Carter Bullard
# QoSient, LLC
#
# $Id: //depot/argus/argus/events/argus-snmp.sh#7 $
# $DateTime: 2015/04/06 10:38:44 $
# $Change: 2973 $
#
prog="/usr/bin/snmpwalk -Os -c qosient -v 2c 10.0.1.1"
stats="/usr/bin/snmpget -Os -c qosient -v 2c 10.0.1.1"
interfaces="2 3 9"
echo "<ArgusEvent>"
echo " <ArgusEventData Type = \"Program: $prog\" >"
retn=`$prog ipNetToMediaPhysAddress | awk 'BEGIN{FS="="}{print " < Label = \""$1"\" Value = \""$2"\" />"}'`;
echo "$retn"
echo " </ArgusEventData>"
echo " <ArgusEventData Type = \"Program: $stats\" >"
for i in $interfaces; do
echo " "`$stats ifInUcastPkts.$i | awk 'BEGIN{FS="="}{print "< Label = \""$1"\" Value = \""$2"\" />"}'`;
echo " "`$stats ifOutUcastPkts.$i | awk 'BEGIN{FS="="}{print "< Label = \""$1"\" Value = \""$2"\" />"}'`;
echo " "`$stats ifInOctets.$i | awk 'BEGIN{FS="="}{print "< Label = \""$1"\" Value = \""$2"\" />"}'`;
echo " "`$stats ifOutOctets.$i | awk 'BEGIN{FS="="}{print "< Label = \""$1"\" Value = \""$2"\" />"}'`;
echo " "`$stats ifOutDiscards.$i | awk 'BEGIN{FS="="}{print "< Label = \""$1"\" Value = \""$2"\" />"}'`;
done
echo " </ArgusEventData>"
echo "</ArgusEvent>"
|