From: Pavol L. <pavol.luptak@i.cz> - 2005-10-12 23:23:16
|
Hello, I use Nagios 2.0b4 with perfparse through a pipe without any problem. Use the following configuration: 1. Nagios 2.0b4 .. .. process_performance_data=1 host_perfdata_command=process-host-perfdata service_perfdata_command=process-service-perfdata define command{ command_name process-service-perfdata command_line /usr/local/nagios/bin/perfparse_nagios_pipe_command.pl / usr/local/nagios/var/perfdata-service.pipe "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$SERVICEOUTPUT$" "$SERVICESTATE$" "$SERVICEPERFDATA$" } define command{ command_name process-host-perfdata command_line /usr/local/nagios/bin/perfparse_nagios_pipe_command.pl / usr/local/nagios/var/perfdata-host.pipe "$TIMET$" "$HOSTNAME$" "$HOSTOUTPUT$" "$HOSTPERFDATA$" } .. .. 2. # cat perfparse.cfg Server_Port = 1976 Service_Log = "|/usr/local/nagios/var/perfdata-service.pipe" Service_Log_Position_Mark_Path = "/usr/local/nagios/var" Error_Log = "/usr/local/nagios/var/perfparse.log" Error_Log_Rotate = "Yes" Error_Log_Keep_N_Days = "7" Drop_File = "/tmp/perfparse.drop" Drop_File_Rotate = "Yes" Drop_File_Keep_N_Days = "7" Lock_File = "/var/lock/perfparse.lock" Show_Status_Bar = "no" Do_Report = "no" Default_user_permissions_Policy = "rw" Default_user_permissions_Host_groups = "rw" Default_user_permissions_Summary = "rw" Output_Log_File = "no" Output_Log_Filename = "/usr/local/nagios/var/perfparse_output_log" Output_Log_Rotate = "yes" Output_Log_Keep_N_Days = "7" Use_Storage_Socket_Output = "no" Storage_Socket_Output_Host_Name = "localhost" Storage_Socket_Output_Port = "1974" Storage_Modules_Dir = "/usr/local/nagios/lib" Storage_Modules_Load = "mysql" Server_Port = "1976" Use_Storage_Mysql = "yes" No_Raw_Data = "no" No_Bin_Data = "no" DB_User = "nagios" DB_Name = "user" DB_Pass = "name" DB_Host = "localhost" Dummy_Hostname = "dummy" 3. # cat /usr/local/nagios/bin/perfparse_nagios_pipe_command.pl #! /usr/bin/perl -w use strict; my $file = shift @ARGV; open FH, ">$file" or die "'$file' could not be opened for appending\n"; print FH join("\t", @ARGV); print FH "\n"; close FH; system ('/usr/local/nagios/bin/perfparse-log2mysql --serviceperf-log /usr/local/nagios/var/perfdata-service.pipe'); ---- And it will certainly work! Cheers, Pavol Glen Kelly wrote: > Hi > > I have read all the doco I have found about install PerfParse but am > unable to get it to work using the pipe method on Red Hat Linux. > > I am using the perfparse_nagios_pipe_command.pl as I not sure about how > to use the Nagios 2.0b4 pipe capability. > > However I can't get it to work, it seems like the > perfparse_nagios_pipe_command.pl cannot place data onto the pipe, when I > try to run the perfparse_nagios_pipe_command.pl command manually with > the appropriate arguements the script just hangs. > > By the way I create the pipe file manually using the mkfifo command and > it appears to have the correct ownership and permissions. > > Any ideas? > > Is there a comprehensive install doco of installing PerfParse on Nagios 2? > > Glen -- ___________________________________________________________________ [Pavol Luptak, ICZ a.s.] [Pavol.Luptak@i.cz] [tel: +420(2)44100726] |