This is my nsclient.ini
Code: Select all
# If you want to fill this file with all avalible options run the following command:
# nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
# nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help
; Undocumented section
[/modules]
; Undocumented key
NSClientServer = 1
; Undocumented key
CheckDisk = 1
; Undocumented key
CheckEventLog = 1
; Undocumented key
CheckExternalScripts = 1
; Undocumented key
CheckHelpers = 1
; Undocumented key
CheckNSCP = 1
; Undocumented key
CheckSystem = 1
; Undocumented key
CheckWMI = 1
; Undocumented key
NRPEServer = 1
; Section for NSClient (NSClientServer.dll) (check_nt) protocol options.
[/settings/NSClient/server]
; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = 0
; PERFORMANCE DATA - Send performance data back to Nagios (set this to 0 to remove all performance data).
performance data = 1
; PORT NUMBER - Port to use for check_nt.
port = 12489
[/settings/NRPE/server]
allow arguments = 1
; Section for NSClient (NSClientServer.dll) (check_nt) protocol options.
[/settings/NSClient/server]
; Undocumented section
[/settings/default]
; Undocumented key
allowed hosts = 172.17.10.10
; Undocumented key
password = xxxxxx
[/settings/external scripts]
allow arguments = true
allow nasty characters = true
timeout = 90
[/settings/external scripts/wrappings]
bat = scripts\\%SCRIPT% %ARGS%
ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
vbs = cscript.exe //T:90 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
exe = cmd /c %SCRIPT% %ARGS%
[/settings/external scripts/wrapped scripts]
test_bat = check_ok.bat
test_ps = check_test.ps1
test_vbs = check_test.vbs
test_ping = check_ping.bat
test_files = check_files.vbs
test_battery = check_battery.vbs
test_printers = check_printer.vbs
alias_process = checkProcState "$ARG1$=started"
check_test = check_test.ps1
exchange_serverhealth= exchange-serverhealth.ps1 -HealthSet $ARG1$
And this is the definition of service
define service{
use windowsmbx-service,srv-pnp
host_name servermbx
servicegroups windowsmbx-service
service_description COMPONENTNAME HealthSet OWA
check_command check_nrpe!exchange_serverhealth!OWA
}
I attached the image file with Nagios frontend. Does not display the error screen
If I run the plugin from the Nagios console, I get this error
[Nagios @ servernagios libexec] $ ./check_nrpe servermbx -c -H exchange_serverhealth servermbx OWA -t60
SCRIPT EXCEPTION The term 'get-serverhealth' is not recognized as the name of a cmdlet, function, script file or executable program. Check if you misspell the name or, if you include a path, verify that the path is correct and try again.
And from the windows server if I run from powershell plugin, if I work
PS C: \ Program Files \ NSClient ++ \ scripts> \ exchange-serverhealth.ps1 OWA.
OK: OWA - 18 checks are OK
I tried what it says cammy
health monitor multiple different sets, just copy the ps1 in to different PS1
and it's the same
Thank you very much