mySQL+Nagios noob, thanks for reading

Dan Dycus ddycus at gmail.com
Fri Apr 29 20:59:02 CEST 2005


Hey all-

I'm brand new to this list, and I'm hoping you folks can help.  I have
used Nagios 1.2 now for quite some time watching 949 services on over
180 hosts today WITHOUT mySQL.  My challenge is to get nagios compiled
to run on mySQL and use Cacti to perform historical monitoring
functions.  Here's what I've done so far:

1. setup a test Suse 9 box.
2. installed Nagios and mySQL along with all required dependancies as
far as I can tell since everything compiled without problems.
3. created the databases within mySQL by first executing mysql, and
then running the following:
   a. mysqladmin -u root -p  create nagios (leaving the password
blank) thus creating the database within mySQL
   b. then I ran "mysql> use nagios" to set the database, and ran
"source create_mysql.sql" to setup the table space.
   c. I checked my work this way: 

mysql> use nagios
Database changed
mysql> show tables;
+------------------+
| Tables_in_nagios |
+------------------+
| hostdowntime     |
| hostextinfo      |
| hostretention    |
| hoststatus       |
| programretention |
| programstatus    |
| servicecomments  |
| servicedowntime  |
| serviceextinfo   |
| serviceretention |
| servicestatus    |
+------------------+
11 rows in set (0.01 sec)

mysql>
   d. I also ran a GRANT command to allow both "root" and "nagios"
access to the nagios at localhost database.
4. I compiled nagios this way "./configure --with-mysql-xdata", and
everything flew by telling me finish the install by running "make
all".
5. After running make all, I get the output from that script ending
with the word ENJOY!
6. I set apache for the CGIs and Alias's as I thought appropriate:

ScriptAlias /nagios/cgi-bin/ "/usr/local/nagios/sbin/"

Alias /nagios/ "/usr/local/nagios/share/"
Alias /nagios "/usr/local/nagios/share/"

<Directory "/usr/local/nagios/sbin">
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
    Options ExecCGI
</Directory>

<Directory "/usr/local/nagios/share">
    AllowOverride AuthConfig
    order allow,deny
    allow from all
    Options ExecCGI
</Directory>

7. Checked permissions on /usr/local/nagios/etc/ and a couple other
places against my working non-mySQL server and all appears to be
equal.
8. I fire up apache, fire up mysqld and fire up nagios after running
-v to check for errors.  All checks pass, with 0 errors.

Now for the problems...

9. Apache can display the Nagios web interface, but displays the
classic "Whoops! Error: Could not read host and service status
information!" which I thought was a permissions related problem, but I
can't recall.  But now that this data should be in mySQL, I'm sure
there is something I need to do there in order for it to function but
for the life of me I can't find any info.
10. When I open mySQL, and run "SELCET * FROM hoststatus;" it returns
Emty Set and puts me back to the prompt.  EVERY table space shows
empty set for that matter. ??? :(

If anyone can help me here I'd really appreciate it.

Thanks for reading!

-----------------------
The mailing list archive is found here:
http://www.nagiosexchange.org/nagios-users.34.0.html


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





More information about the Users mailing list