Enabling SNMP Metrics in OpenStack

Document created by dz_ny Expert on Jan 3, 2017Last modified by vivek.nandavanam on Jun 9, 2017
Version 3Show Document
  • View in full screen mode

Configuring SNMP on the compute nodes


VMTurbo's Operations Manager relies on SNMP to get host metrics. To do this, SNMP needs to be enabled on all the compute nodes.
An inventory of all the SNMP metrics provided by OpenStack are listed on the following page - OpenStack Docs: Measurements 


A sample snmpd.conf file can be found here that can be used as a reference to enable SNMP on the compute node. The location of the file is /etc/snmp. Make sure the owner is root.


The following entries will need to be change in the file:
# diff snmpd.conf snmpd.conf.old
< view    systemview    included   .
< view    systemview    included   .
> view    systemview    included   .
> view    systemview    included   .
< disk /var/lib/nova/instances 15


Note: The disk entry above should be '/' if the VMs are on local storage or '/var/lib/nova/instances' if the VMs are on shared storage


The SNMP service on the compute nodes can be enabled and restarted using the following commands:
    systemctl enable snmpd.service
    systemctl start snmpd.service


At this point you can do a snmpwalk from the controller to see if the controller can access the SNMP metrics on the compute nodes.
    snmpwalk -v 2c -c public <compute_node>


Configuration on the Controller node

Add a source under the 'sources' entry in the /etc/ceilometer/pipeline.yaml file with the following contents:

    - name: meter_snmp
      interval: 600
          - snmp://compute1.eng.vmturbo.com
          - snmp://compute2.eng.vmturbo.com
          - snmp://compute3.eng.vmturbo.com
          - "hardware.cpu*"
          - "hardware.memory*"
          - "hardware.disk*"
          - "hardware.network*"
          - "hardware.system_stats*"
          - meter_sink


Note: Replace compute*.eng.vmturbo.com with the FQDN of hosts in your environment. Resources must contain a list of the compute nodes. In the above snippet is a 3 node environment with compute1.eng.vmturbo.com, compute2.eng.vmturbo.com and compute3.eng.vmturbo.com as the compute nodes.


After adding the following to the pipeline.yaml file, restart the ceilometer-central service.


The output can be verified by running the following command that should give you an output for the hardware metrics that were configured:

         ceilometer meter-list | grep hardware

3 people found this helpful