Nagios Exchange
  • Home
  • Directory
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up
Plugins4387Themes and Skins11Add-ons732Documentation283Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Clustering and High-Availability check_mesos_master_health.pl (Advanced Nagios Plugins Collection)
0.0 (0)
5K
RSS Feed
Newest Listings Updated Listings
Top Contributors
LAMY (7)Julien DESMAREST (6)deskwork_itunes142 (4)Davide Lemma (4)Joerg Hoerter (3)
See More
Newest Contributors
Guillaume8723 (1)Salvo (1)SOHA-IT (1)Tsvetomir Tsvetanov (1)Igor Ru (1)
See More
Home > Zdenek Havrlik
ZH

Zdenek Havrlik

@havrla

User Stats

Favorites0

Views

Projects0

No Projects Found
check_disk_util.sh

iostat first run is not good, Adjusts for second run

#!/bin/bash # ---------------------------------------------------- # # File : check_disk_util.sh # Author : Esteban Monge # Email : [email protected] # Date : 10/06/2014 # Version: 0.1 Gamma "Hulk state" # ---------------------------------------------------- # device="" warning=80 critical=90 was_warning="" was_critical="" function help { echo "Usage" echo "check_disk {-w limit -c limit -d device}" echo "Options:" echo "-h" echo " Print detailed help screen" echo "-w=INTEGER" echo " Exit with WARNING status if more than INTEGER percentaje of utilization are used" echo "-c=INTEGER" echo " Exit with CRITICAL status if more than INTEGER percentaje of utilization are used" echo "-d=" echo " Device without complete route" echo " " echo "Example:" echo "check_disk_util -w 80 -c 90 -d sda1" echo " Checks /dev/sda1 at 80% and 90% of disk utilization" echo "check_disk_util -w 80 -c 90 -d sda" echo " Checks /dev/sda1, /dev/sda2, /dev/sda3, etc (regular expression) at 80% and 90% of disk utilization" exit 0 } while getopts "w:c:d:h" args; do case $args in w) warning=$OPTARG ;; c) critical=$OPTARG ;; d) device=$OPTARG ;; h) help ;; esac done if [[ $critical -lt $warning ]];then echo "UNKNOWN: Warning threshold must be lower than Critical threshold" exit 4 fi column_number=`iostat -x | grep -e "Device" | awk '{print NF}'` iostat -x 1 2 |grep -e "$device" | awk -v column=$column_number '/sd|dm/ {print $1,$column}' > /tmp/disk_utili.tmp radek=`cat /tmp/disk_utili.tmp | wc -l` polovina=`echo "$radek / 2 "| bc` cat /tmp/disk_utili.tmp | tail -n $polovina > /tmp/disk_utili1.tmp while read line do device=`echo $line | awk '{print $1}'` disk_util=`echo $line | awk '{print $2}' | cut -d "," -f1 ` if [ ${disk_util%.*} -ge $critical ];then echo "CRITICAL: $device disk utilization $disk_util%" was_critical=1 else if [ ${disk_util%.*} -ge $warning ];then echo "WARNING: $device disk utilization $disk_util%" was_warning=1 else echo "OK: $device disk utilization $disk_util%" fi fi done

Reviewed 10 years ago

check_radius_ih

compile error

Heloo compile error: check_radius_ih.c:148:18: error: ‘PATH_MAX’ undeclared here (not in a function) solution: add to file check_radius_ih.c #include example: #include #include #include #include #include #include #include #include #include #include #include #include #include :-) Havrla

Reviewed 9 years ago

check radius adv

Reply-Msg differs

Heloo ERROR: [root@paklic plugins]# ./check_radius_adv -u [email protected] -p infousek -s radiusheslo -r 10.27.24.4 WARNING: Reply-Msg differs! ('' != '?F??F??????????F') Access ACCEPT. (code = 2) | rtt=0.0029 rttms=2.9079 :D :D :D : [root@paklic plugins]# ./check_radius_adv -u [email protected] -p infousek -s radiusheslo -r 10.27.24.4 -O ./check_radius_adv: invalid option -- 'O' OK: Access ACCEPT. (code = 2) | rtt=0.0037 rttms=3.6969 [root@paklic plugins]# OK: [root@paklic plugins]# ./check_radius_ih -u [email protected] -p infousek -s radiusheslo -r 10.27.24.4 OK: Access GRANTED. (code = 2) | rtt=0.0027 rttms=2.7389 [root@paklic plugins]# Havrla

Reviewed 9 years ago

No Favorites Found

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks