Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_proc_number

Rating
0 votes
Favoured:
0
Current Version
2.0
Last Release Date
2016-03-08
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
Hits
5686
Files:
FileDescription
check_proc_number.ps1Version 1
check_proc_number.ps1Version 2
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Checking the number of running process on windows machines.
The connection is established from Nagios server through nrpe to the remote nsclient agent.

The script should be copied to remote nsclient machine and "nsclient.ini" file should be changed accordingly
## NEW version - v2##
Threshold for minimum & maximum number of running process added.

[nsclient.ini]
check_num_of_xxx_process = cmd /c echo scripts\check_proc_number.ps1 "$ARG1$" "$ARG2$" "$ARG3$"; exit($lastexitcode) | powershell.exe -command - 2> $null

[command_on_nagios_server]
/usr/local/nagios/libexec/check_nrpe -u -H $HOSTADDRESS$ -t 50 -c check_num_of_xxx_process -a $ARG1$ $ARG2$ $ARG3$

$ARG1$ is the process name
$ARG2$ is the minimum number of process
$ARG3$ is the maximum number of process

#########################################################
## OLD version ##

$ARG1$is the process name. The plug is checking if the number of running process are qual to 1.

[nsclient.ini]

check_num_of_java_process = cmd /c echo scriptscheck_proc_number.ps1 "$ARG1$"; exit($lastexitcode) | powershell.exe -command - 2> $null

[command_on_nagios_server]

/usr/local/nagios/libexec/check_nrpe -u -H $HOSTADDRESS$ -t 50 -c check_num_of_java_process -a java