stony007_de
Enthusiast
Enthusiast

Check ESX Hosts via SNMP

Hi @ all

i want to check my esx hosts systems via snmp. (snapshots/drive usage, etc...)

In our environment i use snmpget to fill my "checkssystem" nagios.

So i search for some doc´s to configure it, but everything i found was to old or incomplete.

what i have done?

- enable snmp port in firewall

- start the snmp service

- configured the snmp.xml with the "vicfg-snmp" command from the nagios server..

Can anybody give an short tutorial how to setup the esxhost for snmp?

thx stony007_de

Tags (3)
14 Replies
AWo
Immortal
Immortal

Have you already checked this link: http://pubs.vmware.com/vsp40/wwhelp/wwhimpl/js/html/wwhelp.htm#href=admin/c_snmp_and_vmware_infrastr... ?


AWo

VCP 3 & 4

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
stony007_de
Enthusiast
Enthusiast

yes, that´s the same as the "Admin Guide".

But there is no info about the getting of vales!

I don´t want to user traps! my nagios should ask the esx for something (disk usage) the esxhost answered /dev/sdcv2 = 30% used.. somthing like this!

in other system i ask with the query "snmpwalk -v2c -c commuity server" and i get an complete list of values but on the esx it´s a short list.

should i load the MIBs into my nagios server? it´s an debian? how can i do it?

0 Kudos
AWo
Immortal
Immortal

Of course you should load the MIBs. Take a look into the MIBs to see which values you can expect.


AWo

VCP 3 & 4

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
stony007_de
Enthusiast
Enthusiast

sorry man, i got no idea how to load the mib! Its my firt time with snmp!

Which values include in the mib is clear! but how to load?

for example i want to get the SystemVersion of the esx host. i start on my nagios server:

snmpwalk -v 2c -c community server

I am totaly confused!

some threads saied: have to enter some strings into the snmpd.conf on the esx host.

"..dlmod SNMPESX /usr/lib/vmware/snmp/libSNMPESX.so.."

such a path does not exist in esx4!!! i am not sure, that my host is completly correct configured.

my snmp.xml:

<config> <snmpSettings> <communities>public</communities> <enable>true</enable> <port>171</port> <targets>nagios-server-ip@162 public</targets> </snmpSettings> </config>

my snmpd.conf in untouched!!!

0 Kudos
AWo
Immortal
Immortal

How the MIBs are importet/compiles into the management tools depends on the management tool. Each one has its way to do it. You may have to consult the documentation. But without the MIBs, the tool cant interpret the data it has received. Without the MIB you will see something like concatenated numbers.


AWo

VCP 3 & 4

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
stony007_de
Enthusiast
Enthusiast

How the MIBs are importet/compiles into the management tools depends on the management tool. ...

in my case i only want to ask with snmpwalk!!! no management tool!!

Is there no simple way to setup?

I can not even retrieve something locally from esx! In blogs i read some OID like .1.3.6.1.4.1.6876</span>

i tried:

#snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.6876

SNMPv2-SMI::enterprises.6876 = No more variables left in this MIB View (It is past the end of the MIB tree)

???

0 Kudos
bulletprooffool
Champion
Champion

If SNMP ports have been opened and the service started etc, then in theory the rest of the work should be done on the reader side (Nagios in this instance)

With ESXi I have found that installing the vendor management packs (HP in my case) made iteasier to read the info, though SNMP was not as reliable as I would like.

Details for what you need is in the link below:

http://proddoc.groundworkopensource.com/Bookshelf_RoboHelp/GroundWork_Profiles/SNMP_Profiles/Profile...

One day I will virtualise myself . . .
0 Kudos
AWo
Immortal
Immortal

Post your "/etc/snmp/snmpd.conf" file. You need to have the correct community names.


AWo

VCP 3 & 4

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
stony007_de
Enthusiast
Enthusiast

i saied, untouched!!!

i want to use the community "public"

0 Kudos
stony007_de
Enthusiast
Enthusiast

What work i have to do on worker site to get information about the numbers of VM in cluster... for example...

The Manual said add "dlmod SNMPESX /usr/lib/vmware/snmp/libSNMPESX.so"

that is the reason why i am confused! i cant find an libSNMPESX.so anywhere...

0 Kudos
AWo
Immortal
Immortal

Add the following lines to your "/etc/snmp/snmp.conf":

trapsink

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
stony007_de
Enthusiast
Enthusiast

i think now i have found the solution for myself!

http://forums.cacti.net/post-186621.html (Post10)

thx guy´s!!

stony007_de
Enthusiast
Enthusiast

OK that works!

now i am able to ask for all vmware values!

Some templates describes, to run an shell script do get a info wich isn´t presentet by the mib´s. (for example: snapshots)

i already read about it, to add some strings into the snmpd.conf like:

  1. -----------------------------------------------------------------------

  2. script find snapshots on vmfs

exec 1.3.6.1.4.1.2021.1000.10 snapshot /etc/snmp/vmware-snapshot.sh

  1. VMware MIB modules. To enable/disable VMware MIB items

  2. add/remove the following entries.

dlmod SNMPESX /usr/lib/vmware/snmp/libSNMPESX.so

  1. -----------------------------------------------------------------------

the question again, what is the rason for line with libSNMPESX.so? This file does not exist in ESX4.1.

Is taht systax correct?

0 Kudos
MRSNMP
Enthusiast
Enthusiast

In ESX4.1 there were two snmp agents, the net-snmp and one in 'hostd' process which provided the VMWARE-VMINFO-MIB.

You'd have to turn on both agents, run hostd's agent on a different udp port then configure net-snmp to be the master agent

if one wanted to to see all of the data from one agent.

In ESXi 5.1 there is a complete SNMPv1/v2c/v3 agent configured using 'esxcli system snmp' from the ESX Shell or

with host profiles.

0 Kudos