Monitoring multiple ports/services

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Monitoring multiple ports/services

Post by fsodah »

What would be the best to monitor such a node running multiple services, I would like to include all these ports in under one IP without using an agent on the server, i want to know if they are up listening or not.

Host is up (0.000019s latency).
Nmap scan report for server (x.x.x.x)
Host is up (0.00065s latency).
Not shown: 994 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
3306/tcp open mysql
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Monitoring multiple ports/services

Post by mbellerue »

There are plugins that come with Nagios XI that will check these services from the Nagios server, without querying an agent.

check_ssh
check_http (for both http and https)
check_mysql

If you have non-standard services that are binding to those ports, you could write a simple plugin that uses nmap to see if the port is open, open/filtered, or closed.

As an example, here is the check_http command in action.

Code: Select all

/usr/local/nagios/libexec/check_http -H www.nagios.com -p 443 --ssl
That will reach out to http://www.nagios.com, and check to make sure it responds to HTTPS on port 443.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Monitoring multiple ports/services

Post by fsodah »

I will try it on Monday and get back to you. Thank You
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Monitoring multiple ports/services

Post by mbellerue »

Alright, sounds good. We will be here.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Monitoring multiple ports/services

Post by fsodah »

Done ... due to urgent request i made it today
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring multiple ports/services

Post by lmiltchev »

I was going to add that you could use check_tcp (actually for all these ports), but it seems you already figured this out. Let us know if you have any further questions. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Monitoring multiple ports/services

Post by fsodah »

Many thanks please close the ticket
Locked