Plugin script with error,
$ cat check_snmp_storage_pl_linux_wrapper.sh
#!/bin/bash
LINE=`/usr/local/nagios/libexec/check_snmp_storage.pl $*`
RC=$?
PROCS=`echo $LINE |sed 's|)|\n|g' |egrep -v '<|>|CRITICAL|WARNING|OK'|awk -F '%' '{print $1}'| tr '\n' ',' |tr ':' '='|sed 's|,|%,|g' |sed "s|, |, '|g" | sed "s|=|'=|g"`
echo "$LINE | $PROCS"
exit $RC
$ /mnt/disk1/nagios/libexec/check_snmp_storage_pl_linux_wrapper.sh -H X.X.X.X -C YYYYYYY -2 -m memory$ -e -w 80 -c 90
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_storage.pl line 420.
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_storage.pl line 494.
ERROR: Size table :The message size 1618 exceeds the maxMsgSize 1472. | ERROR'= Size table '=The message size 1618 exceeds the maxMsgSize 1472.%,
$ /usr/local/nagios/libexec/check_snmp_storage.pl -H X.X.X.X -C YYYYYYY -2 -m memory$ -e -w 80 -c 90
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_storage.pl line 420.
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_storage.pl line 494.
ERROR: Size table :The message size 1618 exceeds the maxMsgSize 1472.
Plugin Script after correction,
$ cat check_snmp_storage_pl_linux_wrapper.sh
#!/bin/bash
LINE=`/usr/local/nagios/libexec/check_snmp_storage.pl -o 2000 $*`
RC=$?
PROCS=`echo $LINE |sed 's|)|\n|g' |egrep -v '<|>|CRITICAL|WARNING|OK'|awk -F '%' '{print $1}'| tr '\n' ',' |tr ':' '='|sed 's|,|%,|g' |sed "s|, |, '|g" | sed "s|=|'=|g"`
echo "$LINE | $PROCS"
exit $RC
$ /mnt/disk1/nagios/libexec/check_snmp_storage_pl_linux_wrapper.sh -H X.X.X.X -C YYYYYYY -2 -m memory$ -e -w 80 -c 90
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_storage.pl line 420.
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_storage.pl line 494.
/run/user/1038: 0%used(0MB/12066MB) /run/user/1040: 0%used(0MB/12066MB) /mnt/disk2: 46%used(2309543MB/5039494MB) /sys/fs/cgroup: 0%used(0MB/60332MB) Memory buffers: 0%used(6MB/120664MB) /run/user/1043: 0%used(0MB/12066MB) /run/user/1011: 0%used(0MB/12066MB) /home: 60%used(12101MB/20031MB) /run/user/1028: 0%used(0MB/12066MB) /run/user/1023: 0%used(0MB/12066MB) Swap space: 0%used(0MB/0MB) /run/user/1053: 0%used(0MB/12066MB) /run/user/1058: 0%used(0MB/12066MB) /run/user/1004: 0%used(0MB/12066MB) /run/user/1022: 0%used(0MB/12066MB) /run/user/1031: 0%used(0MB/12066MB) /run/user/1055: 0%used(0MB/12066MB) /run/user/1047: 0%used(0MB/12066MB) /: 80%used(16445MB/20462MB) /mnt/disk4: 1%used(612MB/50268MB) /run/user/1021: 0%used(0MB/12066MB) /mnt/disk3: 59%used(589709MB/1007800MB) /dev/shm: 0%used(0MB/60332MB) /run/user/1005: 0%used(0MB/12066MB) /run: 1%used(834MB/60332MB) /run/user/0: 0%used(0MB/12066MB) /run/user/1046: 0%used(0MB/12066MB) /run/user/1049: 0%used(0MB/12066MB) /run/user/1033: 0%used(0MB/12066MB) /run/user/1000: 0%used(0MB/12066MB) /mnt/disk1: 45%used(1368762MB/3022942MB) (>80%) : WARNING | /run/user/1038'= 0%, '/run/user/1040'= 0%, '/mnt/disk2'= 46%, '/sys/fs/cgroup'= 0%, 'Memory buffers'= 0%, '/run/user/1043'= 0%, '/run/user/1011'= 0%, '/home'= 60%, '/run/user/1028'= 0%, '/run/user/1023'= 0%, 'Swap space'= 0%, '/run/user/1053'= 0%, '/run/user/1058'= 0%, '/run/user/1004'= 0%, '/run/user/1022'= 0%, '/run/user/1031'= 0%, '/run/user/1055'= 0%, '/run/user/1047'= 0%, '/'= 80%, '/mnt/disk4'= 1%, '/run/user/1021'= 0%, '/mnt/disk3'= 59%, '/dev/shm'= 0%, '/run/user/1005'= 0%, '/run'= 1%, '/run/user/0'= 0%, '/run/user/1046'= 0%, '/run/user/1049'= 0%, '/run/user/1033'= 0%, '/run/user/1000'= 0%, '/mnt/disk1'= 45%,
$ /usr/local/nagios/libexec/check_snmp_storage.pl -H X.X.X.X -C YYYYYYY -2 -m memory$ -e -w 80 -c 90 -o 2000
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_storage.pl line 420.
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_storage.pl line 494.
/run/user/1038: 0%used(0MB/12066MB) /run/user/1040: 0%used(0MB/12066MB) /mnt/disk2: 46%used(2309543MB/5039494MB) /sys/fs/cgroup: 0%used(0MB/60332MB) Memory buffers: 0%used(6MB/120664MB) /run/user/1043: 0%used(0MB/12066MB) /run/user/1011: 0%used(0MB/12066MB) /home: 60%used(12101MB/20031MB) /run/user/1028: 0%used(0MB/12066MB) /run/user/1023: 0%used(0MB/12066MB) Swap space: 0%used(0MB/0MB) /run/user/1053: 0%used(0MB/12066MB) /run/user/1058: 0%used(0MB/12066MB) /run/user/1004: 0%used(0MB/12066MB) /run/user/1022: 0%used(0MB/12066MB) /run/user/1031: 0%used(0MB/12066MB) /run/user/1055: 0%used(0MB/12066MB) /run/user/1047: 0%used(0MB/12066MB) /: 80%used(16445MB/20462MB) /mnt/disk4: 1%used(612MB/50268MB) /run/user/1021: 0%used(0MB/12066MB) /mnt/disk3: 59%used(589709MB/1007800MB) /dev/shm: 0%used(0MB/60332MB) /run/user/1005: 0%used(0MB/12066MB) /run: 1%used(834MB/60332MB) /run/user/0: 0%used(0MB/12066MB) /run/user/1046: 0%used(0MB/12066MB) /run/user/1049: 0%used(0MB/12066MB) /run/user/1033: 0%used(0MB/12066MB) /run/user/1000: 0%used(0MB/12066MB) /mnt/disk1: 45%used(1368798MB/3022942MB) (>80%) : WARNING
----------------------------------------------------------------------------------
Thanks and Regards,
Sandeep Subhash Panchal
No comments:
Post a Comment