check_nt - Output in MB instead of Bits for VRAM usage of a single Process.
Lorand S. D'Caltan
ldcaltan at isystemsllc.com
Wed Dec 19 17:08:10 CET 2007
I'm using this script:
#############
#!/bin/bash
RESULT=`./check_nt -H adr01 -p 1248 -v COUNTER -l
"\Process(EvDRServer)\Virtual Bytes" -w 1500 -c 2000`
CALCULATED=`echo $RESULT | awk '{print $1/8/1000000 " MB"}'`
echo $CALCULATED
exit 0
#############
To parse the output of the check_nt COUNTER command that's grabbing the
virtual memory usage for a particular process on a particular server.
The script works great from the command line:
# ./check_adr01_vmem
204.457 MB
However, when I go into the service detail for the server through Nagios
web, I get this:
ADR-Server-VM-Usage OK 12-18-2007 15:21:16 0d 0h 0m 29s 1/3 0 MB
Am I missing something that would cause Nagios to fail to grab the
output from the script correctly?
Running the check_nt -H adr01 -p 1248 -v COUNTER -l
"\Process(EvDRServer)\Virtual Bytes" -w 1500 -c 2000 command results in
an output of "Virtual Memory Usage: 141369344" in Nagios, which isn't
particularaly useful, so I got some assistance writing the script above.
If there's a better/easier solution to parse the outlput from Bits to MB
I would be more than happy to use it instead of the script.
Any help would be greatly appreciated.
Thank you
<><><><><><><><>
Lorand S. D'Caltan
Systems Engineer
iSystems LLC
(802) 655-8347 x157
<><><><><><><><>
CONFIDENTIALITY: The information contained in this message may be
privileged and confidential and protected from disclosure. No
confidentiality or privilege is waived or lost by any mistransmission.
If the reader of this message is not the intended recipient, or an
employee or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
Please immediately delete it and all copies of it from your system,
destroy any hard copies of it and notify the sender. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071219/f9364ca5/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list