Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
xoroz
byxoroz, June 5, 2019
works great also on vSphere 6.5
Windows or Linux!
This is a great plugin
thank you for the work
Windows or Linux!
This is a great plugin
thank you for the work
byxoroz, September 10, 2018
byxoroz, January 12, 2017
wish I could have warning critical threshold, rewrote a simple version in bash :)
#!/bin/bash
#
#Felipe Ferreira Jan 2017
#
# First lets chceck if yum --security exists and works
#MAKE SURE yum-security is installed
yum --security version >/dev/null 2>&1 || { echo "I require yum-security but it's not installed. Aborting." >&2; exit 1; }
#CHECK FOR ARGS
if [[ $2 ]]; then
WARN=$1
CRIT=$2
else
echo "UNKONW - Please pass arguments, number of security patches missing it should warn or crit $0 "
exit 3
fi
A=$(yum -C --security check-update |grep " needed for security")
C=$(echo $A|awk '{ print $1 }')
if [ "$C" -gt "$CRIT" ]; then
echo "CRITICAL - $A | sec=$C"
exit 2
elif [ "$C" -gt "$WARN" ]; then
echo "WANING - $A | sec=$C"
exit 1
fi
echo "OK - $A | sec=$C"
exit 0
#!/bin/bash
#
#Felipe Ferreira Jan 2017
#
# First lets chceck if yum --security exists and works
#MAKE SURE yum-security is installed
yum --security version >/dev/null 2>&1 || { echo "I require yum-security but it's not installed. Aborting." >&2; exit 1; }
#CHECK FOR ARGS
if [[ $2 ]]; then
WARN=$1
CRIT=$2
else
echo "UNKONW - Please pass arguments, number of security patches missing it should warn or crit $0 "
exit 3
fi
A=$(yum -C --security check-update |grep " needed for security")
C=$(echo $A|awk '{ print $1 }')
if [ "$C" -gt "$CRIT" ]; then
echo "CRITICAL - $A | sec=$C"
exit 2
elif [ "$C" -gt "$WARN" ]; then
echo "WANING - $A | sec=$C"
exit 1
fi
echo "OK - $A | sec=$C"
exit 0
byxoroz, July 25, 2016
./check_ping.pl --host wiki --loss 10,20 --rta 50,100 --timeout 2 --packages 5
PING - Packet loss = 0%, RTA = 23.46 ms|rta=23.46 ms[
added perf info by changing this line:
printf("PING - Packet loss = %i%%, RTA = %.2f ms|rta=%.2f ms", $loss, $rta, $rta);
thank you
PING - Packet loss = 0%, RTA = 23.46 ms|rta=23.46 ms[
added perf info by changing this line:
printf("PING - Packet loss = %i%%, RTA = %.2f ms|rta=%.2f ms", $loss, $rta, $rta);
thank you
byxoroz, July 19, 2016
then mv -f ".deps/check_tping-getopt.Tpo" ".deps/check_tping-getopt.Po"; else rm -f ".deps/check_tping-getopt.Tpo"; exit 1; fi
getopt.c:45:22: error: ansidecl.h: No such file or directory
make[2]: *** [check_tping-getopt.o] Error 1
make[2]: Leaving directory `/usr/lib/nagios/plugins/old/check_tping-0.1.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/lib/nagios/plugins/old/check_tping-0.1.1'
make: *** [all] Error 2
getopt.c:45:22: error: ansidecl.h: No such file or directory
make[2]: *** [check_tping-getopt.o] Error 1
make[2]: Leaving directory `/usr/lib/nagios/plugins/old/check_tping-0.1.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/lib/nagios/plugins/old/check_tping-0.1.1'
make: *** [all] Error 2
Thank you for the plugin.
I tried it worked quite well. This is how I used it:
check_xenserver.py poolge65_2 check_xenserver.ini check_sr --name FREENAS02GE-NFS 90 95
check_xenserver.py poolge65_2 check_xenserver.ini check_cpu 80 95
check_xenserver.py poolge65_2 check_xenserver.ini check_mem 80 95
check_xenserver.py poolge65_2 check_xenserver.ini check_hosts
check_xenserver.ini
[poolge65_2]
host: xenserver02
username: blublu
password: blabla
exclude_srs: SR1, SR2
Comments:
Noticed that without exclude_srs the script breaks.
Would have been nice to be able to get individual VM CPU/Memory. Think it can be done? :)
thank you
I tried it worked quite well. This is how I used it:
check_xenserver.py poolge65_2 check_xenserver.ini check_sr --name FREENAS02GE-NFS 90 95
check_xenserver.py poolge65_2 check_xenserver.ini check_cpu 80 95
check_xenserver.py poolge65_2 check_xenserver.ini check_mem 80 95
check_xenserver.py poolge65_2 check_xenserver.ini check_hosts
check_xenserver.ini
[poolge65_2]
host: xenserver02
username: blublu
password: blabla
exclude_srs: SR1, SR2
Comments:
Noticed that without exclude_srs the script breaks.
Would have been nice to be able to get individual VM CPU/Memory. Think it can be done? :)
thank you
byxoroz, May 5, 2016
byxoroz, February 6, 2014
Could not use the encrypt part
There is a hard code to /etc/cloutomate/cloutomate.pem what is that?
I always get the error:
Exception `NameError' at encrypt_credentials.rb:91 - uninitialized constant Digest::SHA256
Can you help me out?
There is a hard code to /etc/cloutomate/cloutomate.pem what is that?
I always get the error:
Exception `NameError' at encrypt_credentials.rb:91 - uninitialized constant Digest::SHA256
Can you help me out?
Owner's reply
Hi Xorox,
The hardcoded file in encrypt_credentials.rb is a file containing a RSA private key in our system.
Could you please send me more information on how you configure the plugin and the full output of the plugin?
Please, feel free to contact me.
Fred
byxoroz, March 18, 2013
Just wish I knew how to add an WMIC alias
otherwise its very limitted..
otherwise its very limitted..
byxoroz, August 8, 2012
.sh but is binary? something is wrong...
byxoroz, May 28, 2012
Trying a Cisco switch and getting always this
Agent not responding, tried SNMP v1 and v2
Agent not responding, tried SNMP v1 and v2
byxoroz, April 24, 2012
It was a nice idea it works allright.
Had to to convert to unix format using
dos2unix check_top_process.sh
thanks for this script
Had to to convert to unix format using
dos2unix check_top_process.sh
thanks for this script
byxoroz, April 17, 2012
I get the following error:
./check_file_age.py -h
File "./check_file_age.py", line 57
else:
^
SyntaxError: invalid syntax
Running CentOS 6 x64
and
Python 2.6.5 (r265:79063, Nov 12 2010, 00:52:45)
./check_file_age.py -h
File "./check_file_age.py", line 57
else:
^
SyntaxError: invalid syntax
Running CentOS 6 x64
and
Python 2.6.5 (r265:79063, Nov 12 2010, 00:52:45)
Thanks for that great script.
The output is something like
RX Bytes: 661GB, TX Bytes: 150GB; RX Speed: 62KBps, TX Speed: 25KBps; OK bandwidth utilization | rx=63021;1152921504606846976;3458764513820540928 tx=25090;1152921504606846976;3458764513820540928
And I could graph it too!
The output is something like
RX Bytes: 661GB, TX Bytes: 150GB; RX Speed: 62KBps, TX Speed: 25KBps; OK bandwidth utilization | rx=63021;1152921504606846976;3458764513820540928 tx=25090;1152921504606846976;3458764513820540928
And I could graph it too!
byxoroz, April 6, 2011
Had errors running the script.
I modified it for
#!/bin/bash
# Return codes:
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
# Arguments:
DIRECTORY=$1
WARNLEVEL=$2
CRITLEVEL=$3
# Get current file count:
FCOUNT=`ls -l $DIRECTORY |grep -v tot* |wc -l`
#echo "Total files in $DIRECTORY is $FCOUNT"
if [ $FCOUNT -lt $WARNLEVEL ]; then
echo "OK, $FCOUNT items in $DIRECTORY|files=$FCOUNT"
exitstatus=$STATE_OK
exit $exitstatus
fi
if [ $FCOUNT -gt $CRITLEVEL ]; then
echo "CRITICAL: $FCOUNT items in $DIRECTORY|files=$FCOUNT"
exitstatus=$STATE_CRITICAL
exit $exitstatus
fi
if [ $FCOUNT -gt $WARNLEVEL ]; then
echo "WARNING: $FCOUNT items in $DIRECTORY|files=$FCOUNT"
exitstatus=$STATE_WARNING
exit $exitstatus
fi
and it works fine
I modified it for
#!/bin/bash
# Return codes:
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
# Arguments:
DIRECTORY=$1
WARNLEVEL=$2
CRITLEVEL=$3
# Get current file count:
FCOUNT=`ls -l $DIRECTORY |grep -v tot* |wc -l`
#echo "Total files in $DIRECTORY is $FCOUNT"
if [ $FCOUNT -lt $WARNLEVEL ]; then
echo "OK, $FCOUNT items in $DIRECTORY|files=$FCOUNT"
exitstatus=$STATE_OK
exit $exitstatus
fi
if [ $FCOUNT -gt $CRITLEVEL ]; then
echo "CRITICAL: $FCOUNT items in $DIRECTORY|files=$FCOUNT"
exitstatus=$STATE_CRITICAL
exit $exitstatus
fi
if [ $FCOUNT -gt $WARNLEVEL ]; then
echo "WARNING: $FCOUNT items in $DIRECTORY|files=$FCOUNT"
exitstatus=$STATE_WARNING
exit $exitstatus
fi
and it works fine
byxoroz, February 8, 2011
Simple and usefull!
./check_apachereq.pl -w 90 -c 900
OK - 1 current apache requests | 'apache requests'=1;90;900
Thanks for the good work!
./check_apachereq.pl -w 90 -c 900
OK - 1 current apache requests | 'apache requests'=1;90;900
Thanks for the good work!
I had this error:
Traceback (most recent call last):
File "./check_apache2.py", line 189, in ?
result = transform_dict(resParse)
File "./check_apache2.py", line 169, in transform_dict
totalAcc = int(resParse['totalAcc'].strip(" Total Accesses:"))
KeyError: 'totalAcc'
Traceback (most recent call last):
File "./check_apache2.py", line 189, in ?
result = transform_dict(resParse)
File "./check_apache2.py", line 169, in transform_dict
totalAcc = int(resParse['totalAcc'].strip(" Total Accesses:"))
KeyError: 'totalAcc'