From: Tong Y. <To...@in...> - 2005-02-10 01:42:32
|
I have read through the documentation and groups and got it working, but I need to manually run ./perfparsed before the service-perfdata.log file is created by nagios. Is this by design? =20 Should I create some script to run perfparsed before nagios starts. Or did I miss something that is suppose to run perfparsed by itself? Thanks! =20 I am running Nagios 2.0 on debian sarge. Here are my config files: =20 nagios_performance.cfg: =20 define command{ command_name process-service-perfdata command_line /usr/local/nagios/bin/perfparse_nagios_command.pl /usr/local/nagios/var/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$SERVICEOUTPUT$" "$SERVICESTATE$" "$SERVICEPERFDATA$" } =20 define command{ command_name process-host-perfdata command_line /usr/local/nagios/bin/perfparse_nagios_command.pl /usr/local/nagios/var/var/perfdata-host.log "$TIMET$" "$HOSTNAME$" "$OUTPUT$" "$PERFDATA$" } =20 perfparsed.cfg =20 Perfparsed [options] =20 # File where Perfparse logs messages # Error_Log =3D "string" Error_Log =3D "perfparse.log" =20 # Rotate Perfparse log files # Error_Log_Rotate =3D "Y/N" Error_Log_Rotate =3D "Yes" =20 # Keep N days of error log. Compress recent logs and remove too old ones # Error_Log_Keep_N_Days =3D "value" Error_Log_Keep_N_Days =3D "7" =20 # When perfparse cannot parse a line, it drops it to that file # Drop_File =3D "string" Drop_File =3D "/tmp/perfparse.drop" =20 #=20 # Drop_File_Rotate =3D "Y/N" Drop_File_Rotate =3D "Yes" =20 # Keep N days of drop file log. Compress recent logs and remove too old ones # Drop_File_Keep_N_Days =3D "value" Drop_File_Keep_N_Days =3D "7" =20 # Port for perfparsed server Put 0 or "" to disable the server # Server_Port =3D "value" Server_Port =3D "1976" =20 # Log source from nagios (or other tools) that perfparse will scan Authorized values: a file name, '-' for stdin, '|' for a fifo and '>' for a host:port socket For sockets, a command 'history' will be sent before retreiving the data # Service_Log =3D "string" Service_Log =3D "|/usr/local/nagios/var/perfdata-service.log" =20 # Save the read position in the nagios log file ? If yes, perfparse will start from that position instead of from the beginning # Service_Log_Save_Position =3D "Y/N" Service_Log_Save_Position =3D "yes" =20 # Path for files containing the read position for nagios log files # Service_Log_Position_Mark_Path =3D "string" Service_Log_Position_Mark_Path =3D "/usr/local/nagios/var" =20 # Lock file for perfparsed # Daemon_Lock =3D "string" Daemon_Lock =3D "/usr/local/nagios/var/perfparsed.lock" =20 # Run perfparsed as a daemon # Daemonize =3D "Y/N" Daemonize =3D "no" =20 # Perform some periodic cleanup every day # Periodic_Cleanup =3D "Y/N" Periodic_Cleanup =3D "yes" =20 # Lock file for perfparsed periodic cleanup process # Periodic_Cleanup_Lock =3D "string" Periodic_Cleanup_Lock =3D "/usr/local/nagios/var/perfparsed_periodic_cleanup.lock" =20 # Perform some periodic cleanup every day at HHMM # Periodic_Cleanup_Hour =3D "value" Periodic_Cleanup_Hour =3D "0230" =20 # Dummy hostname if gethostname() does not work # Dummy_Hostname =3D "string" Dummy_Hostname =3D "dummy" =20 # Don't store raw data # No_Raw_Data =3D "Y/N" No_Raw_Data =3D "no" =20 # Don't store bin data # No_Bin_Data =3D "Y/N" No_Bin_Data =3D "no" =20 # Path where storage modules are # Storage_Modules_Dir =3D "string" Storage_Modules_Dir =3D "/usr/local/nagios/lib" =20 # Modules to load (Coma separated values) # Storage_Modules_Load =3D "string" Storage_Modules_Load =3D "mysql" =20 # File to contain Storage Modules Status # Storage_Modules_Status_File =3D "string" Storage_Modules_Status_File =3D "/usr/local/nagios/var/storage_modules.status" =20 =20 =20 # Storage Module : mysql # = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =20 # Database user # DB_User =3D "string" DB_User =3D "-removed-" =20 # Database password # DB_Pass =3D "string" DB_Pass =3D "-removed-" =20 # Database name # DB_Name =3D "string" DB_Name =3D "-removed-" =20 # Database hostname # DB_Host =3D "string" DB_Host =3D "localhost" =20 =20 =20 =20 =20 =20 |