Build precise queries to find exactly what you need
Press ESC to close
@xoroz
Member Since: June 16, 2010
Favorites2
Views16501
Projects20
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
Reviewed 9 years ago
very nice way to auto get the number of process and setup the warning / critical threshold! my output: bash check_load.sh OK- Load Average: 0.00, 0.00, 0.00 | load1=0.00;3.2;3.6;; load5=0.00;3.2;3.6;; load15=0.00;3.2;3.6;; great work cheers
Reviewed 7 years ago
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
it worked but comment out the part #if [ ! -r "/var/log/sendmail.st" ]; then # printf "CRITICAL - /var/log/sendmail.st #has wrong permissions, should be 644 " # exit #fi
Just wish I knew how to add an WMIC alias otherwise its very limitted..
Reviewed 13 years ago
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!
Reviewed 14 years ago
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?
Reviewed 12 years ago
Trying a Cisco switch and getting always this Agent not responding, tried SNMP v1 and v2
Very cool plugin! Could add: the output should be just one line the output should have OK,WARNING,CRITICAL key words
Reviewed 15 years ago
Thanks for this simple passive check solution. I will be implementing it here.
works great also on vSphere 6.5 Windows or Linux! This is a great plugin thank you for the work
Reviewed 6 years ago
./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
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
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!
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'
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 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 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)
.sh but is binary? something is wrong...