<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Marc,<br>
<br>
Thank you for the reply and info.<br>
<br>
This explains why I could not find any info on how to do this on the
internet or archives.<br>
<br>
Thank you.<br>
<br>
Trevor Cullingsworth<br>
<br>
<br>
<br>
Marc Powell wrote:
<blockquote
cite="midA7B0A9F02975A74A845FE85D0B95B8FA6A0FBF@misex01.ena.com"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:nagios-users-admin@lists.sourceforge.net">nagios-users-admin@lists.sourceforge.net</a> [<a class="moz-txt-link-freetext" href="mailto:nagios-users">mailto:nagios-users</a>-
<a class="moz-txt-link-abbreviated" href="mailto:admin@lists.sourceforge.net">admin@lists.sourceforge.net</a>] On Behalf Of Trevor Cullingsworth
Sent: Friday, May 06, 2005 7:19 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>
Subject: [Nagios-users] using mysql
Hi all,
Does anyone have a document on how to set up nagios to use mysql for
</pre>
</blockquote>
<pre wrap=""><!---->its
</pre>
<blockquote type="cite">
<pre wrap="">config files?
</pre>
</blockquote>
<pre wrap=""><!---->
It's not possible and would require large code changes. As database
support has been removed entirely from the core 2.0 code, this is
unlikely to happen. If you have any questions about that, there's plenty
of discussion of it in the archives.
</pre>
<blockquote type="cite">
<pre wrap="">Right now, I have nagios 1.2 compiled with mysql support. I also have
Nagmin running and I have mysql set up. When I configured Nagmin, I
</pre>
</blockquote>
<pre wrap=""><!---->was
</pre>
<blockquote type="cite">
<pre wrap="">able to populate a mysql database that I called "nagios" from info
extrapolated from the nagios .cfg files - hosts.cfg, hostgroups.cfg,
contactgroups.cfg, etc.
I want to have nagios check against this database for its monitoring
rather than use the flat .cfg files. I have not gotten this to work.
</pre>
</blockquote>
<pre wrap=""><!---->If
</pre>
<blockquote type="cite">
<pre wrap="">I change an IP address of a host I want to check in the mysql
</pre>
</blockquote>
<pre wrap=""><!---->database,
</pre>
<blockquote type="cite">
<pre wrap="">nagios still continues to check the IP address of the host that is
configured in the hosts.cfg file for example.
</pre>
</blockquote>
<pre wrap=""><!---->
Nagios 1.x only uses the database for status data, not configuration
data, excepting hostextinfo and serviceextinfo definitions. Any changes
you make with Nagmin must be exported to flat file and Nagios reloaded.
</pre>
<blockquote type="cite">
<pre wrap="">I have the following set up in nagios.cfg:
xdddb_host=localhost
xdddb_port=3306
xdddb_username=nagios
xdddb_password=********
xdddb_database=nagios
And I have the following set up in cgi.cfg:
nagios_check_command=/usr/bin/perl
/usr/local/nagios/libexec/check_mysql
However, when I look at nagios from my browser it is giving me the
following:
Process Status Information
Process Status: UNKNOWN
Check Command Output: Nagios check command did not return any
</pre>
</blockquote>
<pre wrap=""><!---->output
You should be using check_nagios_db.pl. check_mysql does not return the
correct information for the nagios_check_command. This is unrelated to
your original request.
</pre>
<blockquote type="cite">
<pre wrap="">How can I get nagios to use the hosts, contactgroup, etc. from the
</pre>
</blockquote>
<pre wrap=""><!---->mysql
</pre>
<blockquote type="cite">
<pre wrap="">database instead of the *.cfg files under the Nagios home etc
</pre>
</blockquote>
<pre wrap=""><!---->directory?
Again, you cannot. Nagmin may store it's information in the DB but it
must be exported to flat-file and nagios reloaded for changes to be
seen.
--
Marc
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit <a class="moz-txt-link-freetext" href="http://www.necitguy.com/?r">http://www.necitguy.com/?r</a>
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
</pre>
</blockquote>
</body>
</html>