influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.6k stars 5.57k forks source link

OpenStack volume service state #13440

Closed GerardvonDirac closed 1 year ago

GerardvonDirac commented 1 year ago

Use Case

It would be nice to have in OpenStack input plugin additional available service in enabled_services for monitoring status and state of Cinder volume services (just like Nova compute services or Neutron agents).

Expected behavior

Adding Cinder service in list enabled_services causes gathering information (state, status, host, disabled reason etc.) about cinder-scheduler, cinder-volume and cinder-backup services - those are information possible to obtain for instance using openstack-cli via command:

openstack compute service list --long

or openstacksdk (I am not familiar with gophercloud, so this is just example in python):

import cinderclient.client
import openstack

with openstack.connect() as cloud:
    cloud_cinder = cinderclient.client.Client('3.0', session=cloud.session)
    for service in cloud_cinder.services.list():
        print(service)

Actual behavior

There are available services: agents and nova_services for collecting similar data for Neutron agents and Nova services:

openstack_neutron_agent,agent_host=vim2,agent_type=DHCP\ agent,availability_zone=nova,binary=neutron-dhcp-agent,host=telegraf_host,topic=dhcp_agent admin_state_up=true,alive=true,created_at="2021-01-07T03:40:53Z",heartbeat_timestamp="2021-10-14T07:46:40Z",id="17e1e446-d7da-4656-9e32-67d3690a306f",resources_synced=false,started_at="2021-07-02T21:47:42Z" 1634197616000000000
openstack_nova_service,host=telegraf_host,host_machine=vim3,name=nova-compute,state=up,status=enabled,zone=nova disabled_reason="",forced_down=false,id="192",updated_at="2021-10-14T07:46:52Z" 1634197619000000000

but there are no analogous option for Cinder services.

Additional info

No response

powersj commented 1 year ago

@GerardvonDirac,

Can you download and try the artifacts in #13443. I have added a cinder_services value to the enabled_services option that you can add to enable.

Thanks

GerardvonDirac commented 1 year ago

Thank you for quick response. I have tested mentioned artifacts and everything works like a charm! It's exactly what I need.