Page 1 of 1

Get list of actual alerts from command line ?

Posted: Tue Mar 05, 2013 5:49 am
by fgilain
Hello all,

i'm looking for a simple way to get the actual alerts list from the linux command line, is there a way to get it ?

Thanks

Florent

Re: Get list of actual alerts from command line ?

Posted: Tue Mar 05, 2013 11:48 am
by abrist
You could grep the nagios.log file for "ALERT", "WARNING" or "CRITICAL"

Code: Select all

grep ALERT /usr/local/nagios/var/nagios.log

Re: Get list of actual alerts from command line ?

Posted: Wed Mar 06, 2013 4:56 pm
by fgilain
problem is that this log file seems to contain too many alerts...not only actual ones, isn't it ?

Florent

Re: Get list of actual alerts from command line ?

Posted: Wed Mar 06, 2013 5:03 pm
by abrist
Well, these will include soft and hard alerts for warnings. If you just want the criticals:

Code: Select all

grep CRITICAL /usr/local/nagios/var/nagios.log