[Pkg-nagios-devel] Bug#284599: nagios-common: status file search in fs with nagios-mysql

karoly.vegh@uta.at, 284599@bugs.debian.org karoly.vegh@uta.at, 284599@bugs.debian.org
Tue, 7 Dec 2004 13:58:57 +0100


Package: nagios-common
Severity: important


I'm running debian sarge.

atsrvlx02-new:~# dpkg -l | fgrep -e nagios -e mysql
ii  libdbd-mysql-p 2.9003-3       A Perl5 database interface to the MySQL data
ii  libmysqlclient 3.23.56-2      LGPL-licensed client library for MySQL datab
ii  libmysqlclient 3.23.56-2      LGPL-licensed client development files for M
ii  libmysqlclient 4.0.21-7       mysql database client library
ii  mysql-admin    1.0.12-1       GUI tool for intuitive MySQL administration
ii  mysql-admin-co 1.0.12-1       Architecture independent files for MySQL Adm
ii  mysql-client   4.0.21-7       mysql database client binaries
ii  mysql-common   4.0.21-6       mysql database common files (e.g. /etc/mysql
ii  mysql-doc      4.0.21-2       mysql database documentation
ii  mysql-server   4.0.21-7       mysql database server binaries
ii  nagios-common  1.3-0+pre4     A host/service/network monitoring and manage
ii  nagios-mysql   1.3-0+pre4     A host/service/network monitoring and manage
ii  nagios-plugins 1.3.1.0-12     Plugins for the nagios network monitoring an
ii  php4-mysql     4.3.9-1        MySQL module for php4
ii  python-mysqldb 1.1.6-1        A Python interface to MySQL
atsrvlx02-new:~# 

atsrvlx02-new:~# /etc/init.d/nagios reload 
Reloading nagios configuration files.
Not running.
atsrvlx02-new:~# 

though:

atsrvlx02-new:~# ps faux | grep nagios
root      8619  0.0  0.0  1580  468 pts/7    S+   13:45   0:00                  \_ grep nagios
nagios    2054  0.0  0.0  2620 1208 ?        SNs  13:01   0:00 /usr/sbin/nagios /etc/nagios/nagios.cfg
atsrvlx02-new:~#

The initscript searches for /var/log/nagios/status.log

atsrvlx02-new:~# namei /var/log/nagios/status.log
f: /var/log/nagios/status.log
 d /
 d var
 d log
 d nagios
 ? status.log - No such file or directory (2)
atsrvlx02-new:~#

AFAIK the status is writte into the db:

#######################
atsrvlx02-new:/usr/share/doc/nagios-mysql# mysql nagios_db
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6097 to server version: 4.0.21-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show tables;
+---------------------+
| Tables_in_nagios_db |
+---------------------+
| hostcomments        |
| hostdowntime        |
| hostextinfo         |
| hostretention       |
| hoststatus          |
| programretention    |
| programstatus       |
| servicecomments     |
| servicedowntime     |
| serviceextinfo      |
| serviceretention    |
| servicestatus       |
+---------------------+
12 rows in set (0.00 sec)

mysql> select * from programstatus ; 
+---------------------+---------------------+-------------+------------+---------------------+---------------------+------------------------+-------------------------------+
----------------------+----------------------+-----------------------+----------------------+---------------------------+--------------------------+
| last_update         | program_start       | daemon_mode | nagios_pid | last_command_check  | last_log_rotation   | execute_service_checks | accept_passive_service_checks |
enable_event_handlers | obsess_over_services | enable_flap_detection | enable_notifications | enable_failure_prediction | process_performance_data |
+---------------------+---------------------+-------------+------------+---------------------+---------------------+------------------------+-------------------------------+
----------------------+----------------------+-----------------------+----------------------+---------------------------+--------------------------+
| 2004-12-07 13:48:50 | 2004-12-07 13:02:05 |           0 |       2054 | 2004-12-07 13:48:49 | 1970-01-01 01:00:00 |                      1 |                             1 |
                    1 |                    0 |                     0 |                    1 |                         1 |                        0 |
+---------------------+---------------------+-------------+------------+---------------------+---------------------+------------------------+-------------------------------+
----------------------+----------------------+-----------------------+----------------------+---------------------------+--------------------------+
1 row in set (0.00 sec)

mysql>

#####################


for more information feel free to contact me at: charlie@uta.at


wbr

charlie

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.9
Locale: LANG=en_GB, LC_CTYPE=en_GB

-- 
 - Because it messes up the order in which you normally read text.
 - Why is top-posting such a bad idea?
 - Top-posting.
 - What is the most annoying thing on Usenet?