I have set the PS script as:
- Code: Select all
((Invoke-WebRequest http://server.local:51011/api/status -UseBasicParsing).Content |ConvertFrom-Json).status
Output: Started
At nsclient.ini, under [/settings/external scripts/scripts]:
- Code: Select all
ssm_output_ps1 = cmd /c echo scripts\SSMoutput.ps1; exit($lastexitcode) | powershell.exe -command -
On NagiosXI, I get this output:
Capture.JPG
Now, this is good. However, what happens when the status changes to '
Stopped'. How do I ensure Nagios changes to CRITICAL when the status is anything other than '
Started'?
This is what I see at NagiosXI
Capture1.JPG
Capture2.JPG
You do not have the required permissions to view the files attached to this post.