Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_snmp_aix_disk.sh
1.0
2014-06-25
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
GPL
20191
File | Description |
---|---|
check_snmp_aix_disk.sh | check_snmp_aix_disk.sh |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Reviews (1)
bypaulso, January 5, 2016
1. customized to display output as MB and GB depends on the size of partition.
2. customized to display usage in percentage only when normal while displaying total, used, free when warn or cri
249c249
#convert size to MB and GB
250a251
> (( total_G=${total_M}/1024 ))
251a253
> (( used_G=${used_M}/1024))
253a256
> (( avail_G=${avail_M}/1024 ))
255a259,276
>
> if [[ $total_M -gt 1024 ]];then
> total_out="total=${total_G}GB"
> else
> total_out="total=${total_M}MB"
> fi
>
> if [[ $used_M -gt 1024 ]];then
> used_out="used=${used_G}GB"
> else
> used_out="used=${used_M}MB"
> fi
>
> if [[ $avail_M -gt 1024 ]];then
> avail_out="free=${avail_G}GB"
> else
> avail_out="free=${avail_M}MB"
> fi
259a281
> PERF="$PERF ${disk_array[$k]} Usage:${use_percent}%;"
262a285
> PERF="$PERF ${disk_array[$k]} Usage:${use_percent}% ${total_out} ${used_out} ${avail_out};"
265a289
> PERF="$PERF ${disk_array[$k]} Usage:${use_percent}% ${total_out} ${used_out} ${avail_out};"
267d290
2. customized to display usage in percentage only when normal while displaying total, used, free when warn or cri
249c249
#convert size to MB and GB
250a251
> (( total_G=${total_M}/1024 ))
251a253
> (( used_G=${used_M}/1024))
253a256
> (( avail_G=${avail_M}/1024 ))
255a259,276
>
> if [[ $total_M -gt 1024 ]];then
> total_out="total=${total_G}GB"
> else
> total_out="total=${total_M}MB"
> fi
>
> if [[ $used_M -gt 1024 ]];then
> used_out="used=${used_G}GB"
> else
> used_out="used=${used_M}MB"
> fi
>
> if [[ $avail_M -gt 1024 ]];then
> avail_out="free=${avail_G}GB"
> else
> avail_out="free=${avail_M}MB"
> fi
259a281
> PERF="$PERF ${disk_array[$k]} Usage:${use_percent}%;"
262a285
> PERF="$PERF ${disk_array[$k]} Usage:${use_percent}% ${total_out} ${used_out} ${avail_out};"
265a289
> PERF="$PERF ${disk_array[$k]} Usage:${use_percent}% ${total_out} ${used_out} ${avail_out};"
267d290