So I’m monitoring the virtual memory usage of a particular process via check_nt and the WMI interface.
The interface works great and it’s returning data fine, the problem is that it’s returning the value in bits.
Thus: Virtual Memory Usage: 141369344
That’s 141,369,344 bits, or 17,671,168 bytes, or around 17MB of VRAM being used.
I really don’t want to have to run that through a calculator, and for some reason, when I set the Warning/Critical limits to 12,000,000,000 and 16,000,000,000 respectively (Obviously without commas in the actual config, 1.5GB and 2.0GB by the way) it goes critical immediately.
I would like one of two solutions to this problem, or both if that’s feasable.
Either I would like to have the output display in MB or I would like a way for the Warning and Critical levels to work correctly with the output remaining in Bits.
Any suggestions would be greatly appreciated, I don’t mind compiling a separate version of check_nt if I have to, but I’d rather just find a way to parse the output before it hits the Nagios CGIs.
If i were you, i’d make a script called check_nt_virtmem that runs the check_nt plugin, then performs some math on the results. This is my terrible script-plugin i made for you ahaha:
#############