sing NAGIOS to Check the Physical Memory Available on a Windows Host
2017-01-09 14:20
441 查看
By default the CheckNT command checks the virtual memory on a Windows server. So for example, if your server had 4GB of physical memory and a 4GB page file NAGIOS and CheckNT would see 8GB of physical memory. Getting warnings and critical alerts on this memory space is quite often not very helpful. What we really want to know is do we have enough physical memory available on the server so that the server performs as well as it should.
This is where the NRPE plugins are much better as you can get much more granular when monitoring the memory on a Windows host.
To start with we need to create a new command definition. Add this to your commands.cfg (or equivalent):
In the above command definition we're using the check_nrpe executable to perform a memory check of the physical memory. The type can be changed to grab just the page file or check the entire virtual memory address space.
Next we need add the physical memory checks by adding a service definition to either your host or service configs (again, depends on how you've structured your NAGIOS configuration).
You will need to update the above snippet with the host name you are monitoring and the service template you are using. The !80!90 is the standard warning at 80% usage, critical at 90% usage. These can be varied to suit your host and environment.
This is where the NRPE plugins are much better as you can get much more granular when monitoring the memory on a Windows host.
To start with we need to create a new command definition. Add this to your commands.cfg (or equivalent):
# CheckWindowsPhysical Mem command definition define command { command_name CheckWindowsPhysicalMem command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=physical }
In the above command definition we're using the check_nrpe executable to perform a memory check of the physical memory. The type can be changed to grab just the page file or check the entire virtual memory address space.
Next we need add the physical memory checks by adding a service definition to either your host or service configs (again, depends on how you've structured your NAGIOS configuration).
# Service definition # Add the service to the service definition define service { service_description Physical Memory check_command CheckWindowsPhysicalMem!80!90 host_name << hostname >> event_handler_enabled 0 active_checks_enabled 1 passive_checks_enabled 0 notifications_enabled 1 check_freshness 0 freshness_threshold 86400 use << service template >> }
You will need to update the above snippet with the host name you are monitoring and the service template you are using. The !80!90 is the standard warning at 80% usage, critical at 90% usage. These can be varied to suit your host and environment.
相关文章推荐
- 关于VMware出现 Not enough physical memory is available to power on this virtual machine
- 解决VMware出现Not enough physical memory is available to power on this virtual machine
- Not enough physical memory is available to power on this virtual machine with its configured setting
- [Oracle Mgmt]Use RMAN to Duplicate Database in the Same Host (Based on Windows Platform)
- How to check server memory model for extend the physical memory
- [VMware]关于VMware出现Not enough physical memory is available to power on this virtual machine
- Not enough physical memory is available to power on this virtual machine
- Code to check Memory available on iPhone
- How to check free space on memory card
- QTP破解失败:Failed to add license code "UNKNOWN" to the license server on host "no-net".
- Is it possible to make asp.net themes available to all sites on the sever?
- How To Monitor Remote Windows Machine Using Nagios on Linux
- how to check the GCC's version on Mac
- How to get free(available) physical memory/获取可用的内存
- How To Monitor Remote Windows Machine Using Nagios on Linux
- How To Monitor Remote Windows Machine Using Nagios on Linux
- How to Perform a Healthcheck on the Database
- How to get the kernel memory range on OpenSolaris
- [转贴]How to get the largest available continues memory block
- What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memor