[Nagios-users] External commands and nagios.log

2009-06-30 Thread Keller, Mark D
Hello,

We have a distributed Nagios environment that is working fine.

On the frontend I am getting about 400MB of logs a day. 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. Is there any reason to keep the 
external commands in the log files? Does some of the history or reports rely on 
them?

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.

I am using Nagios 3.0.6.

Any help would be appreciated,

Thanks,

Mark

--
___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] External commands and nagios.log

2009-06-30 Thread Marc Powell

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.8Mnagios-06-27-2009-00.log
1.9Mnagios-06-28-2009-00.log
2.2Mnagios-06-29-2009-00.log
2.2Mnagios-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@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


Re: [Nagios-users] External commands and nagios.log

2009-06-30 Thread Keller, Mark D
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:m...@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.8Mnagios-06-27-2009-00.log
1.9Mnagios-06-28-2009-00.log
2.2Mnagios-06-29-2009-00.log
2.2Mnagios-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@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@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


Re: [Nagios-users] External commands and nagios.log

2009-06-30 Thread Keller, Mark D
Ah, thank you for that point. I guess I was misinterpreting the meaning of 
those options.

I did what you said and now the logs are looking to be way smaller. I also 
trimmed out the passive and external command check lines from my previous logs. 
The history reporting is working way faster now and is actually usable.

Thanks for the help!

Mark

-Original Message-
From: Marc Powell [mailto:m...@ena.com] 
Sent: Tuesday, June 30, 2009 2:01 PM
To: Nagios Users Mail-list
Subject: Re: [Nagios-users] External commands and nagios.log


On Jun 30, 2009, at 3:17 PM, Keller, Mark D wrote:

 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

These are the previously mentions passive service checks, not external  
commands. Logging treats them differently even though the mechanism to  
get both to nagios is the same.

 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_passive_checks

This is the one you want set to 0. Make sure that nagios is restarted  
and that you only have one nagios daemon running. These are the  
settings I use --

log_file=/usr/local/nagios/var/nagios.log
log_rotation_method=d
log_archive_path=/usr/local/nagios/var/archives
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=0
log_external_commands=1
log_passive_checks=0

--
Marc


--
___
Nagios-users mailing list
Nagios-users@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@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