Page 1 of 1
MySQL Access?
Posted: Mon Mar 12, 2012 10:38 am
by tftu
Dear All,
I'm new to Nagios. My recent project need to retrieve data from a SNMP device, and I found Nagios is an very useful tool, the MIB file is already in the correct location and I can read the data through SNMP Walk. However, although I know MySQL is the default storage, I cannot find the ID/Password for me to access the nagios table in MySQL. Is NDOUtils a must for MySQL? I thought the data will be automatically stored in MySQL, is it correct?
Any advise/instruction is more than welcome! Oh! I'm using the VMware image downloaded from Nagios.org. Thanks in advance!
-tftu
Re: MySQL Access?
Posted: Mon Mar 12, 2012 11:36 am
by lmiltchev
Did you reset your mysql root password? If you haven't, the default one is "nagiosxi", so you should be able to log into mysql with it:
Then you can view the databases by running:
You can reset the mysql root password by running:
Code: Select all
# mysqladmin -u root -p'nagiosxi' password NEWPASSWORD
If you do so, make sure you edit the "automysqlbackup" file by entering the correct mysql root password:
Code: Select all
# vi /root/scripts/automysqlbackup
Hope this helps.
Re: MySQL Access?
Posted: Mon Mar 12, 2012 9:33 pm
by tftu
Dear lmiltchev,
Many thanks for the prompt reply. It's really helpful and now we can access the table on the VM. However, we found all ports of the VM are restriected except port 80 and port 22 (SSH). For our development convenience, port 3306 and port 23 should be open. Your further advise is highly appreciate. (Yes, we are also new to Linux world...).
-tftu
Re: MySQL Access?
Posted: Tue Mar 13, 2012 1:37 am
by tftu
Hi! All,
MySQL Access issue solved(as well as the questions for port open)! Many thanks!
Now our question is, how does nagios save the data? Automatically? How can I map the OID/Data value, and the table name/fields in MySQL? Any configuration is required? Should we config it through "SNMP Walk"? Thanks again!
-tftu
Re: MySQL Access?
Posted: Tue Mar 13, 2012 9:48 am
by scottwilkerson
MySQL data is not available through SNMP...
Nagios XI has about 88 tables in the database for just the configuration management and another 60 for core.
You can feel free to dig through the databases on your system to find what you are looking for, however there isn't really any way for us to give you a map of how all this is stored.
On top of all this information, much of the performance data is stored in RRD files...