Page 1 of 1

Access Nagios Availability via JDBC for External Reporting

Posted: Mon Jul 11, 2016 11:17 pm
by romoval
Dear all:

Can I still access Nagios XI raw data using JDBC connections to MySQL?

Is this something being deprecated or would continue to be supported and the underlying data model published, so I can build my reports using another report building tool?

On which port the OOB MySQL database is running, so I can try connecting via JDBC?

Where the Nagios XI data model is document, so I can build my availability reports?

I can see via ps -ef the MySQL processes running on memory and the error log file states that the process is listening on port 3306, but still I cannot see that port listening from the Nagios Linux VM (using either netstat or a telnet localhost 3306).

Thanks.

Re: Access Nagios Availability via JDBC for External Reporti

Posted: Tue Jul 12, 2016 10:14 am
by mcapra
romoval wrote:Can I still access Nagios XI raw data using JDBC connections to MySQL?
This is not something we officially support, but there's nothing really stopping you from doing it. Just be aware that direct database manipulation can be harmful to your Nagios XI installation :)

The default credentials for the MySQL root user created by the Nagios XI installation are root:nagiosxi. I would suggest creating a separate read-only MySQL user for the JDBC.
romoval wrote:On which port the OOB MySQL database is running, so I can try connecting via JDBC?
By defaut, MySQL/MariaDB binds to 3306. You may need to make proper adjustments to your iptables and firewalld configuration to allow inbound connections on that port.
romoval wrote:Where the Nagios XI data model is document, so I can build my availability reports?
Historical data, such as host/service status and performance data, is kept primarily in Round Robin Database files created by RRDTools. These files are located at /usr/local/nagios/share/perfdata by default. There is some uptime information presented in the nagios.nagios_logentries table, but the bulk of the historical data is in the perfdata folder.