NDOutils, v1.4b7: Bug - no option for trimming nagios_externalcommands

Steffen Poulsen step at tdc.dk
Tue Feb 19 16:53:20 CET 2008


> ndo2db.cfg currently does have an option for trimming service 
> checks table, but apparently not for trimming the external 
> commands table.
> 
> In our case our master server is receiving up to 40k passive 
> checks/5 min as external commands, resulting in the mysql 
> databasefile growing by 100-200 megabytes an hour.
> 
> We use the following workaround for now:
> 
> #!/bin/sh
> 
> # Workaround, no option in ndo2db.cfg for trimming the 
> nagios_externalcommands table in ndoutils 1.4b7 # Reported to 
> mailinglist medio feb 2008
> 
> /usr/bin/mysql -unagiosuser -pnagiospw \
>   -e 'USE master_ndo; DELETE FROM nagios_externalcommands WHERE
>         unix_timestamp(entry_time) <
>    (unix_timestamp(date_add(now(), interval -30 minute))); '


FYI: Even after this, unfortunately our nagios_externalcommands table
file just kept growing anyway - seems that an additional

OPTIMIZE TABLE nagios_externalcommands

was needed to reclaim the space for re-use (we just added it as #2 sql
command in the cronjob).

Best regards,
Steffen Poulsen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list