Page 1 of 1

Store only host/service state change in nagios log

Posted: Tue Oct 04, 2016 3:39 am
by benoitvillage
Good morning all,

in order to compute statistics on host/service availability, I need to optimize nagios logging.

Currently, all checks on host and services are stored in logs, i.e. all 5 minutes if OK and all 1 minutes if DOWN. If my service is ok during the day I have 288 state OK stored in my log. If the state is DOWN, I have 1440 down.

Do you know how to configure nagios to store only state change in my log ?

Thank you in advance for your help,

Best regards,
Benoit Village

Re: Store only host/service state change in nagios log

Posted: Tue Oct 04, 2016 11:17 am
by tmcdonald
Just to clarify, is this for Nagios Core, Nagios XI, or Nagios Logserver? I ask because you posted in the Logserver forum, but you are referencing Core or XI functionality.

If this is for Core/XI, it almost sounds like you have state stalking enabled:

https://assets.nagios.com/downloads/nag ... lking.html

Is that the case? If so, that might explain why your logs are growing so large.

Re: Store only host/service state change in nagios log

Posted: Fri Oct 07, 2016 2:32 am
by benoitvillage
Dear tmcdonald,

Thank you very much for your answer and link, it's absolutly what I need ! Log size change from 90 to 8MB !

Have a nice weekend,
Benoit Village

Re: Store only host/service state change in nagios log

Posted: Fri Oct 07, 2016 9:32 am
by dwhitfield
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!