-Configure nsclient (NSC.ini):
[modules]
;# NSCLIENT++ MODULES
;# A list with DLLs to load at startup.
; You will need to enable some of these for NSClient++ to work.
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
; * *
; * N O T I C E ! ! ! - Y O U H A V E T O E D I T T H I S *
; * *
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
NSClientListener.dll
NRPEListener.dll
[Settings]
allowed_hosts=10.68.55.160
use_file=1
[NRPE]
port=5666
command_timeout=90
[NRPE Handlers]
passive_ping=c:\nsclient\pping.bat
|
-Create batch file (pping.bat):
@echo off
ping –n 1 178.60.210.204 -w 20000 >NUL
IF ERRORLEVEL 1 GOTO err
IF ERRORLEVEL 0 GOTO ok
GOTO unknown
:err
echo CRITICAL: Ping check failed
exit /B 2
:unknown
echo UNKNOWN: Something went wrong
exit /B 3
:ok
echo OK: Ping succeded
exit /B 0
|
0 comentarios:
Post a Comment