Hi All,
I'm trying to work out the best way to monitor several servers behind 1 external IP. I have forwarded a different external port for each command e.g check_nt using 4005, check_nt2 using 4006, check_nt3 using 4007 etc which will then be translated to 12489 on the internal network for each local IP. This has worked but my question is whats the best way to manage my hostgroups/config files so I can easily view the various services in logical groups?
We are an IT support company so have several clients all with around 2 - 8 servers and they all use 1 public IP for their servers.
Multiple Servers behind one WAN/Public IP
Re: Multiple Servers behind one WAN/Public IP
In regards to the WAN monitoring, you might look into NRPE:
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
That way you can have a single port open with NRPE listening on it, which will then handle all the checks from within the network. No need for multiple ports.
As for the organization, that's really more of an art than a science. I would group all services for a particular host into one file and name that file the same as the host config file. For hostgroups you can do a simple "client" and "company" distinction if you monitor both your customer and your own servers. For servicegroups you can do something similar. It really all depends on what logical groups would make sense in your environment. Some people split them into development and production, some into internal and external, etc.
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
That way you can have a single port open with NRPE listening on it, which will then handle all the checks from within the network. No need for multiple ports.
As for the organization, that's really more of an art than a science. I would group all services for a particular host into one file and name that file the same as the host config file. For hostgroups you can do a simple "client" and "company" distinction if you monitor both your customer and your own servers. For servicegroups you can do something similar. It really all depends on what logical groups would make sense in your environment. Some people split them into development and production, some into internal and external, etc.
Former Nagios employee
Re: Multiple Servers behind one WAN/Public IP
I am using NSclient, is that the same thing?
If not does it listen on the nagios server or the server I am monitoring? Also all our clients use windows servers, does NRPE monitor those?
If not does it listen on the nagios server or the server I am monitoring? Also all our clients use windows servers, does NRPE monitor those?
Re: Multiple Servers behind one WAN/Public IP
No. NSClient is an agent that runs on the Windows machine and is queried by Nagios to get internal metrics like CPU, Memory, Disk, etc. NRPE is the Nagios Remote Plugin Executor, and it is sort of like a relay or a proxy - Nagios can run checks via NRPE in cases like this where network access is restricted.szkoda wrote:I am using NSclient, is that the same thing?
NRPE would be installed on an intermediary server within the network you want to monitor. Nagios contacts NRPE and tells it to query NSClient, or whatever else you want to monitor with it.szkoda wrote:If not does it listen on the nagios server or the server I am monitoring?
NRPE itself does not care what you monitor, and neither does Nagios. If you can script it, you can check it. NRPE can monitor Windows by way of NSClient.szkoda wrote:Also all our clients use windows servers, does NRPE monitor those?
Former Nagios employee
Re: Multiple Servers behind one WAN/Public IP
Sorry to resurrect an old thread but I think I'm finally going to make the move from check_nt to check_nrpe if I can get it working.
Can I have a remote windows host acting as a NRPE server? If so how do I configure it to collect the data from the other servers? Do I need to change anything on the Nagios end to make it work?
Can I have a remote windows host acting as a NRPE server? If so how do I configure it to collect the data from the other servers? Do I need to change anything on the Nagios end to make it work?
Re: Multiple Servers behind one WAN/Public IP
While you can have a remote windows host act as a relay, but not as a server - so it won't necessarily be 'collecting' information.Can I have a remote windows host acting as a NRPE server? If so how do I configure it to collect the data from the other servers? Do I need to change anything on the Nagios end to make it work?
NSClient as a relay host can be tricky, and because of that I recommend that you look into mod_gearman as a possibility. In your case, you would set up a gearman worker at the remote location - let's call it RemoteA.
You would also need to set up a gearman job server at your Nagios host. The Nagios job server would generate checks - pass them through mod_gearman to RemoteA - and then RemoteA would run the required checks and return them to Nagios.
I recommend mod_gearman if you can stand up a CentOS box at the remote site. If you would like to use NSClient instead - that is fine as well.
Let us know how you'd like to proceed. Thanks!
Re: Multiple Servers behind one WAN/Public IP
We haven't got the resources to setup a linux box at each site so I think I'll just stick with my current setup and forward ports where necessary.
Thankyou for the advice anyway!
Thankyou for the advice anyway!
Re: Multiple Servers behind one WAN/Public IP
No problem - I'll keep this thread open in case you have any questions. Thanks!
Re: Multiple Servers behind one WAN/Public IP
Sorry for taking your post but my question is nearly yours so i don't wan't to open a new post.
I just would like a confirmation if we have any way to connect the agent TO the server. I would like to point multiple WAN center with no static IP address to 1 server.
That kind of reverse connexion is possible with nagios or we really need to connect the server to the client infrastructure.
I just would like a confirmation if we have any way to connect the agent TO the server. I would like to point multiple WAN center with no static IP address to 1 server.
That kind of reverse connexion is possible with nagios or we really need to connect the server to the client infrastructure.
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Multiple Servers behind one WAN/Public IP
You can use dynamic DNS just like you would for any other service of this type with a rotating IP, or you could look into passive checks. Sounds like passive checks is what you're interested in and it's an inherent part of Nagios. Fairly trivial to setup.
http://nagios.sourceforge.net/docs/nagi ... hecks.html
http://nagios.sourceforge.net/docs/nagi ... hecks.html