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
98261
Files:
FileDescription
ping_remote.cmd.txtping_remote.cmd file
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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;