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" |