From: James T. <ja...@nt...> - 2007-03-02 21:47:47
|
Hi i just installed perfparse so that i can use it with oreon. Problem is after i install it it doesn't see any of the nagios host groups i have or hosts. Here's how i installed everything from scratch. Went to Nagios-2.7 ./configure --enable-embedded-perl --with-perlcache --disable-statuswrl --with-default-perfdata make all make install make install-config make install-init make install-commandcmd that installed everything in /usr/local/nagios got perf parse .105.6 ./configure --prefix=/usr/local/nagios --with-imagedir=/usr/local/nagios/share/images/ --with-cgidir=/usr/local/nagios/sbin --with-http_image_path=/nagios/images make make install cat mysql_create.sql | mysql -u root -p nagios double checked the table to make sure everything was there. changed the perfparse.sh.example to perfparse.sh and perfparse.cfg.example to perfparse.cfg commented couple lines outta misccommand.cfg went to nagios.cfg cfg_file=/usr/local/nagios/etc/nagios_perfparse.cfg process_performance_data=1 host_perfdata_ command=process-host-perfdata service_ perfdata_command=process-service-perfdata nagios_perfparse.cfg define command{ command_name process-service-perfdata command_line $USER2$/bin/perfparse_nagios_pipe_command.pl $USER2$/var/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" } I set the db name and host name and all that good stuff and make sure it can at least get in. I logged into the webpage and it's there and everything. restarted nagios with it embedded on the menu I go there to see statistics on servers but it doesn't list any. Help? |
From: James T. <ja...@nt...> - 2007-03-05 19:25:30
|
James Tran wrote: > Hi i just installed perfparse so that i can use it with oreon. > > Problem is after i install it it doesn't see any of the nagios host > groups i have or hosts. > > Here's how i installed everything from scratch. > > Went to Nagios-2.7 > > ./configure --enable-embedded-perl --with-perlcache --disable-statuswrl > --with-default-perfdata > make all > make install > make install-config > make install-init > make install-commandcmd > > that installed everything in /usr/local/nagios > > got perf parse .105.6 > ./configure --prefix=/usr/local/nagios > --with-imagedir=/usr/local/nagios/share/images/ > --with-cgidir=/usr/local/nagios/sbin --with-http_image_path=/nagios/images > make > make install > > cat mysql_create.sql | mysql -u root -p nagios > double checked the table to make sure everything was there. > changed the perfparse.sh.example to perfparse.sh and > perfparse.cfg.example to perfparse.cfg > > commented couple lines outta misccommand.cfg > > went to nagios.cfg > > cfg_file=/usr/local/nagios/etc/nagios_perfparse.cfg > process_performance_data=1 host_perfdata_ > command=process-host-perfdata service_ > perfdata_command=process-service-perfdata > > > nagios_perfparse.cfg > > define command{ > command_name process-service-perfdata > command_line $USER2$/bin/perfparse_nagios_pipe_command.pl $USER2$/var/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" > } > > I set the db name and host name and all that good stuff and make sure it can at least get in. > I logged into the webpage and it's there and everything. > > > restarted nagios with it embedded on the menu > > I go there to see statistics on servers but it doesn't list any. > Help? > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Perfparse-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-users > Ok so here's the deal i got a little farther I changed some stuff and my parseperf.cfg look as follows: Server_Port = 1976 Service_Log = "/usr/local/nagios/var/service-perfdata.dat" 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 = "/usr/local/nagios/var/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" Server_Port = "1976" Use_Storage_Mysql = "yes" No_Raw_Data = "no" No_Bin_Data = "no" DB_User = "xxx" DB_Name = "xxx" DB_Pass = "xxx" DB_Host = "127.0.0.1" Dummy_Hostname = "dummy" i got to the /nagiosroot/bin/ shell> /usr/local/nagios/bin# ./perfparse-log2mysql -r +-----------------------------+ +-----------------------------+ | Generic statistics | | Nb Log Lines : 1 | | Nb lines parsed : 0 | | Nb lines dropped : 0 | | Start date : 2007-03-05 | | Elapsed time : 00:00:00 | | Start time : 11:23:07 | | Rate : (line/sec) 0.00 | +-----------------------------+ +-----------------------------+ +-----------------------------+ +-----------------------------+ | MySQL storage statistics | | | | New Hosts : 0 | | Metric/line : 0.00 | | New Metrics : 0 | | Metrics Recorded : 0 | | New Services : 0 | | Summary Rec Added : 0 | | New Summary Group : 0 | | SQL Queries : 19 | +-----------------------------+ +-----------------------------+ So in other word it looks like i it's reading nothing and inserting nothing. I have no idea why. Any suggestions as where to look? I need help bad thx. ./ |
From: Florian G. <fl...@bi...> - 2007-03-05 22:32:54
|
There are some different possibilities how to setup perfparse. One is to give perfparse the data via the nagios command, one is to let perfparse read the nagios perfdata log constantly and one is to let nagios write to a named pipe and perfparse reads that pipe. All have its pros and cons. As far as i can see you have mixed the pipe way with the second way and you tried to look at the stats with the first way. The easiest way to setup is to use the first way. Just try to change the nagios command to use perfparse_nagios_command.pl (not perfparse_nagios_pipe_command.pl), and if your database connection works it should all work - if not, try to undo config file changes. If you encounter performance problems with this way, you should try the pipe thing - read the docs for that. Flo James Tran wrote: > James Tran wrote: >> Hi i just installed perfparse so that i can use it with oreon. >> >> Problem is after i install it it doesn't see any of the nagios host >> groups i have or hosts. >> >> Here's how i installed everything from scratch. >> >> Went to Nagios-2.7 >> >> ./configure --enable-embedded-perl --with-perlcache --disable-statuswrl >> --with-default-perfdata >> make all >> make install >> make install-config >> make install-init >> make install-commandcmd >> >> that installed everything in /usr/local/nagios >> >> got perf parse .105.6 >> ./configure --prefix=/usr/local/nagios >> --with-imagedir=/usr/local/nagios/share/images/ >> --with-cgidir=/usr/local/nagios/sbin --with-http_image_path=/nagios/images >> make >> make install >> >> cat mysql_create.sql | mysql -u root -p nagios >> double checked the table to make sure everything was there. >> changed the perfparse.sh.example to perfparse.sh and >> perfparse.cfg.example to perfparse.cfg >> >> commented couple lines outta misccommand.cfg >> >> went to nagios.cfg >> >> cfg_file=/usr/local/nagios/etc/nagios_perfparse.cfg >> process_performance_data=1 host_perfdata_ >> command=process-host-perfdata service_ >> perfdata_command=process-service-perfdata >> >> >> nagios_perfparse.cfg >> >> define command{ >> command_name process-service-perfdata >> command_line $USER2$/bin/perfparse_nagios_pipe_command.pl $USER2$/var/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" >> } >> >> I set the db name and host name and all that good stuff and make sure it can at least get in. >> I logged into the webpage and it's there and everything. >> >> >> restarted nagios with it embedded on the menu >> >> I go there to see statistics on servers but it doesn't list any. >> Help? >> >> >> >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Perfparse-users mailing list >> Per...@li... >> https://lists.sourceforge.net/lists/listinfo/perfparse-users >> > Ok so here's the deal i got a little farther > > I changed some stuff and my parseperf.cfg look as follows: > > Server_Port = 1976 > Service_Log = "/usr/local/nagios/var/service-perfdata.dat" > 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 = "/usr/local/nagios/var/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" > Server_Port = "1976" > Use_Storage_Mysql = "yes" > No_Raw_Data = "no" > No_Bin_Data = "no" > DB_User = "xxx" > DB_Name = "xxx" > DB_Pass = "xxx" > DB_Host = "127.0.0.1" > Dummy_Hostname = "dummy" > > i got to the /nagiosroot/bin/ > shell> /usr/local/nagios/bin# ./perfparse-log2mysql -r > +-----------------------------+ +-----------------------------+ > | Generic statistics | | Nb Log Lines : 1 | > | Nb lines parsed : 0 | | Nb lines dropped : 0 | > | Start date : 2007-03-05 | | Elapsed time : 00:00:00 | > | Start time : 11:23:07 | | Rate : (line/sec) 0.00 | > +-----------------------------+ +-----------------------------+ > > +-----------------------------+ +-----------------------------+ > | MySQL storage statistics | | | > | New Hosts : 0 | | Metric/line : 0.00 | > | New Metrics : 0 | | Metrics Recorded : 0 | > | New Services : 0 | | Summary Rec Added : 0 | > | New Summary Group : 0 | | SQL Queries : 19 | > +-----------------------------+ +-----------------------------+ > > So in other word it looks like i it's reading nothing and inserting > nothing. I have no idea why. > Any suggestions as where to look? I need help bad thx. > > > ./ > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Perfparse-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-users > |
From: James T. <ja...@nt...> - 2007-03-05 22:51:24
|
Florian Gleixner wrote: > There are some different possibilities how to setup perfparse. One is to > give perfparse the data via the nagios command, one is to let perfparse > read the nagios perfdata log constantly and one is to let nagios write > to a named pipe and perfparse reads that pipe. All have its pros and > cons. As far as i can see you have mixed the pipe way with the second > way and you tried to look at the stats with the first way. > > The easiest way to setup is to use the first way. Just try to change the > nagios command to use perfparse_nagios_command.pl (not > perfparse_nagios_pipe_command.pl), and if your database connection works > it should all work - if not, try to undo config file changes. > If you encounter performance problems with this way, you should try the > pipe thing - read the docs for that. > > Flo > > > James Tran wrote: > >> James Tran wrote: >> >>> Hi i just installed perfparse so that i can use it with oreon. >>> >>> Problem is after i install it it doesn't see any of the nagios host >>> groups i have or hosts. >>> >>> Here's how i installed everything from scratch. >>> >>> Went to Nagios-2.7 >>> >>> ./configure --enable-embedded-perl --with-perlcache --disable-statuswrl >>> --with-default-perfdata >>> make all >>> make install >>> make install-config >>> make install-init >>> make install-commandcmd >>> >>> that installed everything in /usr/local/nagios >>> >>> got perf parse .105.6 >>> ./configure --prefix=/usr/local/nagios >>> --with-imagedir=/usr/local/nagios/share/images/ >>> --with-cgidir=/usr/local/nagios/sbin --with-http_image_path=/nagios/images >>> make >>> make install >>> >>> cat mysql_create.sql | mysql -u root -p nagios >>> double checked the table to make sure everything was there. >>> changed the perfparse.sh.example to perfparse.sh and >>> perfparse.cfg.example to perfparse.cfg >>> >>> commented couple lines outta misccommand.cfg >>> >>> went to nagios.cfg >>> >>> cfg_file=/usr/local/nagios/etc/nagios_perfparse.cfg >>> process_performance_data=1 host_perfdata_ >>> command=process-host-perfdata service_ >>> perfdata_command=process-service-perfdata >>> >>> >>> nagios_perfparse.cfg >>> >>> define command{ >>> command_name process-service-perfdata >>> command_line $USER2$/bin/perfparse_nagios_pipe_command.pl $USER2$/var/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" >>> } >>> >>> I set the db name and host name and all that good stuff and make sure it can at least get in. >>> I logged into the webpage and it's there and everything. >>> >>> >>> restarted nagios with it embedded on the menu >>> >>> I go there to see statistics on servers but it doesn't list any. >>> Help? >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to share your >>> opinions on IT & business topics through brief surveys-and earn cash >>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>> _______________________________________________ >>> Perfparse-users mailing list >>> Per...@li... >>> https://lists.sourceforge.net/lists/listinfo/perfparse-users >>> >>> >> Ok so here's the deal i got a little farther >> >> I changed some stuff and my parseperf.cfg look as follows: >> >> Server_Port = 1976 >> Service_Log = "/usr/local/nagios/var/service-perfdata.dat" >> 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 = "/usr/local/nagios/var/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" >> Server_Port = "1976" >> Use_Storage_Mysql = "yes" >> No_Raw_Data = "no" >> No_Bin_Data = "no" >> DB_User = "xxx" >> DB_Name = "xxx" >> DB_Pass = "xxx" >> DB_Host = "127.0.0.1" >> Dummy_Hostname = "dummy" >> >> i got to the /nagiosroot/bin/ >> shell> /usr/local/nagios/bin# ./perfparse-log2mysql -r >> +-----------------------------+ +-----------------------------+ >> | Generic statistics | | Nb Log Lines : 1 | >> | Nb lines parsed : 0 | | Nb lines dropped : 0 | >> | Start date : 2007-03-05 | | Elapsed time : 00:00:00 | >> | Start time : 11:23:07 | | Rate : (line/sec) 0.00 | >> +-----------------------------+ +-----------------------------+ >> >> +-----------------------------+ +-----------------------------+ >> | MySQL storage statistics | | | >> | New Hosts : 0 | | Metric/line : 0.00 | >> | New Metrics : 0 | | Metrics Recorded : 0 | >> | New Services : 0 | | Summary Rec Added : 0 | >> | New Summary Group : 0 | | SQL Queries : 19 | >> +-----------------------------+ +-----------------------------+ >> >> So in other word it looks like i it's reading nothing and inserting >> nothing. I have no idea why. >> Any suggestions as where to look? I need help bad thx. >> >> >> ./ >> >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Perfparse-users mailing list >> Per...@li... >> https://lists.sourceforge.net/lists/listinfo/perfparse-users >> >> See i don't get how to check it then if i'm trying to do it the piped way. The install guide doesn't tell me anyway to check it except by running ./perfparse-log2mysql -r I want to be able to get this thing to work with oreon and well i think if i can get it to work ANY WAY i'll be fine. Here's what i've done for the configs I have no idea how to check it besides going to the /cgi-bin/nagios/perfparse.cgi and checking it but according the the cgi it still isn't working If you could give me some idea of how i can troubleshoot errors with this i'd be grateful. or highlight some trouble areas. This is me trying to set it up in pipe mode so if u can kinda guide me into pipe mode config that'd be great. *nagios.cfg:* host_perfdata_file=/usr/local/nagios/var/host-perfdata.dat service_perfdata_file=/usr/local/nagios/var/service-perfdata.dat service_perfdata_command=process-service-perfdata host_perfdata_command=process-host-perfdata host_perfdata_file_template=$TIMET$ $HOSTNAME$ $HOSTCHECKCOMMAND$ $HOSTOUTPUT$ $ HOSTSTATE$ $HOSTPERFDATA$ service_perfdata_file_template=$TIMET$ $HOSTNAME$ $SERVICEDESC$ $SERVICEOUTPUT$ $SERVICESTATE$ $SERVICEPERFDATA$ host_perfdata_file_processing_interval=10 service_perfdata_file_processing_interval=10 #host_perfdata_file_processing_command=process-host-perfdata #service_perfdata_file_processing_command=process-service-perfdata *misccommand.cfg* define command{ command_name process-service-perfdata command_line $USER2$/bin/perfparse_nagios_pipe_command.pl /usr/local/nagio s/var/rw/service-perfdata.dat "$TIMET$" "$HOSTNAME$" "$HOSTCHECKCOMMAND$" "$HOST OUTPUT$" "$HOSTSTATE$" "$HOSTPERFDATA$" } define command{ command_name process-host-perfdata command_line $USER2$/bin/perfparse_nagios_pipe_command.pl /usr/local/nagio s/var/rw/host-perfdata.dat "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$SERVICEOUTPU T$" "$SERVICESTATE$" "$PERFDATA$" *perfparse.cfg* Server_Port = 1976 Service_Log = "|/usr/local/nagios/var/service-perfdata.dat" Service_Log_Position_Mark_Path = "-" Error_Log = "perfparse.log" Error_Log_Rotate = "Yes" Error_Log_Keep_N_Days = "7" Drop_File = "/usr/local/nagios/var/perfparse.drop" Drop_File_Rotate = "Yes" Drop_File_Keep_N_Days = "7" Lock_File = "/var/lock/perfparse.lock" Show_Status_Bar = "Yes" Do_Report = "Yes" 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" Server_Port = "1976" Use_Storage_Mysql = "yes" No_Raw_Data = "no" No_Bin_Data = "no" DB_User = "xxx" DB_Name = "xxx" DB_Pass = "xxx" DB_Host = "localhost" Dummy_Hostname = "dummy" Storage_Modules_Load = "mysql" |
From: Florian G. <fl...@bi...> - 2007-03-05 23:29:33
|
O.K. let's try: - do you have perfparsed running? - you can check the error log. In your config it is set to "perfparse.log". Use a absolute path if you cannot find that file. - Is /usr/local/nagios/var/service-perfdata.dat a pipe? If it is a file, it will not work. move the file away. As far as i remember perfparsed recreates the pipe at startup. Here's my config of a testing system: Nagios command: command_line /usr/local/nagios/bin/perfparse_nagios_pipe_command.pl /usr/local/nagios/va r/serviceperf.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$SERVICEOUTPUT$" "$SERVICESTATE$" "$SERVI CEPERFDATA$" } perfparse.cfg: Service_Log = "|/usr/local/nagios/var/serviceperf.log" Service_Log_Position_Mark_Path = "no" Error_Log = "/usr/local/nagios/var/perfparse.log" Error_Log_Rotate = "Yes" Drop_File = "/tmp/perfparse.drop" Drop_File_Rotate = "Yes" Lock_File = "/var/lock/perfparse.lock" Nagios_Lock = "/usr/local/nagios/var/nagios.lock" Show_Status_Bar = "no" Do_Report = "no" Default_user_permissions_Policy = "rw" Default_user_permissions_Host_groups = "rw" Output_Log_File = "yes" Output_Log_Filename = "/usr/local/nagios/var/perfparse_output_log" Output_Log_Rotate = "yes" No_Raw_Data = "no" No_Bin_Data = "no" DB_User = "nagiostat" DB_Name = "nagiostat" DB_Pass = "nagiostat" DB_Host = "127.0.0.1" This is my perfparsed startfile: #! /bin/sh # ### BEGIN INIT INFO # Provides: perfparsed # Required-Start: $local_fs $remote_fs $syslog # Required-Stop: # Default-Start: 2 3 5 # Default-Stop: # Description: Start the perfparse daemon. ### END INIT INFO PPPIPE=/usr/local/nagios/var/serviceperf.log case "$1" in start) if [ -f $PPPIPE ] ; then echo "creating pipe" mv $PPPIPE ${PPPIPE}.old mkfifo $PPPIPE chown nagios2:nagios2 $PPPIPE APPLY_OLD_DATA=1 fi echo "Starting perfparsed" /usr/local/nagios/bin/perfparsed -d if [ "$APPLY_OLD_DATA" ] ; then echo "applying old data" cat ${PPPIPE}.old >> $PPPIPE fi ;; stop) killproc perfparsed ;; *) echo "Usage: $0 {start|stop}" exit 1 esac Flo James Tran wrote: > See i don't get how to check it then if i'm trying to do it the piped > way. The install guide doesn't tell me anyway to check it except by > running ./perfparse-log2mysql -r > I want to be able to get this thing to work with oreon and well i think > if i can get it to work ANY WAY i'll be fine. > > Here's what i've done for the configs > I have no idea how to check it besides going to the > /cgi-bin/nagios/perfparse.cgi and checking it but according the the cgi > it still isn't working > If you could give me some idea of how i can troubleshoot errors with > this i'd be grateful. or highlight some trouble areas. This is me trying > to set it up in pipe mode so if u can kinda guide me into pipe mode > config that'd be great. > > > > *nagios.cfg:* > > host_perfdata_file=/usr/local/nagios/var/host-perfdata.dat > service_perfdata_file=/usr/local/nagios/var/service-perfdata.dat > service_perfdata_command=process-service-perfdata > host_perfdata_command=process-host-perfdata > host_perfdata_file_template=$TIMET$ $HOSTNAME$ $HOSTCHECKCOMMAND$ > $HOSTOUTPUT$ $ > HOSTSTATE$ $HOSTPERFDATA$ > service_perfdata_file_template=$TIMET$ $HOSTNAME$ $SERVICEDESC$ > $SERVICEOUTPUT$ > $SERVICESTATE$ $SERVICEPERFDATA$ > host_perfdata_file_processing_interval=10 > service_perfdata_file_processing_interval=10 > #host_perfdata_file_processing_command=process-host-perfdata > #service_perfdata_file_processing_command=process-service-perfdata > > *misccommand.cfg* > > define command{ > command_name process-service-perfdata > command_line $USER2$/bin/perfparse_nagios_pipe_command.pl > /usr/local/nagio > s/var/rw/service-perfdata.dat "$TIMET$" "$HOSTNAME$" > "$HOSTCHECKCOMMAND$" "$HOST > OUTPUT$" "$HOSTSTATE$" "$HOSTPERFDATA$" > } > define command{ > command_name process-host-perfdata > command_line $USER2$/bin/perfparse_nagios_pipe_command.pl > /usr/local/nagio > s/var/rw/host-perfdata.dat "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" > "$SERVICEOUTPU > T$" "$SERVICESTATE$" "$PERFDATA$" > > *perfparse.cfg* > Server_Port = 1976 > Service_Log = "|/usr/local/nagios/var/service-perfdata.dat" > Service_Log_Position_Mark_Path = "-" > Error_Log = "perfparse.log" > Error_Log_Rotate = "Yes" > Error_Log_Keep_N_Days = "7" > Drop_File = "/usr/local/nagios/var/perfparse.drop" > Drop_File_Rotate = "Yes" > Drop_File_Keep_N_Days = "7" > Lock_File = "/var/lock/perfparse.lock" > Show_Status_Bar = "Yes" > Do_Report = "Yes" > 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" > Server_Port = "1976" > Use_Storage_Mysql = "yes" > No_Raw_Data = "no" > No_Bin_Data = "no" > DB_User = "xxx" > DB_Name = "xxx" > DB_Pass = "xxx" > DB_Host = "localhost" > Dummy_Hostname = "dummy" > Storage_Modules_Load = "mysql" > > > |
From: James T. <ja...@nt...> - 2007-03-06 00:20:50
|
Florian Gleixner wrote: > O.K. let's try: > > - do you have perfparsed running? > - you can check the error log. In your config it is set to > "perfparse.log". Use a absolute path if you cannot find that file. > - Is /usr/local/nagios/var/service-perfdata.dat a pipe? If it is a file, > it will not work. move the file away. As far as i remember perfparsed > recreates the pipe at startup. > > Here's my config of a testing system: > > Nagios command: > > command_line > /usr/local/nagios/bin/perfparse_nagios_pipe_command.pl /usr/local/nagios/va > r/serviceperf.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" > "$SERVICEOUTPUT$" "$SERVICESTATE$" "$SERVI > CEPERFDATA$" > } > > perfparse.cfg: > > Service_Log = "|/usr/local/nagios/var/serviceperf.log" > Service_Log_Position_Mark_Path = "no" > Error_Log = "/usr/local/nagios/var/perfparse.log" > Error_Log_Rotate = "Yes" > Drop_File = "/tmp/perfparse.drop" > Drop_File_Rotate = "Yes" > > Lock_File = "/var/lock/perfparse.lock" > > Nagios_Lock = "/usr/local/nagios/var/nagios.lock" > > > Show_Status_Bar = "no" > > Do_Report = "no" > > > Default_user_permissions_Policy = "rw" > Default_user_permissions_Host_groups = "rw" > > > Output_Log_File = "yes" > Output_Log_Filename = > "/usr/local/nagios/var/perfparse_output_log" > Output_Log_Rotate = "yes" > > No_Raw_Data = "no" > No_Bin_Data = "no" > > DB_User = "nagiostat" > DB_Name = "nagiostat" > DB_Pass = "nagiostat" > DB_Host = "127.0.0.1" > > > This is my perfparsed startfile: > > #! /bin/sh > # > ### BEGIN INIT INFO > # Provides: perfparsed > # Required-Start: $local_fs $remote_fs $syslog > # Required-Stop: > # Default-Start: 2 3 5 > # Default-Stop: > # Description: Start the perfparse daemon. > ### END INIT INFO > > > PPPIPE=/usr/local/nagios/var/serviceperf.log > > case "$1" in > start) > if [ -f $PPPIPE ] ; then > echo "creating pipe" > mv $PPPIPE ${PPPIPE}.old > mkfifo $PPPIPE > chown nagios2:nagios2 $PPPIPE > APPLY_OLD_DATA=1 > fi > echo "Starting perfparsed" > /usr/local/nagios/bin/perfparsed -d > if [ "$APPLY_OLD_DATA" ] ; then > echo "applying old data" > cat ${PPPIPE}.old >> $PPPIPE > fi > ;; > stop) > killproc perfparsed > ;; > *) > echo "Usage: $0 {start|stop}" > exit 1 > esac > > Flo > > James Tran wrote: > >> See i don't get how to check it then if i'm trying to do it the piped >> way. The install guide doesn't tell me anyway to check it except by >> running ./perfparse-log2mysql -r >> I want to be able to get this thing to work with oreon and well i think >> if i can get it to work ANY WAY i'll be fine. >> >> Here's what i've done for the configs >> I have no idea how to check it besides going to the >> /cgi-bin/nagios/perfparse.cgi and checking it but according the the cgi >> it still isn't working >> If you could give me some idea of how i can troubleshoot errors with >> this i'd be grateful. or highlight some trouble areas. This is me trying >> to set it up in pipe mode so if u can kinda guide me into pipe mode >> config that'd be great. >> >> >> >> *nagios.cfg:* >> >> host_perfdata_file=/usr/local/nagios/var/host-perfdata.dat >> service_perfdata_file=/usr/local/nagios/var/service-perfdata.dat >> service_perfdata_command=process-service-perfdata >> host_perfdata_command=process-host-perfdata >> host_perfdata_file_template=$TIMET$ $HOSTNAME$ $HOSTCHECKCOMMAND$ >> $HOSTOUTPUT$ $ >> HOSTSTATE$ $HOSTPERFDATA$ >> service_perfdata_file_template=$TIMET$ $HOSTNAME$ $SERVICEDESC$ >> $SERVICEOUTPUT$ >> $SERVICESTATE$ $SERVICEPERFDATA$ >> host_perfdata_file_processing_interval=10 >> service_perfdata_file_processing_interval=10 >> #host_perfdata_file_processing_command=process-host-perfdata >> #service_perfdata_file_processing_command=process-service-perfdata >> >> *misccommand.cfg* >> >> define command{ >> command_name process-service-perfdata >> command_line $USER2$/bin/perfparse_nagios_pipe_command.pl >> /usr/local/nagio >> s/var/rw/service-perfdata.dat "$TIMET$" "$HOSTNAME$" >> "$HOSTCHECKCOMMAND$" "$HOST >> OUTPUT$" "$HOSTSTATE$" "$HOSTPERFDATA$" >> } >> define command{ >> command_name process-host-perfdata >> command_line $USER2$/bin/perfparse_nagios_pipe_command.pl >> /usr/local/nagio >> s/var/rw/host-perfdata.dat "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" >> "$SERVICEOUTPU >> T$" "$SERVICESTATE$" "$PERFDATA$" >> >> *perfparse.cfg* >> Server_Port = 1976 >> Service_Log = "|/usr/local/nagios/var/service-perfdata.dat" >> Service_Log_Position_Mark_Path = "-" >> Error_Log = "perfparse.log" >> Error_Log_Rotate = "Yes" >> Error_Log_Keep_N_Days = "7" >> Drop_File = "/usr/local/nagios/var/perfparse.drop" >> Drop_File_Rotate = "Yes" >> Drop_File_Keep_N_Days = "7" >> Lock_File = "/var/lock/perfparse.lock" >> Show_Status_Bar = "Yes" >> Do_Report = "Yes" >> 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" >> Server_Port = "1976" >> Use_Storage_Mysql = "yes" >> No_Raw_Data = "no" >> No_Bin_Data = "no" >> DB_User = "xxx" >> DB_Name = "xxx" >> DB_Pass = "xxx" >> DB_Host = "localhost" >> Dummy_Hostname = "dummy" >> Storage_Modules_Load = "mysql" >> >> >> >> Ok I reset everything according to your specs i noticed a couple of funny things. The log file doesn't come out at perfparse.log it comes out as perfparse.log.20070305.log and perfparse.drop come out as perfparse.drop.20070305.log 2007/03/05 08:08:23 [perfparsed.c:176 13199 ] Perfparsed successfully daemonized (pid=13199) 2007/03/05 08:08:23 [ storage.c:95 13199 ] storage_mysql module successfully loaded 2007/03/05 08:08:24 [ storage.c:264 13202 ] Perfparsed : periodic cleanup 2007/03/05 08:08:24 [clean_tools.c:101 13202 ] Could not open directory '/tmp/perfparse.drop' dunno if that's effecting anything but i also get the following errors in the log file: I removed the service-perfdata.dat file and let it create a new pipe there perfparsed is running* *shell>:/usr/local/nagios/etc# ps -e|grep perfparsed 13199 ? 00:00:00 perfparsed* misccommands.cfg has the following *define command{ command_name process-service-perfdata command_line /usr/local/nagios/bin/perfparse_nagios_pipe_command.pl / usr/local/nagios/var/service-perfdata.dat "$TIMET$" "$HOSTNAME$" "$HOSTCHECKCOMM AND$" "$HOSTOUTPUT$" "$HOSTSTATE$" "$PERFDATA$*" * *nagios.cfg has the following* process_performance_data=1 host_perfdata_command=process-host-perfdata service_perfdata_command=process-service-perfdata *perfparse.cfg has the following:* Server_Port = 1976 Service_Log = "|/usr/local/nagios/var/service-perfdata.dat" Service_Log_Position_Mark_Path = "no" 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 = "yes" 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" Server_Port = "1976" Use_Storage_Mysql = "yes" No_Raw_Data = "no" No_Bin_Data = "no" DB_User = "xxx" DB_Name = "xxx" DB_Pass = "xxx" DB_Host = "localhost" Dummy_Hostname = "dummy" Storage_Modules_Load = "mysql"* * By the way i appreciate you helping out with this i'm sure you're pretty busy and all. |
From: James T. <ja...@nt...> - 2007-03-06 20:48:10
|
Florian Gleixner wrote: > Good morning, > > so, is it running now? > > Flo > > James Tran wrote: > >> Florian Gleixner wrote: >> >>> O.K. let's try: >>> >>> - do you have perfparsed running? >>> - you can check the error log. In your config it is set to >>> "perfparse.log". Use a absolute path if you cannot find that file. >>> - Is /usr/local/nagios/var/service-perfdata.dat a pipe? If it is a file, >>> it will not work. move the file away. As far as i remember perfparsed >>> recreates the pipe at startup. >>> >>> Here's my config of a testing system: >>> >>> Nagios command: >>> >>> command_line >>> /usr/local/nagios/bin/perfparse_nagios_pipe_command.pl >>> /usr/local/nagios/va >>> r/serviceperf.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" >>> "$SERVICEOUTPUT$" "$SERVICESTATE$" "$SERVI >>> CEPERFDATA$" >>> } >>> >>> perfparse.cfg: >>> >>> Service_Log = "|/usr/local/nagios/var/serviceperf.log" >>> Service_Log_Position_Mark_Path = "no" >>> Error_Log = "/usr/local/nagios/var/perfparse.log" >>> Error_Log_Rotate = "Yes" >>> Drop_File = "/tmp/perfparse.drop" >>> Drop_File_Rotate = "Yes" >>> >>> Lock_File = "/var/lock/perfparse.lock" >>> >>> Nagios_Lock = "/usr/local/nagios/var/nagios.lock" >>> >>> >>> Show_Status_Bar = "no" >>> >>> Do_Report = "no" >>> >>> >>> Default_user_permissions_Policy = "rw" >>> Default_user_permissions_Host_groups = "rw" >>> >>> >>> Output_Log_File = "yes" >>> Output_Log_Filename = >>> "/usr/local/nagios/var/perfparse_output_log" >>> Output_Log_Rotate = "yes" >>> >>> No_Raw_Data = "no" >>> No_Bin_Data = "no" >>> >>> DB_User = "nagiostat" >>> DB_Name = "nagiostat" >>> DB_Pass = "nagiostat" >>> DB_Host = "127.0.0.1" >>> >>> >>> This is my perfparsed startfile: >>> >>> #! /bin/sh >>> # >>> ### BEGIN INIT INFO >>> # Provides: perfparsed >>> # Required-Start: $local_fs $remote_fs $syslog >>> # Required-Stop: >>> # Default-Start: 2 3 5 >>> # Default-Stop: >>> # Description: Start the perfparse daemon. >>> ### END INIT INFO >>> >>> >>> PPPIPE=/usr/local/nagios/var/serviceperf.log >>> >>> case "$1" in >>> start) >>> if [ -f $PPPIPE ] ; then >>> echo "creating pipe" >>> mv $PPPIPE ${PPPIPE}.old >>> mkfifo $PPPIPE >>> chown nagios2:nagios2 $PPPIPE >>> APPLY_OLD_DATA=1 >>> fi >>> echo "Starting perfparsed" >>> /usr/local/nagios/bin/perfparsed -d >>> if [ "$APPLY_OLD_DATA" ] ; then >>> echo "applying old data" >>> cat ${PPPIPE}.old >> $PPPIPE >>> fi >>> ;; >>> stop) >>> killproc perfparsed >>> ;; >>> *) >>> echo "Usage: $0 {start|stop}" >>> exit 1 >>> esac >>> >>> Flo >>> >>> James Tran wrote: >>> >>> >>>> See i don't get how to check it then if i'm trying to do it the piped >>>> way. The install guide doesn't tell me anyway to check it except by >>>> running ./perfparse-log2mysql -r >>>> I want to be able to get this thing to work with oreon and well i think >>>> if i can get it to work ANY WAY i'll be fine. >>>> >>>> Here's what i've done for the configs >>>> I have no idea how to check it besides going to the >>>> /cgi-bin/nagios/perfparse.cgi and checking it but according the the cgi >>>> it still isn't working >>>> If you could give me some idea of how i can troubleshoot errors with >>>> this i'd be grateful. or highlight some trouble areas. This is me trying >>>> to set it up in pipe mode so if u can kinda guide me into pipe mode >>>> config that'd be great. >>>> >>>> >>>> >>>> *nagios.cfg:* >>>> >>>> host_perfdata_file=/usr/local/nagios/var/host-perfdata.dat >>>> service_perfdata_file=/usr/local/nagios/var/service-perfdata.dat >>>> service_perfdata_command=process-service-perfdata >>>> host_perfdata_command=process-host-perfdata >>>> host_perfdata_file_template=$TIMET$ $HOSTNAME$ $HOSTCHECKCOMMAND$ >>>> $HOSTOUTPUT$ $ >>>> HOSTSTATE$ $HOSTPERFDATA$ >>>> service_perfdata_file_template=$TIMET$ $HOSTNAME$ $SERVICEDESC$ >>>> $SERVICEOUTPUT$ >>>> $SERVICESTATE$ $SERVICEPERFDATA$ >>>> host_perfdata_file_processing_interval=10 >>>> service_perfdata_file_processing_interval=10 >>>> #host_perfdata_file_processing_command=process-host-perfdata >>>> #service_perfdata_file_processing_command=process-service-perfdata >>>> >>>> *misccommand.cfg* >>>> >>>> define command{ >>>> command_name process-service-perfdata >>>> command_line $USER2$/bin/perfparse_nagios_pipe_command.pl >>>> /usr/local/nagio >>>> s/var/rw/service-perfdata.dat "$TIMET$" "$HOSTNAME$" >>>> "$HOSTCHECKCOMMAND$" "$HOST >>>> OUTPUT$" "$HOSTSTATE$" "$HOSTPERFDATA$" >>>> } >>>> define command{ >>>> command_name process-host-perfdata >>>> command_line $USER2$/bin/perfparse_nagios_pipe_command.pl >>>> /usr/local/nagio >>>> s/var/rw/host-perfdata.dat "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" >>>> "$SERVICEOUTPU >>>> T$" "$SERVICESTATE$" "$PERFDATA$" >>>> >>>> *perfparse.cfg* >>>> Server_Port = 1976 >>>> Service_Log = >>>> "|/usr/local/nagios/var/service-perfdata.dat" >>>> Service_Log_Position_Mark_Path = "-" >>>> Error_Log = "perfparse.log" >>>> Error_Log_Rotate = "Yes" >>>> Error_Log_Keep_N_Days = "7" >>>> Drop_File = "/usr/local/nagios/var/perfparse.drop" >>>> Drop_File_Rotate = "Yes" >>>> Drop_File_Keep_N_Days = "7" >>>> Lock_File = "/var/lock/perfparse.lock" >>>> Show_Status_Bar = "Yes" >>>> Do_Report = "Yes" >>>> 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" >>>> Server_Port = "1976" >>>> Use_Storage_Mysql = "yes" >>>> No_Raw_Data = "no" >>>> No_Bin_Data = "no" >>>> DB_User = "xxx" >>>> DB_Name = "xxx" >>>> DB_Pass = "xxx" >>>> DB_Host = "localhost" >>>> Dummy_Hostname = "dummy" >>>> Storage_Modules_Load = "mysql" >>>> >>>> >>>> >>>> >>>> >> Ok >> >> I reset everything according to your specs >> >> i noticed a couple of funny things. >> The log file doesn't come out at perfparse.log >> it comes out as perfparse.log.20070305.log >> and perfparse.drop >> come out as perfparse.drop.20070305.log >> >> 2007/03/05 08:08:23 [perfparsed.c:176 13199 ] Perfparsed successfully >> daemonized (pid=13199) >> 2007/03/05 08:08:23 [ storage.c:95 13199 ] storage_mysql module >> successfully loaded >> 2007/03/05 08:08:24 [ storage.c:264 13202 ] Perfparsed : periodic >> cleanup >> 2007/03/05 08:08:24 [clean_tools.c:101 13202 ] Could not open >> directory '/tmp/perfparse.drop' >> >> dunno if that's effecting anything but i also get the following errors >> in the log file: >> >> >> I removed the service-perfdata.dat file and let it create a new pipe there >> perfparsed is running* >> *shell>:/usr/local/nagios/etc# ps -e|grep perfparsed >> 13199 ? 00:00:00 perfparsed* >> >> misccommands.cfg has the following >> >> *define command{ >> command_name process-service-perfdata >> command_line >> /usr/local/nagios/bin/perfparse_nagios_pipe_command.pl / >> usr/local/nagios/var/service-perfdata.dat "$TIMET$" "$HOSTNAME$" >> "$HOSTCHECKCOMM >> AND$" "$HOSTOUTPUT$" "$HOSTSTATE$" "$PERFDATA$*" >> >> * >> *nagios.cfg has the following* >> >> process_performance_data=1 >> host_perfdata_command=process-host-perfdata >> service_perfdata_command=process-service-perfdata >> >> *perfparse.cfg has the following:* >> >> Server_Port = 1976 >> Service_Log = "|/usr/local/nagios/var/service-perfdata.dat" >> Service_Log_Position_Mark_Path = "no" >> 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 = "yes" >> 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" >> Server_Port = "1976" >> Use_Storage_Mysql = "yes" >> No_Raw_Data = "no" >> No_Bin_Data = "no" >> DB_User = "xxx" >> DB_Name = "xxx" >> DB_Pass = "xxx" >> DB_Host = "localhost" >> Dummy_Hostname = "dummy" >> Storage_Modules_Load = "mysql"* >> * >> By the way i appreciate you helping out with this i'm sure you're pretty >> busy and all. >> >> >> Ok so obviously i can't get the piped way working. So... what i did is i just reconfigured EVERYTHING so i could do it with the default method or parsing the log file. So i recompiled nagios --with-file-perfdata then remade perfparse with the same data again tossed in the default .cfg files from nagios and perfparse so what i did this time instead is... set the performancedata to 1 on nagios.cfg added the following lines: xpdfile_host_perfdata_file=/usr/local/nagios/var/hostperf.log xpdfile_host_perfdata_template=$TIMET$\t$HOSTNAME$\t$OUTPUT$\t$PERFDATA$ xpdfile_service_perfdata_file=/usr/local/nagios/var/serviceperf.log xpdfile_service_perfdata_template=$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$OUTPUT$\t$SERVICESTATE$\t$PERFDATA$ change perfparse.cfg to have the following settings: # Server managment (perfparsed only) : # ==================================== Server_Port = 1976 # Parser managment : # ================== # Performance Data Log Files ("-" for stdin) : Service_Log = "/usr/local/nagios/var/service-perfdata.out" Service_Log_Position_Mark_Path = "/usr/local/nagios/var/rw" # Error handling : Error_Log = "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" and the rest is the same as before. i looked at the service-perfdata.out to make sure nagios was logging perf data and it is. no i goto ../bin/perfparse-log2mysql -r and i get: +-----------------------------+ +-----------------------------+ | Generic statistics | | Nb Log Lines : 1 | | Nb lines parsed : 0 | | Nb lines dropped : 0 | | Start date : 2007-03-06 | | Elapsed time : 00:00:00 | | Start time : 04:42:43 | | Rate : (line/sec) 0.00 | +-----------------------------+ +-----------------------------+ +-----------------------------+ +-----------------------------+ | MySQL storage statistics | | | | New Hosts : 0 | | Metric/line : 0.00 | | New Metrics : 0 | | Metrics Recorded : 0 | | New Services : 0 | | Summary Rec Added : 0 | | New Summary Group : 0 | | SQL Queries : 19 | +-----------------------------+ +-----------------------------+ Just like before. I checked the logs and nothing. Tho when i had the Mark_Path set to "-" it was complaining it wanted a write directory which i gave it and that error went away. I mean i am doing it in the first method correct aren't i? cause i thought i was doing it correct in pipe method and that didn't work. Anything obvious with like sql versions i should be aware of? I'm using mysql 5.5.032-7 Thanks Much, James |
From: Florian G. <fl...@bi...> - 2007-03-06 21:02:13
|
>Florian Gleixner wrote: >> Good morning, >> >> so, is it running now? >> >> Flo James Tran wrote: > Well i see the daemon running but i dont see it entering anything into > mysql > > I had already checked to see if it was even connecting to the correct > database by removing the username and password and then also changing > the database it was connecting to and it failed when i did that. > > So uh... i dunno why it's not entering anything > My last 3 ideas: - remove unused config vars in your perfparse.cfg. I'm not sure - would have to read the code - if config settings like Storage_Socket_Output_Port = "1974" Server_Port = "1976" overwrite the pipe settings. - check if the plugins return performance data. Run them by hand. A plugin that returns performance data should output things like this: /usr/local/nagios/libexec/check_disk -w 5% -c 2% -p / DISK OK - free space: / 360 MB (7% inode=-);| /=4643MB;4753;4903;0;5004 All after the "|" is performance data. - Some nagios variables have changed. nagios 1.X had $OUTPUT$ and $PERFDATA$ while they are renamed to $SERVICEOUTPUT$ and $SERVICEPERFDATA$ in nagios 2.X. Unfortunately the perfparse docs are old and badly maintained. Doublecheck your command definition. You could also try to use the perfparse_nagios_command.pl to write to a file and examine the file if it contains reasonable data. Flo |
From: James T. <ja...@nt...> - 2007-03-07 01:57:12
|
Florian Gleixner wrote: > James Tran wrote: > >> Ok Flo here is the last question i have for you. >> I cleared out nagios and perfparse and started from scratch again. >> >> did the install blah blah blah but i installed perfparse.106 instead >> this time >> >> now when i try to run ./perfparse-log2mysql with the perfparsed >> running i get the following in the log file: >> 2007/03/06 07:44:33 [perfparse-log2any.c:157 31469 ] FIFO not >> authorized as the perf data input source >> >> i've chmodded to 777 and still no go >> i've chowned nagios.nagios still no go >> i killed nagios and restarted it and made sure the file didn't appear >> and the started perfparsed and made sure it was a pipe file. >> tried again... still the same error. >> >> any quick fix? >> >> Thanks >> >> > > perfparse-log2mysql and perfparsed are two different things. They behave > different and are thought for different setups. Don't mix them. It is OK > for perfparse-log2mysql not to accept fifos i think - dont want to dig > in the source, it is 1:15 am here. > Really: Use exact the setup i mailed. Don't put any more options in > there. Check your plugins and nagios outputs. > > Flo > Just to let you know i solved my little problem. It was an oversight on my own part. Apparently i had pieces of an apt-get install of nagios2 on my system when i did the make install it had thrown in the mysql.so modules from perfparse into that folder instead of the source install i did of nagios2. For some reason the rest of the modules installed into the /usr/local/nagios folder however Anyhow thanks again for all the help previously i really appreciated it. So just a reference for apt users don't leave any remanants behind of nagios from apt |