The main goal of this project was to publish the output data of any script run on an ESX server by using SNMP for monitoring with Nagios. As I didn't know much about SNMP it was very hard to find out how to do this as simple as possible. This is a simple example of how publish the output of scripts for uptime, CPU load and available memory and disk space through SNMP and collect them with Nagios. 1. Copy the scripts to the ESX server (Adapt the scripts if needed, see Appendix) 2. Add the OID's and the scripts to /etc/snmp/snmpd.conf exec .1.3.6.1.4.1.2021.50 uptime /bin/sh /../../snmp_uptime.sh exec .1.3.6.1.4.1.2021.51 cpu /bin/sh /../../snmp_cpuload.sh exec .1.3.6.1.4.1.2021.52 memory /bin/sh /../../snmp_memload.sh exec .1.3.6.1.4.1.2021.53 console /bin/sh /../../snmp_diskspace.sh CONSOLE exec .1.3.6.1.4.1.2021.54 storage1 /bin/sh /../../snmp_diskspace.sh storage1 exec .1.3.6.1.4.1.2021.55 storage2 /bin/sh /../../snmp_diskspace.sh storage2 3. Restart snmpd 4. Enable SNMP Server in the firewall (Configuration -> Security profile -> Firewall -> Properties) 5. In Nagios add the following services (of course make sure snmp, snmpd and check_snmp are installed) define service { use service service_description Uptime check_command check_snmp!-C public -o .1.3.6.1.4.1.2021.50.101.1 -l "Uptime: " } define service { use service service_description Cpu check_command check_snmp!-C public -o .1.3.6.1.4.1.2021.51.101.2 -w 95 -c 98 -l "CPU usage (%)" } define service { use service service_description Memory check_command check_snmp!-C public -o .1.3.6.1.4.1.2021.52.101.2 -w 5:0 -c 2:0 -l "Free memory (GB)" } define service { use service service_description Disk CONSOLE check_command check_snmp!-C public -o .1.3.6.1.4.1.2021.53.101.3 -w 1:0 -c 1:0 -l "Free storage (GB)" } define service { use service service_description Disk storage1 check_command check_snmp!-C public -o .1.3.6.1.4.1.2021.54.101.3 -w 45:0 -c 40:0 -l "Free storage (GB)" } define service { use service service_description Disk storage2 check_command check_snmp!-C public -o .1.3.6.1.4.1.2021.55.101.3 -w 45:0 -c 40:0 -l "Free storage (GB)" } Appendix: ========= snmp_cpuload.sh --------------- This scripts was written for a server with 8 cores, if your server has an other number of cores you'll have to adapt the snmp_cpuload.sh script by changing the "{print $16}" value esxtop -b -d 2 -n 1 | awk -F "," '{print $16}' has to result as "_Total" snmp_diskspace.sh ----------------- This scripts was written using the default storage names HOSTNAME:storage1. If you use other names you also have to adapt this.