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

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
2562
Files:
FileDescription
check_proc_number.ps1Version 1
check_proc_number.ps1Version 2

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

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