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:

|