Need to pull report of warning and critical alerts

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Uday Kumar
Posts: 32
Joined: Wed May 11, 2016 11:59 pm

Need to pull report of warning and critical alerts

Post by Uday Kumar »

Hello Team,

I need to pull report of all critical and warning alerts staying from last 24 hours in console .
can you please help me.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Need to pull report of warning and critical alerts

Post by mcapra »

You could do an alerts report from the GUI:
2017_01_13_10_29_36_Nagios_Core_on_192.168.67.1.png
Otherwise if this 100% needs to be done through the CLI, you'd probably want to grep the Nagios log file for your desired date and match something like (ALERT).*CRITICAL;HARD.* to get all HARD states for checks that returned CRITICAL.
Former Nagios employee
https://www.mcapra.com/
Locked