How can we monitor database with dynamic port

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

How can we monitor database with dynamic port

Post by progressive.nagiosXI »

Here we have scenario in one of our customer that they have dynamic port using in database that they want to monitor is therr any way we can do it
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How can we monitor database with dynamic port

Post by cdienger »

Do you want to make sure the port is reachable or is it enough that the database process is up?

You can use NCPA to make sure the process is running:

https://www.nagios.org/ncpa/help.php#ap ... -processes

Going a step further you could also create a script that checks that the process is up and listening on a port. On a Linux system:

netstat -nap | grep mysqld | grep tcp

would return information about the port that mysqld is listening on. Details on writing custom plugins can be found at https://nagios-plugins.org/doc/guidelines.html and a tutorial at https://exchange.nagios.org/directory/T ... pt/details.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked