Then, you'll need to create an event handler to trigger the newly created commands over check_nrpe / check_nt. Once those have been created, assign the event handler to the service that's checking your MEM or CPU. Any time a state change occurs, it will log the data to the corresponding file on the local client machine.
then add into nsclient file? i have tried that but throwing some error.
Also i have powershell script to get process memory usage , can you guide me to get the output to display in nagios :
"get-wmiobject WIN32_PROCESS | Sort-Object -Property ws -Descending|select -first 5|Select processname, @{Name="Mem Usage(MB)";Expression={[math]::round($_.ws / 1mb)/1024}} "
Yes, please save that as C:\Program Files\NSClient++\scripts\powershell\topcpu.ps1
Then, under your external scripts section of NSClient++, add -
Then, you'll need to create an event handler to trigger the newly created commands over check_nrpe / check_nt. Once those have been created, assign the event handler to the service that's checking your MEM or CPU. Any time a state change occurs, it will log the data to the corresponding file on the local client machine.
then add into nsclient file? i have tried that but throwing some error.
Also i have powershell script to get process memory usage , can you guide me to get the output to display in nagios :
"get-wmiobject WIN32_PROCESS | Sort-Object -Property ws -Descending|select -first 5|Select processname, @{Name="Mem Usage(MB)";Expression={[math]::round($_.ws / 1mb)/1024}} "
Yes, please save that as C:\Program Files\NSClient++\scripts\powershell\topcpu.ps1
Then, under your external scripts section of NSClient++, add -