Home Directory Plugins Operating Systems Windows check_remote (ping_remote)

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_remote (ping_remote)

Rating
0 votes
Favoured:
0
Hits
98710
Files:
FileDescription
ping_remote.cmd.txtping_remote.cmd file

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

Monitor a tunnel to a remote location on a Windows server.
You may wish to monitor the status of a tunnel via NRPE_NT's cmd facility when your NAGIOS server is also remote from the server.

Steps to implement this in NAGIOS:

1) Duplicate the nrpe_nt_check_cmd in checkcommands.cfg and change the syntax to nrpe_nt_check_remote.

2) Add this line to your nrpe.cfg file on your Windows server:
commandnrpe_nt_check_remote=c:nrpe_ntping_remote.cmd 192.168.2.1 # where 192.168.2.1 is the gateway to the remote LAN.

3) Create a ping_remote.cmd file in the nrpe_nt folder:
@ECHO OFF
PING -n 1 %1 > NUL

IF NOT ERRORLEVEL 1 GOTO REMOTE_FOUND
PING -n 1 -w 3000 %1 > NUL

IF ERRORLEVEL 1 GOTO REMOTE_DOWN
ECHO REMOTE CONNECTION TO %1 IS SLOW
EXIT 1

:REMOTE_DOWN
ECHO REMOTE CONNECTION TO %1 IS DOWN
EXIT 2

:REMOTE_FOUND
ECHO REMOTE CONNECTION TO %1 IS UP
EXIT 0

REM OK = 0;
REM WARNING = 1;
REM CRITICAL = 2;
REM UNKNOWN = 3;