From: John C. <po...@ya...> - 2005-09-15 14:35:51
|
Hi Gurus, I'm trying to integrate nagios and perfparse using Method 1: Periodic Nagios Log Parse. (I've abandoned pipes for now.) As far as I know, MySQL, perfparsed, and Nagios are all running fine. When I try to perfparse-log2mysql the following error is recorded: foohost:/usr/local/nagios/bin # ./perfparse-log2mysql -e log2mysql.error -r foohost:/usr/local/nagios/bin # echo $? 1 foohost:/usr/local/nagios/bin # tail log2mysql.error.20050915.log 2005/09/15 10:09:41 [ storage.c:95 113 ] storage_mysql module successfully loaded 2005/09/15 10:10:32 [ dbms.c:306 113 ] INSERT INTO perfdata_registry (host,rkey, rvalue,ctime) VALUES ('dummy','pp/perfparse/version', '0.105.6', FROM_UNIXTIME(1126793381)) (Lock wait timeout exceeded; try restarting transaction) I've tried restarting services, stop/starting mysql, but the error persists. This host is not a busy box. Mysql is dedicated to perfparse. Is this a bug? Any suggestions are greatly appreciated! BTW: Does anyone have perfparse with nagios working on Solaris 9 using ANY method? Care to share your exact configs? I'm going nutty with this stuff. Nagios 2.0b4 # ./configure --with-command-group=nobody --enable-embedded-perl --with-perlcache --with-file-perfdata PerfParse v0.105.6 Solaris 9 112233-12 ################################## BACKGROUND: ################################## START DATABASE: foohost:/usr/local/nagios # /usr/local/mysql/bin/mysqld_safe & [1] 29613 foohost:/usr/local/nagios # Starting mysqld daemon with databases from /usr/local/mysql/var ################################## LOGIN TO DATABASE: foohost:/usr/local/nagios # mysql --user=perfparse -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.1.14-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> ################################## CHECK DATABASE: mysql> use perfparse Database changed mysql> show tables; +---------------------------------+ | Tables_in_perfparse | +---------------------------------+ | perfdata_bin_summary | | perfdata_bin_summary_data | | perfdata_bin_summary_del_policy | | perfdata_bin_summary_header | | perfdata_delete_policy | | perfdata_graphs | | perfdata_host | | perfdata_host_group | | perfdata_prefs | | perfdata_raw_summary | | perfdata_raw_summary_data | | perfdata_registry | | perfdata_service | | perfdata_service_bin | | perfdata_service_metric | | perfdata_service_raw | | perfdata_state | | perfdata_users | +---------------------------------+ 18 rows in set (0.00 sec) mysql> describe -> perfdata_service; +------------------------+--------------------------------+------+-----+----------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------------+--------------------------------+------+-----+----------+-------+ | service_id | int(11) | | UNI | 0 | | | host_name | varchar(75) | | PRI | | | | service_description | varchar(75) | | PRI | | | | last_perfdata_raw | int(11) | YES | MUL | NULL | | | raw_delete_policy | int(11) | YES | | NULL | | | raw_delete_policy_name | varchar(20) | YES | MUL | NULL | | | raw_delete_policy_type | enum('template','user','host') | | | template | | | is_deleted | tinyint(4) | YES | | 0 | | +------------------------+--------------------------------+------+-----+----------+-------+ 8 rows in set (0.00 sec) mysql> select host_name -> from perfdata_service; Empty set (0.00 sec) ################################## START PERFPARSED: foohost:/usr/local/nagios # ./bin/perfparsed -e pperror -d foohost:/usr/local/nagios # echo $? 0 foohost:/usr/local/nagios # ps -ef | grep perfparsed root 29649 1 9 10:00:15 ? 0:09 ./bin/perfparsed -e pperror -d root 29654 28005 0 10:00:24 pts/2 0:00 grep perfparsed foohost:/usr/local/nagios # tail var/pperror.20050915.log 2005/09/15 10:00:15 [perfparsed.c:176 29649 ] Perfparsed successfully daemonized (pid=29649) 2005/09/15 10:00:15 [ storage.c:95 29649 ] storage_mysql module successfully loaded 2005/09/15 10:00:15 [ storage.c:264 29652 ] Perfparsed : periodic cleanup ################################## START NAGIOS: foohost:/usr/local/nagios # /etc/init.d/nagios start Starting network monitor: nagios foohost:/usr/local/nagios # echo $? 0 foohost:/usr/local/nagios # ps -ef | grep nagios nagios 29683 1 0 10:01:23 ? 0:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg root 29705 28005 0 10:01:43 pts/2 0:00 grep nagios foohost:/usr/local/nagios # tail var/nagios.log [1126792883] Nagios 2.0b4 starting... (PID=29682) [1126792883] LOG VERSION: 2.0 [1126792883] Finished daemonizing... (New PID=29683) ################################## VERIFY PERFORMANCE DATA IS BEING PRODUCED: foohost:/usr/local/nagios/var # tail perfdata-service.log [SERVICEPERFDATA] 1126792913 foohost CPU Load 0.083 0.108 CPU Load 2% (15 min average) '15 min avg Load'=2%;90;98;0;100 [SERVICEPERFDATA] 1126792923 foohost Check disk via NRPE 0.082 0.048 DISK OK - free space: / 1790 MB (92%): /usr 3436 MB (70%): /var 3966 MB (86%): /tmp 19510 MB (100%): /opt 4841 MB (98%): /dev_backup 25811 MB (87%): /ora 4352 MB (11%): /export/home 1811 MB (93%): /=148MB;1744;1841;0;1938 /usr=1487MB;4429;4675;0;4922 /var=655MB;4158;4389;0;4621 /tmp=11MB;17568;18544;0;19521 /opt=82MB;4429;4675;0;4922 /dev_back [SERVICEPERFDATA] 1126792923 foohost PING 4.033 0.138 PING OK - Packet loss = 0%, RTA = 0.00 ms [SERVICEPERFDATA] 1126792933 foohost Check disk via NRPE 0.082 0.257 DISK OK - free space: / 1789 MB (92%): /usr 2682 MB (54%): /var 1371 MB (30%): /tmp 21153 MB (100%): /opt 1620 MB (33%): /export/home 1519 MB (78%): /=150MB;1744;1841;0;1938 /usr=2240MB;4429;4675;0;4922 /var=3250MB;4158;4389;0;4621 /tmp=9MB;19044;20102;0;21161 /opt=3302MB;4429;4675;0;4922 /export/home=420MB;1744;1841;0;1938 [SERVICEPERFDATA] 1126792933 foohost Check disk via NRPE 0.081 0.007 DISK OK - free space: / 1786 MB (92%): /usr 8099 MB (82%): /var 14202 MB (98%): /tmp 14617 MB (100%): /opt 12460 MB (84%): /export/home 6550 MB (67%): /=152MB;1744;1841;0;1938 /usr=1745MB;8858;9350;0;9843 /var=265MB;13019;13742;0;14466 /tmp=8MB;13162;13893;0;14625 /opt=2306MB;13289;14027;0;14766 /export/home=3294MB;8858;9350;0;9843 [SERVICEPERFDATA] 1126792943 foohost Check disk via NRPE 0.082 0.178 DISK WARNING - free space: / 1688 MB (28%): /var 1175 MB (59%): /tmp 8904 MB (96%): /dev_backup 14673 MB (43%): /backup2 3043 MB (75%): /ora 698 MB (7%): /var/mqm 3991 MB (99%): /=4360MB;5442;5744;0;6047 /var=830MB;1804;1904;0;2005 /tmp=336MB;8316;8778;0;9240 /dev_backup=19515MB;30769;32478;0;34188 /backup2=989MB;3627;3829;0;4031 /ora=9382MB;9 [SERVICEPERFDATA] 1126792943 foohost Check disk via NRPE 0.080 0.127 DISK OK - free space: / 4782 MB (97%): /usr 4580 MB (66%): /var 12334 MB (90%): /tmp 38579 MB (100%): /opt 7796 MB (99%): /export/home 3896 MB (99%): /=145MB;4434;4680;0;4927 /usr=2315MB;6205;6550;0;6895 /var=1398MB;12357;13044;0;13731 /tmp=9MB;34728;36657;0;38587 /opt=88MB;7094;7488;0;7883 /export/home=49MB;3549;3746;0;3944 [SERVICEPERFDATA] 1126792953 foohost SSH 0.045 0.076 SSH OK - OpenSSH_4.0 (protocol 2.0) [SERVICEPERFDATA] 1126792953 foohost Service-A 7.004 0.171 HTTP OK HTTP/1.1 200 OK - 6.969 second response time time=6.968852s;7.000000;15.000000;0.000000 size=1181B;;;0 [SERVICEPERFDATA] 1126792953 foohost SSH 0.047 0.026 SSH OK - OpenSSH_4.0 (protocol 2.0) ################################## So at this point, MySQL is running, perfparsed is running, and Nagios is running. Nagios is logging performance data to /usr/local/nagios/var/perfdata-service.log foohost:/usr/local/nagios # cd bin foohost:/usr/local/nagios/bin # ./perfparse-log2mysql -e log2mysql.error -r foohost:/usr/local/nagios/bin # echo $? 1 foohost:/usr/local/nagios/bin # tail log2mysql.error.20050915.log 2005/09/15 10:09:41 [ storage.c:95 113 ] storage_mysql module successfully loaded 2005/09/15 10:10:32 [ dbms.c:306 113 ] INSERT INTO perfdata_registry (host,rkey, rvalue,ctime) VALUES ('dummy','pp/perfparse/version', '0.105.6', FROM_UNIXTIME(1126793381)) (Lock wait timeout exceeded; try restarting transaction) __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |