I have a NAGIOS check that monitors virtual memory on a windows machine, this check returns all the virtual memory used (physical+ max size of the pagefile).
This is not what I want, I have tried to search for some checks that only monitor the pagefile usage on a windows machine but I didn't find anything intersting.
Are you aware of any SNMP check that monitor if the pagefile is used or not by windows?
Best Answer
WMI
You can access WMI parameters directly with WMI client installed on Linux machine:
Compile and install wmi-client package manually or use compiled packages from www.orvant.com it seem to work with newer versions of Ubuntu as well (14.04 64bit).
Here is an example of wmic usage from command line:
Now create Nagios Plugin. Examples of using wmic is here. Here is the guide how to create your own Nagios plugin, change it for work with wmic. You'll have something like this:
You can access WMI via Python from Linux.
SNMP
If you prefer SNMP you need to install WMI-to-SNMP gateway like SNMP Informant - Advanced on your Windows machine to be able to collect system information including memory and swap. Essentially, this tool provides SNMP MIBs for the system-level WMI instrumentation, which in turn allows the WMI data to be queried by any SNMP management station. It is supported on Windows XP/Vista/2000/2003 and 2008 Servers and allows you to access data from all (over 2000) of the counters.
NSClient
Use NSClient++ on Windows to monitor pagefile.sys size. You need to install NSClient++ as a service. With this plugin for Windows machines you can monitor all other parameters as well. For example you can monitor free memory. There is no need for mayor adaptations in the NSC.ini config file on Windows machine.
Check the size of the pagefile.sys and make sure it stays above 1 gigabyte. Sample Command:
Nagios Configuration:
From Commandline (with NRPE):
Or with check_paging_file plugin on host side with NSClient++.