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

VEGH Karoly VEGH Karoly <karoly.vegh@uta.at>, 284599@bugs.debian.org
Thu, 9 Dec 2004 13:10:48 +0100


hi,

I'm absolutley sorry, I did RTFM now awhile, and this problem is 
already documented and the fix for it you can find as a hint in the
/etc/nagios/cgi.cfg:

------------------------------
atsrvlx02-new:/etc/nagios# grep -B5 -A4 mysql cgi.cfg 
# Nagios.  Run the 'ps' command manually to see what the command
# line entry for the Nagios process looks like.

nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/log/nagios/status.log 5 'nagios'

# Note: If you use the mysql or pgsql nagios build, read
# /usr/share/doc/nagios-common/README.Debian what todo to let nagios
# CGI scripts detect nagios state.
 
# nagios_check_command=/etc/nagios/check_nagios_db
atsrvlx02-new:/etc/nagios# 
------------------------------

and in /usr/share/doc/nagios-common/README.Debian.gz under point 4.) it
is exactly written what and how to do to get this right.


sorry for wasting your time&resources,


charlie

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

On Tue, Dec 07, 2004 at 04:23:13PM +0100, sean finney wrote:
> tags 284599 pending
> thanks
> 
> i believe this problem is fixed in the version currently making its
> way through sid to sarge.  can you give that version a try and verify
> that it works?  if you don't want to bother with grabbing something
> from sid, you can either wait a week and a half for it to make
> its way to sarge, or i can send you the init script from the
> newest version.
> 
> 	sean
> 
> On Tue, Dec 07, 2004 at 01:58:57PM +0100, karoly.vegh@uta.at wrote:
> > 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?
> > 
> > 
> > _______________________________________________
> > Pkg-nagios-devel mailing list
> > Pkg-nagios-devel@lists.alioth.debian.org
> > http://lists.alioth.debian.org/mailman/listinfo/pkg-nagios-devel
> 
> --