Database support

jason jchambers at shaw.ca
Fri Nov 7 17:52:00 CET 2003


----- Original Message ----- 
From: Tory Skyers
To: nagios-users at lists.sourceforge.net
Sent: Friday, November 07, 2003 8:15 AM
Subject: [Nagios-users] Database support


How Many people are actually using database support? I'm running into an
issue where nagios is not writing its information to the database and it's
not writing it to text files, and I'm wondering if the database support is
worth the trouble. The service binds up and locks the machine. I can't seem
to find any real help on the syntax in the config files to tell it to write
to the database instead of the text files. I have configured the lines in
the cgi.cfg but what do I tell nagios.cfg to read and write to the database?
It would be nice to have so I can build my own reporting engine to mine the
data from a database rather than text files.

Tory Skyers
Network Administrator
Prudential Fox & Roach
610-993-1327
tskyers at foxroach.com


If you are using a single host add all the switches while running configure:
(make sure to do a 'make clean')

mysql info follows...


./configure --prefix=/usr/local/nagios \
              --with-htmurl=/nagios \
              --with-nagios-user=nagios \
              --with-nagios-grp=nagios \
              --with-mysql-xdata \
              --with-mysql-downtime \
              --with-mysql-comments \
              --with-mysql-status \
              --with-mysql-retention \
              --with-mysql-extinfo \
              --with-mysql-inc=/usr/include/mysql \
              --with-mysql-lib=/usr/lib/mysql

adjust where needed.

cgi.cfg:
xeddb_host=localhost
xeddb_port=3306
xeddb_database=nagios
xeddb_username=db-user
xeddb_password=db-passwd
xsddb_host=localhost
xsddb_port=3306
xsddb_database=nagios
xsddb_username=db-user
xsddb_password=db-passwd
xcddb_host=localhost
xcddb_port=3306
xcddb_database=nagios
xcddb_username=db-user
xcddb_password=db-passwd
xdddb_host=localhost
xdddb_port=3306
xdddb_database=nagios
xdddb_username=db-user
xdddb_password=db-passwd

resource.cfg:

xsddb_host=localhost
xsddb_port=3306
xsddb_database=nagios
xsddb_username=db-user
xsddb_password=db-pass
xsddb_optimize_data=1
xsddb_optimize_interval=3600
xcddb_host=localhost
xcddb_port=3306
xcddb_database=nagios
xcddb_username=db-user
xcddb_password=db-pass
xcddb_optimize_data=1
xdddb_host=localhost
xdddb_port=3306
xdddb_database=nagios
xdddb_username=db-user
xdddb_password=db-pass
xdddb_optimize_data=1
xrddb_host=localhost
xrddb_port=3306
xrddb_database=nagios
xrddb_username=db-user
xrddb_password=db-pass
xrddb_optimize_data=1

more info here :http://nagios.sourceforge.net/docs/1_0/xdata-db.html


also:
make sure you can access the nagios database/tables with the username and
password in these config files via command line.

good luck,
Jason.




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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