Check_Nrpe Powershell Monitor
Posted: Wed May 17, 2017 4:16 pm
Currently having trouble getting the results to show up in performance monitor.
This is my powershell script. How can I get the result data to post in perf mon in Nagios XI
$ok = 0
$warning = 1
$critical = 2
$files = (Get-ChildItem $directory | Measure-Object).count;
if ($files -ge $c){
write-host Critical - $files files exists
exit $critical
}
else{
write-host OK - $files files exists
}
This is my powershell script. How can I get the result data to post in perf mon in Nagios XI
$ok = 0
$warning = 1
$critical = 2
$files = (Get-ChildItem $directory | Measure-Object).count;
if ($files -ge $c){
write-host Critical - $files files exists
exit $critical
}
else{
write-host OK - $files files exists
}