I found this check and have it working on 4 other servers only difference is this server is running nsclient 5.144 other 4.4.23
The error is
Default Web Site Connections Notifications for this service have been disabled
CRITICAL 05-29-2018 20:03:16 0d 0h 9m 6s 10/10 (No output on stdout) stderr: /bin/sh: 1: Syntax error: EOF in backquote substitution
Code: Select all
define service{
use generic-service
host_name SERV014-N1
service_description Default Web Site Connections
check_interval 60
notification_interval 60
check_command check_nrpe!Check_iis_conn!` -a 'SERV014-N1' 'Default Web Site' '25' '50'
servicegroups WEBServices
}
; Check IIS Connections
check_iis_conn = cmd /c echo scripts\\powershell\\check_iis_connections.ps1 "$ARG1$" "$ARG2$" "$ARG3$" "$ARG4$"; exit($lastexitcode) | powershell.exe -command -
from the powershell console on serv014
PS C:\program files\nsclient++\scripts\powershell> .\check_iis_connections.ps1
cmdlet check_iis_connections.ps1 at command pipeline position 1
Supply values for the following parameters:
server: serv014-n1
website: default web site
warning_value: 5
critical_value: 7
CONNECTIONS OK default web site connections 0 | connections=0;5;7;
The powershell script runs fine from the server but not from the config on Nagios.
This is on a Windows 2012 R2 Cluster 2 Node Server running SQL Server
NODE 1 is nsclient 5.144
NODE 2 is nsclient 4.4.23
Thanks
Tom