Remote server monitoring ports
Posted: Wed Feb 22, 2012 12:28 pm
Hello,
We have setup Nagios XI and are liking it very much. It has enabled us to monitor through firewalls by NATing ports to NSClient++. One issue we have is with monitoring multiple hosts behind the same firewall. We have it working, but in order to make it operational we have to duplicate a lot of work. Currently we have it setup so that there are services for each port that is being used to communicate. We have modified the check_nt command on these services to have an argument where we can specify the port that is being used.
For example, let's say that I have 2 servers behind the same firewall using the same public IP. By default we use 12489 for the 1st server monitored. For the 2nd we use 11609. So we have services setup such as:
12489 - CPU Usage
12489 - Drive C: Usage
etc.
etc.
11609 - CPU Usage
11609 - Drive C: Usage
etc.
etc.
We then assign the hosts to the services that match the port they're listening on. For each subsequent server we have to add another port and their associated services. As some of our customers have 10+ computers, this becomes a lot of duplication and management.
I was wondering if there was a way to specify the listening port on the host and then point the argument of the services to that value, rather than specifying the port value on each service. That way we would only have 1 service for each item such as CPU Usage, Drive usage, etc.
As always, thank you very much for any input.
Thanks,
Brad
We have setup Nagios XI and are liking it very much. It has enabled us to monitor through firewalls by NATing ports to NSClient++. One issue we have is with monitoring multiple hosts behind the same firewall. We have it working, but in order to make it operational we have to duplicate a lot of work. Currently we have it setup so that there are services for each port that is being used to communicate. We have modified the check_nt command on these services to have an argument where we can specify the port that is being used.
For example, let's say that I have 2 servers behind the same firewall using the same public IP. By default we use 12489 for the 1st server monitored. For the 2nd we use 11609. So we have services setup such as:
12489 - CPU Usage
12489 - Drive C: Usage
etc.
etc.
11609 - CPU Usage
11609 - Drive C: Usage
etc.
etc.
We then assign the hosts to the services that match the port they're listening on. For each subsequent server we have to add another port and their associated services. As some of our customers have 10+ computers, this becomes a lot of duplication and management.
I was wondering if there was a way to specify the listening port on the host and then point the argument of the services to that value, rather than specifying the port value on each service. That way we would only have 1 service for each item such as CPU Usage, Drive usage, etc.
As always, thank you very much for any input.
Thanks,
Brad