Page 1 of 1

nagios 4.x showlog

Posted: Tue Apr 19, 2016 9:31 am
by freddy00
Hello.

I recently upgraded nagios from 3.5.1 to 4.1.1.
Those "core workers" are a great thing for sure, many thanks for that great feature!

The only problem is that a lot of informational messages about workers are logged in the "nagios.log" file and now that file is like 50x the size it was with nagios 3.x.
This makes the browser hangs for a few seconds when accessing the "showlog.cgi". that's very annoying.

I'm currently monitoring a few thousands hosts with a few ten-thousands services, so it happens that sometimes a few of them are down/critical.
In that case I get a lot of these msgs every second:

Code: Select all

Informational Message[18-04-2016 15:16:48] wproc: early_timeout=1; exited_ok=0; wait_status=0; error_code=62;
Informational Message[18-04-2016 15:16:48] wproc: host=V000CAM012; service=(null);
Informational Message[18-04-2016 15:16:48] wproc: CHECK job 8 from worker Core Worker 306 timed out after 30.00s
Informational Message[18-04-2016 15:16:48] wproc: Core Worker 306: job 8 (pid=365) timed out. Killing it
is there a way to tell nagios not to log those info events? or to log them in a separate file than "nagios.log"?

I've started to change a few things in the source files...
-lib/worker.c
-base/workers.c

commenting out "wlog" strings and recompiling the program reduced the logging about wprocs, but I don't like doing that.
The best way would be an option in the nagios.cfg file, something like "workers_logging_level = [none,info,warning,critical,debug]..."

please let me know if there's a solution for that. your help is very appreciated.

regards,
Federico

Re: nagios 4.x showlog

Posted: Tue Apr 19, 2016 9:41 am
by tmcdonald
The best place to voice these requests is on our GitHub page:

https://github.com/NagiosEnterprises/nagioscore

File it as an Issue and it'll be on the dev radar a lot sooner, as they generally don't patrol the forums. If you don't have a GitHub account I can make one on your behalf instead.

Re: nagios 4.x showlog

Posted: Tue Apr 19, 2016 9:57 am
by freddy00
thanks tmcdonald for the reply.
I wrote here in the forum because I don't exactly know if mine is really a feature request or the option to disable/filter worker logs is doable already (I've read the dox, but perhaps I missed some pages?)...
I see nagios 4.x is around since years already, so I find quite strange it's only me who noticed that accessing "event log" is not as fast as it was before.
however: yes, I'll write to the dev team as you suggested. :)
greetings, Federico

Re: nagios 4.x showlog

Posted: Tue Apr 19, 2016 10:13 am
by tmcdonald
I checked for the word "log" in the Core main config doc, couldn't find anything relating to those messages specifically, so it will probably need to be added in.

Please link to this forum thread in your report for visibility :)