External commands and nagios.log

Keller, Mark D Keller.Mark at con-way.com
Tue Jun 30 22:17:59 CEST 2009


Just looking at yesterdays logs, I have 1,491,321 lines for external commands and about the same for passive checks. We have do about 5300 service checks every five minutes which comes out to around 1,500,000. So they seem to match. Unless I am missing something.

Service checks by far dominant the log. We have a distributed server send all service checks passively to the front end. Then NSCA sends them through an external command. So for each service entry I get a log like the following:

[1246345229] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;myserver;Load;0;OK -
[1246345230] PASSIVE SERVICE CHECK: myserver;Load;0;OK - load average: 0.19, 0.09, 0.08

At this point I would just be happy to not log any of the external command entries. Still the log may be big, but much smaller.

I can't seem to get any of the following options in nagios.cfg to make a difference. They all log no matter what they are set to:

log_notifications
log_service_retries
log_host_retries
log_event_handlers
log_initial_states
log_external_commands
log_passive_checks

Thanks,

Mark

-----Original Message-----
From: Marc Powell [mailto:marc at ena.com] 
Sent: Tuesday, June 30, 2009 11:12 AM
To: Nagios Users Mail-list
Subject: Re: [Nagios-users] External commands and nagios.log


On Jun 30, 2009, at 12:22 PM, Keller, Mark D wrote:

> Hello,
>
> We have a distributed Nagios environment that is working fine.
>
> On the frontend I am getting about 400MB of logs a day.

That's very very large...

> That makes any web cgi's that need to read the logs horribly slow. I  
> have noticed that about half of the log messages are for external  
> commands.

That is still very very large. 8603 passive services here on a  
somewhat volatile network (89 down currently) --

1.8M	nagios-06-27-2009-00.log
1.9M	nagios-06-28-2009-00.log
2.2M	nagios-06-29-2009-00.log
2.2M	nagios-06-30-2009-00.log

> Is there any reason to keep the external commands in the log files?

No. Not unless you have some custom script that does something with  
them.

> Does some of the history or reports rely on them?

Not at all.

> Then the second question is, how do I get them to stop logging to  
> the file? I see there is a log_external_commands option in the  
> nagios.cfg, but setting that to 0 doesn't seem to actually stop the  
> log entry from going to the nagios.log.

Are you confusing external commands with passive checks perhaps  
(log_passive_checks)?

--
Marc



------------------------------------------------------------------------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list