Nagios 'Out Of Memory' Problems

Florian Gleixner flo at bier.homeip.net
Sun Mar 26 17:54:42 CEST 2006


Hi,

i forgot to reply to the list. Lets share knowledge.

It is true, the problem can be in a newer perfparse version too. To 
explain the problem:
If you compile nagios with --with-file-perfdata, then nagios opens at 
start the perfdata file and writes there. If the file gets too large and 
you try to delete it, then you won't see any change in disk usage. This 
is because nagios never closes the file and even if you delete it, 
nagios still has a reference to that file.
So if you choose to use perfparse to read that file then perfparse can 
be configured to delete the file and restart nagios (send a restart 
signal) to avoid filling the disk with the perfdata file.
This is very bad for performance if you run more than some 100 service 
checks.

To avoid this, you should choose another method to get performance data 
to perfparse. You can get very good performance with the method "pipe to 
perfparse" and if you enable embedded perl in nagios. Here is a example 
configuration (nagios 2.0):

In misccommands.cfg:

define command{
         command_name    process-service-perfdata
         command_line 
/usr/local/nagios/bin/perfparse_nagios_pipe_command.pl 
/usr/local/nagios/var/serviceperf.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$"
  "$SERVICEOUTPUT$" "$SERVICESTATE$" "$SERVICEPERFDATA$"
         }

in nagios.cfg:
process_performance_data=1
service_perfdata_command=process-service-perfdata

in perfparse.cfg:
Service_Log =                "|/usr/local/nagios/var/serviceperf.log"
Service_Log_Position_Mark_Path = "no"

The (embedded) perl script writes to a pipe and the perfparsed daemon 
reads continously from that pipe. Make sure perfparsed is running!
One problem here is, that perfparsed should be started before the 
service command generates the output file, because perfparsed wants to 
create a pipe. Therefore a perfparsed startscript should delete/move a 
stale outputfile. Send me a mail if you need a perfparsed startskript.

Flo

Stephen Barron schrieb:
> We are using the current release v0.105.6.  Could this be due to using
> the Periodic Nagios Log Parse method of perfparse?  This is what we
> are using and we have had serious stability problems with nagios ever
> since installing perfparse.
> 
> Thanks
> 
> Stephen Barron
> 
> On 3/25/06, Florian Gleixner <flo at bier.homeip.net> wrote:
>>
>> Stephen Barron schrieb:
>>> Hi
>>>
>>> I had this problem also, and in our case it was NCSA that was filling
>>> up the memory on the Nagios Central Server.  We noticed the problem
>>> increasingly after we installed perfparse, which attempts (poorly) to
>>> stop and restart the nagios process.
>> This was a problem of older perfparse versions. If you use newer
>> versions then perfparse does not need to restart nagios.
>>
>> Flo
>>
> 
> 
> --
> Steve


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
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