Nagios & MySQL

Pascal pascal at qflex.nl
Mon Oct 25 11:32:41 CEST 2004


Hi,

I've installed Nagios 1.2 with MySQL support. I've compiled it in with 
MySQL support and configured stuff in resources.cfg and cgi.cfg. However 
no data gets inserted into the servicedowntime and hostdowntime tables. 
All other tables seem to work just fine though.

When doing an availability report it seems to get all data from the 
archives (nagios.log) directory.

Anyone knows what this may be?


My compile options:

./configure  --prefix=/usr/local/nagios --with-cgiurl=/cgi-bin 
--with-htmurl= --with-nagios-user=nagios --with-nagios-grp=nagios -
-with-gd-lib=/usr/lib --with-gd-inc=/usr/include --with-perlcache 
--with-mysql-xdata --with-mysql-lib=/usr/local/mysql/lib/mysql/ --
with-mysql-inc=/usr/local/mysql/include/ --with-mysql-status 
--with-mysql-comments --with-mysql-extinfo --with-mysql-retention --wit
h-mysql-downtime

(as I understand --with-mysql-xdata should suffice)

>From cgi.cfg:

# DG EXTENDED DATA
# Note: These config directives are only used if you compiled
# in database support for extended data!
# The user you specify here only needs SELECT privileges on the 
# 'hostextinfo' table in the database.

xeddb_host=localhost
xeddb_port=3306
xeddb_database=nagios
xeddb_username=nagios_view
xeddb_password=xxxx



# DB STATUS DATA (Read-Only For CGIs)
# Note: These config directives are only used if you compiled
# in database support for status data!
# The user you specify here only needs SELECT privileges on the 
# 'programstatus', 'hoststatus', and 'servicestatus' tables
# in the database, as these values are only used by the CGIs.
# The core program will read the directives you specify in
# in a resource file.

xsddb_host=localhost
xsddb_port=3306
xsddb_database=nagios
xsddb_username=nagios_view
xsddb_password=xxxx



# DB COMMENT DATA (Read-Only For CGIs)
# Note: These config directives are only used if you compiled
# in database support for comment data!
# The user you specify here only needs SELECT privileges on the 
# 'hostcomments', and 'servicecomments' tables in the database,
# as these values are only used by the CGIs.  The core program 
# will read the directives you specify in a resource file.

xcddb_host=localhost
xcddb_port=3306
xcddb_database=nagios
xcddb_username=nagios_view
xcddb_password=xxxxx



# DB DOWNTIME DATA (Read-Only For CGIs)
# Note: These config directives are only used if you compiled
# in database support for downtime data!
# The user you specify here only needs SELECT privileges on the 
# 'hostdowntime', and 'servicedowntime' tables in the database,
# as these values are only used by the CGIs.  The core program 
# will read the directives you specify in a resource file.

xdddb_host=localhost
xdddb_port=3306
xdddb_database=nagios
xdddb_username=nagios_view
xdddb_password=xxxx

>From resources.cfg:

# DB STATUS DATA
# Note: These config directives are only used if you compiled
# in database support for status data!
# The user you specify here needs SELECT, INSERT, UPDATE, and
# DELETE privileges on the 'programstatus', 'hoststatus',
# and 'servicestatus' tables in the database.

xsddb_host=localhost
xsddb_port=3306
xsddb_database=nagios
xsddb_username=nagios
xsddb_password=xxxxxx
xsddb_optimize_data=1
xsddb_optimize_interval=3600


# DB COMMENT DATA
# Note: These config directives are only used if you compiled
# in database support for comment data!
# The user you specify here needs SELECT, INSERT, UPDATE, and
# DELETE privileges on the 'hostcomments' and 'servicecomments'
# tables in the database.

xcddb_host=localhost
xcddb_port=3306
xcddb_database=nagios
xcddb_username=nagios
xcddb_password=xxxxx
xcddb_optimize_data=1



# DB DOWNTIME DATA
# Note: These config directives are only used if you compiled
# in database support for downtime data!
# The user you specify here needs SELECT, INSERT, UPDATE, and
# DELETE privileges on the 'hostdowntime' and 'servicedowntime'
# tables in the database.

xdddb_host=localhost
xdddb_port=3306
xdddb_database=nagios
xdddb_username=nagios
xdddb_password=xxxx
xdddb_optimize_data=1


# DB RETENTION DATA
# Note: These config directives are only used if you compiled
# in database support for retention data!
# The user you specify here needs SELECT, INSERT, UPDATE, and
# DELETE privileges on the 'programretention', 'hostretention',
# and 'serviceretention' tables in the database.

xrddb_host=localhost
xrddb_port=3306
xrddb_database=nagios
xrddb_username=nagios
xrddb_password=xxxx
xrddb_optimize_data=1


The nagios user has full (select, insert, update, delete) rights on the 
database. The nagios_view user has only select rights.


Does ayone have any clue?


Thanks in advance


Pascal





-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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