Hi all.
Prevouis nagios environment was working perfect, until the internship accidently removed our entire old network to early.
We have different customers where we are monitoring their network. But a two customers have the same ip range. 192.168.1.x
One customer has a steady VPN connection with us, so monitoring works perfect there. But the other customer has no VPN. Situation is still the same. Our and their Firewall are configured for a few ports to let the connection through the firewall for the NRPE/NSCPP
New nagios system is up but can't understand how to solve this issue properly. Old collegue said to me there exist an plugin that checks that host directly through the ISP/Firewall of the customer.
How To? monitor same IP range different ISP/customer/network
-
assangflexx
- Posts: 6
- Joined: Fri Jan 11, 2013 5:47 am
Re: How To? monitor same IP range different ISP/customer/net
I would do this by setting up a remote nrpe server. Open a port on the external firewall and forward it to an internal box running nrpe, nesting another check_nrpe with the actual command to run on the remote network.
Make sure to enable external_commands and dont_blame_nrpe.
You will have to create an npre command on the nrpe server as well as the command to be checked on the internal host:
On the nrpe server:
On the checked internal host:
You should be able to pass a full $ARG1$ string to the checked box's check by escaping the second set of quotes:
If you go this route you will of course need to change the command on the check internal host:
On the checked internal host:
Code: Select all
check_nrpe -H [nrpe server forwarded through firewall] -c check_nrpe -a '-H [internal host to be checked] -c check_users'You will have to create an npre command on the nrpe server as well as the command to be checked on the internal host:
On the nrpe server:
Code: Select all
command[check_nrpe]=/usr/local/nagios/libexec/check_nrpe $ARG1$Code: Select all
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10Code: Select all
check_nrpe -H [nrpe server forwarded through firewall] -c check_nrpe -a '-H [internal host to be checked] -c check_users \'-w 5 -c 10\' 'On the checked internal host:
Code: Select all
command[check_users]=/usr/local/nagios/libexec/check_users $ARG1$Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
assangflexx
- Posts: 6
- Joined: Fri Jan 11, 2013 5:47 am
Re: How To? monitor same IP range different ISP/customer/net
Check !!!
NRPE commands is what I'm looking for. Now everything makes sense. In the meanwhile I've been looking at different server by the customers and one of those servers I saw has a NRPE server installed with commands in it.
Previous ex-coworker implemented Nagios without documentation.
Going to try this out. Will update this post
NRPE commands is what I'm looking for. Now everything makes sense. In the meanwhile I've been looking at different server by the customers and one of those servers I saw has a NRPE server installed with commands in it.
Previous ex-coworker implemented Nagios without documentation.
Going to try this out. Will update this post
Re: How To? monitor same IP range different ISP/customer/net
Fantastic, best of luck.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
assangflexx
- Posts: 6
- Joined: Fri Jan 11, 2013 5:47 am
Re: How To? monitor same IP range different ISP/customer/net
Hmm, things are not working 100% right now.
Installed NRPE and everything. Can do a command with CLI to check if everything is working.
But now I'm stuck. I have 3 host.cfg files. Every hostfile refers to command.cfg. In command.cfg there is stated the host_alive command.
In my position right now it is or host_alive command, or my nrpe_host_alive command.
Tried to add check_command into the host definitions but it won't execute this. Not even when I tried to add the whole commandline.
Is there somewhere a option to let customer2.cfg refer to my own command_nrpe.cfg or something.
Installed NRPE and everything. Can do a command with CLI to check if everything is working.
But now I'm stuck. I have 3 host.cfg files. Every hostfile refers to command.cfg. In command.cfg there is stated the host_alive command.
In my position right now it is or host_alive command, or my nrpe_host_alive command.
Tried to add check_command into the host definitions but it won't execute this. Not even when I tried to add the whole commandline.
Is there somewhere a option to let customer2.cfg refer to my own command_nrpe.cfg or something.
-
assangflexx
- Posts: 6
- Joined: Fri Jan 11, 2013 5:47 am
Re: How To? monitor same IP range different ISP/customer/net
Never mind the previous post.
I thought I was making changes in Nagios through live edit with a FTP program and notepad. Apparently my session was timed out, so it made every change in my temp without uploading to nagios...
Anyways, Ping/ host alive works, the existing remote computer with nsclient on it, has several custom vbs scripts. To check disksizes, services, etc etc. In those scripts there is also stated what the ip address has to be for the destination. It works with Pings, what about disk etcetcetc
I thought I was making changes in Nagios through live edit with a FTP program and notepad. Apparently my session was timed out, so it made every change in my temp without uploading to nagios...
Anyways, Ping/ host alive works, the existing remote computer with nsclient on it, has several custom vbs scripts. To check disksizes, services, etc etc. In those scripts there is also stated what the ip address has to be for the destination. It works with Pings, what about disk etcetcetc
Re: How To? monitor same IP range different ISP/customer/net
You could have nrpe run them, though you would need to write a couple of commands in command.cfg and setup nsclient for nrpe (if you have done so already). You can define the command right in command.cfg, and then setup an "External Script" directive in your nsc.ini.
See: http://www.nsclient.org/nscp/wiki/doc/usage/nagios/nrpe
and: http://www.nsclient.org/nscp/wiki/CheckExternalScripts
See: http://www.nsclient.org/nscp/wiki/doc/usage/nagios/nrpe
and: http://www.nsclient.org/nscp/wiki/CheckExternalScripts
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.