Forum
Merhabalar;
VMware 4.1 vcenter ve 3 tane de esx sunucuya sahibiz.Bu sunucuları Cacti Monitoring toolumuzda izlemek istiyoruz.Cacti tarafında device eklediğim zaman esx hostlarımı görebiliyorum ama grafiğe birşey dökülmüyor.Esx hostlarım snmp servislerini yeniden başlatmak istediğim de de service not found diyor.Büyük ihtimal esx sunucularımda snmpd servisi config edilmemis ve başlatılmamıs.Bu konuda nasıl yardımcı olabilirsiniz?
Internettte böyle bir makale bulmuştum.Bu yolumu izlemeliyim?
Configure SNMP on ESX4 for Cacti
This is a tiny little guide to make an ESX4 host work with Cacti,
basically make ESX4 host answer SNMP requests and include data from
HOST-RESOURCES-MIB into the output.
There will only be a SNMP v1 / v2 available with a "public"
community with read only access. For a more enhanced SNMP configuration
you might want to check net-snmp documentation. The Net-SNMP agent comes
with a perl script to aid with configuration. This script, snmpconf,
helps configure some of the basic configuration options offered by
snmpd.
Use 'snmpconf -r none -g basic_setup' to create a snmp.conf with a more enhanced configuration interactively.
Most of the information is taken from http://knowledgebase.solarwinds.com/kb/questions/1340/Enabling+SNMP+on+VMware+ESX%7B47%7DESXi+Server+version+4 - basically the same source as mentioned some posts above.
Here we go:
Get root access to the ESX host's console (for SSH access you will need to enable root ssh access first).
Make sure SNMP is not running
# service snmpd stop
Create backup copy of /etc/vmware/snmp.xml
# cp /etc/vmware/snmp.xml /etc/vmware/snmp.xml.original
Edit snmp.xml
# nano /etc/vmware/snmp.xml
<snmpSettings>
<communities>public</communities>
<enable>true</enable>
<port>171</port>
<targets>127.0.0.1@162/public</targets>
</snmpSettings>
</config>
Create backup copy of /etc/snmp/snmpd.conf
# cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.original
The
original snmpd.conf is pretty large and filld up with commenst and
information we do not need here. So it is easier to delete it and create
a new file from scratch.
Delete snmpd.conf
# rm /etc/snmp/snmpd.conf
Create new snmpd.conf
# nano /etc/snmp/snmpd.conf
syslocation Serverraum
syscontact "ESX Administrator"
rocommunity public
view systemview included .1.3.6.1.4.1.6876
proxy -v 1 -c public 127.0.0.1:171 .1.3.6.1.4.1.6876
Restart the mgmt-vmware service
# service mgmt-vmware restart
Start the SNMP service
# service snmpd start
Make SNMP start automatically on host reboot
# chkconfig snmpd on
Allow SNMP through the ESX Server firewall
# esxcfg-firewall -e snmpd
Testing
# snmpwalk -v1 -c public localhost .1.3.6.1.4.1.6876 -> should show some EXS specific data
# snmpwalk -v1 -c public localhost .1.3.6.1.2.1.25 -> should show lots of HOST-RESOURCES-MIB data but not only some few lines
Selamlar,
Yukarıdaki adımları detaylı okumadım ancak ilk olarak Vmware'in kendi kb'sindeki dökümanı uygulayın derim.
http://kb.vmware.com/kb/1008065
Sizin yolladığınızda da bariz bir sorun göremedim ancak siz manuel yapıyorsunuz, Vmware kendi scriptleri ile yaptırmış. Yukarıdaki adımları bulduğunuz kaynak sağlamsa onu da deneyebilirsiniz.
Erkal Aslankara
www.aslankara.com