Header
 
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup Hardware Internet Linux Nagios/Monitoring Personal PHP Proxy Shell VMware Windows Wyse

Nagiosgraph map entries for check_esx plugin (by OP5)
Monday - Feb 28th 2011 - 1.03 pm (+0100) - Switzerland - (3 comments)

For several ESX and ESXi servers I'm using the Nagios plugin developped by OP5 called check_esx. It queries the physical host and returns useful information, e.g. CPU, Memory and Network usage. To create rrd-graphics with Nagiosgraph the following map entries need to be done and it will work with your check_esx plugin (note that I renamed it to check_esx3 in my environment):

# Service Type: check_esx3 Disk
# Nagiosgraph regex by Claudio Kuenzler
# Check: check_esx3 -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -l vmfs -s $ARG3$ -w $ARG4$ -c $ARG5$
# Output: CHECK_ESX3 OK - GLDSP-ESX03-LD1 - total: 1426.75 GB - used: 467.05 GB (32.74%) - free: 959.70 GB (67.26%)
# Perfdata: 'GLDSP-ESX03-LD1 used Space'=467.05GB;1284.08;1355.41;0.00;1426.75
/output:CHECK_ESX3.*total: (\d+.\d+) GB.*used: (\d+.\d+) GB.*/
and push @s, [esxdisk,
        ['total', GAUGE, $1*1000**3 ],
        ['used', GAUGE, $2*1000**3 ] ];

# Service Type: check_esx3 CPU
# Nagiosgraph regex by Claudio Kuenzler
# Check: check_esx3 -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -l cpu -s usage -w $ARG3$ -c $ARG4$
# Output: CHECK_ESX3 OK - cpu usage=7.74 %
# Perfdata: cpu_usage=7.74%;90;95
/output:CHECK_ESX3.*cpu usage=(\d+.\d+) %/
and push @s, [esxcpu,
        ['usage', GAUGE, $1 ] ];

# Service Type: check_esx3 Memory
# Nagiosgraph regex by Claudio Kuenzler
# Check: check_esx3 -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -l mem -s usage -w $ARG3$ -c $ARG4$
# Output: CHECK_ESX3 OK - mem usage=44.30 %
# Perfdata: mem_usage=44.30%;90;95
/output:CHECK_ESX3.*mem usage=(\d+.\d+) %/
and push @s, [esxmem,
        ['usage', GAUGE, $1 ] ];

# Service Type: check_esx3 Network
# Nagiosgraph regex by Claudio Kuenzler
# Check: check_esx3 -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -l net -s usage -w $ARG3$ -c $ARG4$
# Output: CHECK_ESX3 OK - net usage=271.34 KB/s
# Perfdata: net_usage=271.34KB;40000;60000
/output:CHECK_ESX3.*net usage=(\d+.\d+).*/
and push @s, [esxnet,
        ['usage', GAUGE, $1*1000 ] ];

Add the code above into your nagiosgraph map file (mostly in /etc/nagiosgraph/map or /usr/local/nagiosgraph/etc/map, depends where you installed nagiosgraph). 

And this is how it'll look:


 

Add a comment

Show form to leave a comment

Comments (newest first):

Pikiman from PT wrote on Mar 1st, 2012:
Tank you you are the man!!!!

Claudio from CH wrote on Mar 1st, 2012:
In the nagiosgraph map file. You usually find this either in /etc/nagiosgraph/map or /usr/local/nagiosgraph/etc/map - depends where you installed it.

Pikiman from Portugal wrote on Mar 1st, 2012:
Hi, great work. Where to you put this code??? in check_esx3? In nagiosgraph?

Thank You


Go to Homepage home RSS Feed
About ck about
Linux Howtos how to's
Nagios Plugins nagios plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

9376 Days
until Death of Computers
Why?