using mysql

Arnar Thorarinsson art at caa.is
Mon May 9 19:41:25 CEST 2005


Hi Trevor
Check out fruity at http://fruity.nakedgeek.com/ 
It uses mysql to store your config and creates the config files for you.
You can also import your old *.cfg files.

Works well for me ( nagios 2.0b3 )



On Mon, 2005-05-09 at 17:09, Trevor Cullingsworth wrote:
> Hi Marc,
> 
> Thank you for the reply and info.
> 
> This explains why I could not find any info on how to do this on the
> internet or archives.
> 
> Thank you.
> 
> Trevor Cullingsworth
> 
> 
> 
> Marc Powell wrote: 
> >   
> > > -----Original Message-----
> > > From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> > > admin at lists.sourceforge.net] On Behalf Of Trevor Cullingsworth
> > > Sent: Friday, May 06, 2005 7:19 PM
> > > To: nagios-users at lists.sourceforge.net
> > > Subject: [Nagios-users] using mysql
> > > 
> > > Hi all,
> > > 
> > > Does anyone have a document on how to set up nagios to use mysql for
> > >     
> > 
> > its
> >   
> > > config files?
> > >     
> > 
> > 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.
> > 
> >   
> > > 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
> > >     
> > 
> > was
> >   
> > > 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.
> > >     
> > 
> > If
> >   
> > > I change an IP address of a host I want to check in the mysql
> > >     
> > 
> > database,
> >   
> > > nagios still continues to check the IP address of the host  that is
> > > configured in the hosts.cfg file for example.
> > >     
> > 
> > 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.
> > 
> >   
> > > 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
> > >     
> > 
> > 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.
> >  
> >   
> > > How can I get nagios to use the hosts, contactgroup, etc. from the
> > >     
> > 
> > mysql
> >   
> > > database instead of the *.cfg files under the Nagios home etc
> > >     
> > 
> > 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 http://www.necitguy.com/?r
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> > ::: Messages without supporting info will risk being sent to /dev/null
> >   
-- 
Kveðja
Arnar Þórarinsson

Tölvunarfræðingur
Kerfisdeild
Sími : 569 4289
GSM  : 861 2871
----------------------
Flugmálastjórn Íslands
Reykjavíkurflugvöllur
121 Reykjavík
http://www.caa.is
----------------------



-------------------------------------------------------
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 http://www.necitguy.com/?r=20
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list