Enabling SNMP Metrics in OpenStack

Configuring SNMP on the compute nodes

VMTurbo's Operations Manager relies on SNMP metrics on the host 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 - http://docs.openstack.org/admin-guide-cloud/telemetry-measurements.html

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 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>

Changes needed 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

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

Note: 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.

Have more questions? Submit a request