Page 1 of 1

No longer want "Warning" e-mails, only "Critical" emails.

Posted: Mon May 02, 2016 12:03 pm
by PhilG
Hello:
We have eliminated or at least modified a number of "false positive" checks since indoctrinating Nagios XI, and wish to continue streamlining/"clean up" some more Nagios XI checks.
Our team has decided that they no longer want to get "paged"/notified of "Warning" statuses while on standby (this is VERY annoying in the middle of the night for things that are not needed to be looked into) and have identified the items below on what we wish to "clean up"/change:
1). Windows systems:
a). CPU Usage
check_xi_service_nsclient!<PASSWORD>!CPULOAD!-l 5,90,95

b). Drive C: DIsk Usage
check_xi_service_nsclient!<PASSWORD>!USEDDISKSPACE!-l C -w 90 -c 95

c). Memory Usage
check_xi_service_nsclient!<PASSWORD>!MEMUSE!-w 90 -c 95

2). Linux systems:
a). / Disk Usage
check_nrpe!check_disk!-a '-w 10% -c 5% -p /'

b). CPU Stats
check_nrpe!check_cpu_stats!-a '-w 90 -c 95'

QUESTIONS:
What are the Bulk Modification method for these, please:
1). Is there a way to eliminate the Warning checks for the items, above, and only report a Critical status (which we'll tweak) and if so, how

2). Hard drive/partition disk space usage notifications - how can we check for a specific size, ex. critical when only 10 Gb left, instead of percentage, ex. 95%? To us, it's not a concern to report that 95% of disk space is left when the system has 100 Gb or more of space available.

Thank you.

Re: No longer want "Warning" e-mails, only "Critical" emails

Posted: Mon May 02, 2016 4:01 pm
by rkennedy
Some plugins might support setting the warning / critical to the same value, but others will not let that happen as the logic doesn't follow. I'd recommend setting your warning values to a number that should be critical, perhaps 94% warning and 95% critical. It won't be possible to just 'eliminate' the warning value.

1. To stop warning notifications, you can do so from the users panel. Click the username you're logged in as in the top right, then 'Notification Preferences', and uncheck the 'Service Warning' box. Update settings. The users will now only receive notifications for critical alerts.
notification-preferences.PNG
2.windows. USEDDISKSPACE will only warn / crit based on percentages. Looking around online, I found some pre-made wrapper scripts that you should be able to use.
http://serverfault.com/questions/309913 ... heck-nt-co

You could also switch this to use check_nrpe instead, and go with this example (taken from http://sites.box293.com/nagios/guides/c ... disk-usage) -

Code: Select all

Command:
check_nrpe -H 192.168.142.137 -t 30 -c check_drivesize -a drive=C: 'warning=free<10G' 'critical=free<5G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free} free / ${size} total}' top-syntax='${status}: ${problem_list}'

Output:
OK: {C: 40.361GB free / 59.9GB total}|'C: free'=40.36125G;10;5;0;59.90038 'C: free %'=67%;16;8;0;100
2.linux. check_disk should support using integers as the warning rather, and also % signs. It looks like you're setup is currently using %

Code: Select all

 -w, --warning=INTEGER
    Exit with WARNING status if less than INTEGER units of disk are free
 -w, --warning=PERCENT%
    Exit with WARNING status if less than PERCENT of disk space is free
 -c, --critical=INTEGER
    Exit with CRITICAL status if less than INTEGER units of disk are free
 -c, --critical=PERCENT%
    Exit with CRITICAL status if less than PERCENT of disk space is free