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_mem

Current Version
0.2
Last Release Date
2014-07-14
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
License
GPL
Hits
20875
Files:
FileDescription
check_proc_mem.vbsCheck Memory VBScript v1
check_proc_mem_v2.vbsCheck Memory 2x Process Monitor v2
check_procmem.phpTemplate For v1
check_procmemv2.phpTemplate For v2
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!
A Simple Windows Plugin to display the Total Process Memory consumed by a single/multiple processors. It also displays valuable performance data.
This plugin checks the Memory of a Single(Multiple) Windows Process. If multiple processors with the same name exists, it will simply add the memory consumed. Its written purely in .vbs script for Windows platforms and doesnt require any additional software (or complications). It takes less than 5 minutes to setup.

This plugin generates the WorkingSet memory, PageFile used & ThreadCount for the [Process]. The following output is displayed when the correct input is provided.

#Output Generated# v1
WorkingSet[w3wp.exe]=241mb ThreadCount=[65] PageFileUsed=[0mb]

#Output Generated# v2
WorkingSet[svchost.exe]=172mb ThreadCount=[173] WorkingSet[explorer.exe]=53mb] ThreadCount=[17]

#Performance data# v1
|w3wp.exeW=247840768;0;0;0; w3wp.exeP=233040;0;0;0; ThreadCount=66;0;0;0;

#Performance data# v2
|svchost.exeW=180854784;0;0;0; svchost.exeP=109408;0;0;0; ThreadCountsvchost.exe=173;0;0;0; explorer.exeW=55582720;0;0;0; explorer.exeP=35924;0;0;0; ThreadCountexplorer.exe=17;0;0;0;

[How To Implement] v1
Download the [check_proc_mem.vbs] into your /NSClient++/scripts/ folders, and add the check_procmem mapping into the External Scripts... (remember to restart the NSclient)
[External Scripts]
check_procmem=cscript.exe //NoLogo scriptscheck_proc_mem.vbs $ARG1$ $ARG2$ $ARG3$ $ARG4$
....
....

[How To Implement] v2
Download the [check_proc_mem_v2.vbs] into your /NSClient++/scripts/ folders, and add the check_procmem mapping into the External Scripts... (remember to restart the NSclient)
[External Scripts]
check_procmemv2=cscript.exe //NoLogo scriptscheck_proc_mem_v2.vbs $ARG1$ $ARG2$ $ARG3$ $ARG4$
....
....

You can test the plugin using the following example:
./check_nrpe -H 192.168.5.5 -p 25212 -c check_procmem -a sqlservr.exe dummy.exe 400 500

./check_nrpe -H 192.168.5.5 -p 25212 -c check_procmemv2 -a sqlservr.exe svchost.exe 400 500

From the Nagios Server side, you can access your plugin as follows...
define service{
use generic-service,srv-pnp
host_name MarketWin2k
service_description WinDotNet.MEM ; Values in megabytes(for version 1)...
check_command check_nrpe!check_procmem -a w3wp.exe dummy.exe 500 600
}

define service{
use generic-service,srv-pnp
host_name MarketWin2k
service_description SQLServer.MEM ; Values in megabytes(for version 2)...
check_command check_nrpe!check_procmemv2 -a sqlservr.exe svchost.exe 200 300
}

After you restart the Nagios, you should begin to see the graphs building with the WorkingSet,PageFile and ThreadCounts. The [dummy.exe] is not implemented in v1. This logic is implemented in v2.

Example: If the [w3wp.exe] process consumed above the 500mb limits, a Critical Alert will be triggered.

This appears to be the only stand-alone plugin that can be executed on a windows-server without a wrapper(complications).

If you like the plugin, please vote for it so I will be encouraged to work on Version3 of this..