Use of OPENSTACK-CEILOMETER-SNMP

Source: Internet
Author: User

1. Physical Server Configuration 1.1 installation
# Yum install-y net-snmp net-snmp-utils
1.2 Configuration

Copy the snmpd.conf file in the "attachments" to the/etc/snmp/directory. (original rename, save)

Turn off SELinux and firewalls

# Setenforce 0 # Vi/etc/sysconfig/selinux modified to: SELINUX=disabled#service snmpd start#chkconfig snmpd on
2. Testing in Ceilometer

Add a meter that already exists

2.1 New meter in Pipline.yaml

Add a Memory Meter,/etc/ceilometer/pipline.yaml

-meters:"hardware.memory.*"resources:-snmp:// 172.16.1.212Sinks:-Meter_sink
2.2 Restart Ceilometer
# systemctl Restart Openstack-ceilometer-central.service
2.3 Get Meter
# ceilometer meter-list | grep hardware # ceilometer sample-list-m hardware.memory.total

Example

+--------------+-----------------------+-------+-------------+------+---------------------+

| Resource ID | Name | Type | Volume | Unit | Timestamp |

+--------------+-----------------------+-------+-------------+------+---------------------+

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t03:41:10 |

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t03:31:10 |

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t03:21:10 |

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t03:11:10 |

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t03:01:10 |

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t02:51:10 |

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t02:41:10 |

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t02:31:10 |

| 172.16.1.212 | Hardware.memory.total | Gauge | 198293684.0 | B | 2014-12-05t02:21:10 |

+--------------+-----------------------+-------+-------------+------+---------------------+

3. Use SNMP in Ceilometer to add Meter3.1ceilomter currently supported OID

Classification

Name

Oid

Description

Cpu

_cpu_1_min_load_oid

1.3.6.1.4.1.2021.10.1.3.1

1-Minute CPU load

_cpu_5_min_load_oid

1.3.6.1.4.1.2021.10.1.3.2

5-Minute CPU load

_cpu_15_min_load_oid

1.3.6.1.4.1.2021.10.1.3.3

15-Minute CPU load

Memory

_memory_total_oid

1.3.6.1.4.1.2021.4.5.0

Total Memory

_memory_used_oid

1.3.6.1.4.1.2021.4.6.0

Memory already in use

_memory_total_swap_oid

1.3.6.1.4.1.2021.4.3.0

_memory_avail_swap_oid

1.3.6.1.4.1.2021.4.4.0

Disk

_disk_index_oid

1.3.6.1.4.1.2021.9.1.1

Disk Index

_disk_path_oid

1.3.6.1.4.1.2021.9.1.2

Disk Mount Location

_disk_device_oid

1.3.6.1.4.1.2021.9.1.3

Disk Mount Name

_disk_size_oid

1.3.6.1.4.1.2021.9.1.6

Disk size

_disk_used_oid

1.3.6.1.4.1.2021.9.1.8

Disk is already in use

Network Interface

_interface_index_oid

1.3.6.1.2.1.2.2.1.1

Nic Index

_interface_name_oid

1.3.6.1.2.1.2.2.1.2

Nic Name

_interface_speed_oid

1.3.6.1.2.1.2.2.1.5

Network card speed

_interface_mac_oid

1.3.6.1.2.1.2.2.1.6

Network card MAC Address

_interface_ip_oid

1.3.6.1.2.1.4.20.1.2

Network card IP

_interface_received_oid

1.3.6.1.2.1.2.2.1.10

Network card Incoming traffic

_interface_transmitted_oid

1.3.6.1.2.1.2.2.1.16

Network card out of traffic

_interface_error_oid

1.3.6.1.2.1.2.2.1.20

NIC Error Packet

System Stats

_system_stats_cpu_idle_oid

1.3.6.1.4.1.2021.11.11.0

System CPU Idle

_system_stats_io_raw_sent_oid

1.3.6.1.4.1.2021.11.57.0

Disk out IO

_system_stats_io_raw_received_oid

1.3.6.1.4.1.2021.11.58.0

Disk in IO

_network_ip_out_requests_oid

1.3.6.1.2.1.4.10.0

Network card Outbound traffic

_network_ip_in_receives_oid

1.3.6.1.2.1.4.3.0

Network card incoming Access volume

3.2 New OID

pro-path/hardware/inspector/snmp.py Snmpinspector Class

# System Uptime  ". 1.3.6.1.2.1.1.3.0"
3.3 New Mapping

pro-path/hardware/inspector/snmp.py

' System.uptime ' : {            'matching_type': EXACT,            'metric_oid  ':(_system_uptime_oid,str),            'metadata': {},            'post_op': None,}
3.4 Processing Classes

pro-path/hardware/pollsters/system.py

class Systemuptimepollster (_systembase):     ' System.uptime '      = Sample. Type_gauge    '%'
3.5 New Modules

/usr/lib/python2.7/site-packages/ceilometer-2014.2-py2.7.egg-info/entry_points.txt

= Ceilometer.hardware.pollsters.system:SystemUptimePollster
3.6 Testing

Reference 1.3

Use of OPENSTACK-CEILOMETER-SNMP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.