Code Monkey home page Code Monkey logo

prometheus-openstack-exporter's Introduction

Prometheus Openstack Exporter

Image for a prometheus exporter for openstack API derived metrics.

Environment

check sample env file provided in the source.

  • OS USERNAME

    • username associated with the monitoring tenant/project in openstack, used for polling openstack API, required
  • OS PASSWORD

    • password for the username associated with the monitoring tenant/project in openstack, used for polling openstack API, required
  • OS PROJECT NAME

    • monitoring tenant/project in openstack, used for polling openstack API, required
  • OS AUTH URL

    • openstack keystone API endpoint, required
  • LISTEN PORT

    • port to bind for prometheus scrape target
  • OS REGION NAME

    • openstack region to use keystone service catalog against
  • TIMEOUT SECONDS

    • number of seconds before API calls should timeout
  • OS POLLING INTERVAL

    • interval in seconds between API polls
  • OS RETRIES

    • number of retries on API calls before failing
  • OS CPU OC RATIO

    • CPU overcommit ratio for the hypervisor
  • OS RAM OC RATIO=1

    • RAM overcommit ratio for the hypervisor

Docker Usage

docker run --env-file sample env file -it rakeshpatnaik/prometheus-openstack-exporter:v0.2

sample test

docker exec <instance-id> curl http://localhost:19103/metrics

-------Sample truncated Output----
# HELP openstack_total_used_ram_MB Openstack Hypervisor statistic
# TYPE openstack_total_used_ram_MB gauge
openstack_total_used_ram_MB{aggregate="",aggregate_id="",host="",region="RegionOne"} 6897.0
# HELP openstack_total_used_vcpus Openstack Hypervisor statistic
# TYPE openstack_total_used_vcpus gauge
openstack_total_used_vcpus{aggregate="",aggregate_id="",host="",region="RegionOne"} 0.0
# HELP openstack_used_ram_MB Openstack Hypervisor statistic
# TYPE openstack_used_ram_MB gauge
openstack_used_ram_MB{aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne"} 6897.0

Metrics

Name Sample Labels Sample Value Description
openstack_exporter_cache_refresh_duration_seconds region="RegionOne" 0.3854649066925049
openstack_check_neutron_api region="RegionOne",service="neutron",url="http://neutron-server.openstack.svc.cluster.local:9696" 1.0
openstack_check_glance_api region="RegionOne",service="glance",url="http://glance-api.openstack.svc.cluster.local:9292" 1.0
openstack_check_keystone_api region="RegionOne",service="keystone",url="http://keystone-api.openstack.svc.cluster.local:80" 1.0
openstack_check_placement_api region="RegionOne",service="placement",url="http://placement-api.openstack.svc.cluster.local:8778" 1.0
openstack_check_swift_api region="RegionOne",service="swift",url="http://ceph-rgw.ceph.svc.cluster.local:8088" 1.0
openstack_check_nova_api region="RegionOne",service="nova",url="http://nova-api.openstack.svc.cluster.local:8774" 1.0
openstack_services_neutron_neutron_metadata_agent host="ubuntu-xenial",region="RegionOne",service="neutron-metadata-agent",state="up" 1.0
openstack_services_neutron_metadata_agent_down_percent host="",region="RegionOne",service="neutron-metadata-agent",state="down" 0.0
openstack_services_neutron_openvswitch_agent_up_percent host="",region="RegionOne",service="neutron-openvswitch-agent",state="up" 100.0
openstack_services_neutron_l3_agent_disabled_total host="",region="RegionOne",service="neutron-l3-agent",state="disabled" 0.0
openstack_services_neutron_dhcp_agent_up_total host="",region="RegionOne",service="neutron-dhcp-agent",state="up" 1.0
openstack_services_neutron_dhcp_agent_down_percent host="",region="RegionOne",service="neutron-dhcp-agent",state="down" 0.0
openstack_services_neutron_l3_agent_up_percent host="",region="RegionOne",service="neutron-l3-agent",state="up" 100.0
openstack_services_neutron_openvswitch_agent_up_total host="",region="RegionOne",service="neutron-openvswitch-agent",state="up" 1.0
openstack_services_neutron_neutron_dhcp_agent host="ubuntu-xenial",region="RegionOne",service="neutron-dhcp-agent",state="up" 1.0
openstack_services_neutron_openvswitch_agent_down_percent host="",region="RegionOne",service="neutron-openvswitch-agent",state="down" 0.0
openstack_services_neutron_dhcp_agent_down_total host="",region="RegionOne",service="neutron-dhcp-agent",state="down" 0.0
openstack_services_neutron_metadata_agent_up_percent host="",region="RegionOne",service="neutron-metadata-agent",state="up" 100.0
openstack_services_neutron_l3_agent_up_total host="",region="RegionOne",service="neutron-l3-agent",state="up" 1.0
openstack_services_neutron_neutron_openvswitch_agent host="ubuntu-xenial",region="RegionOne",service="neutron-openvswitch-agent",state="up" 1.0
openstack_services_neutron_metadata_agent_disabled_total host="",region="RegionOne",service="neutron-metadata-agent",state="disabled" 0.0
openstack_services_neutron_l3_agent_down_percent host="",region="RegionOne",service="neutron-l3-agent",state="down" 0.0
openstack_services_neutron_metadata_agent_up_total host="",region="RegionOne",service="neutron-metadata-agent",state="up" 1.0
openstack_services_neutron_openvswitch_agent_down_total host="",region="RegionOne",service="neutron-openvswitch-agent",state="down" 0.0
openstack_services_neutron_dhcp_agent_disabled_percent host="",region="RegionOne",service="neutron-dhcp-agent",state="disabled" 0.0
openstack_services_neutron_dhcp_agent_disabled_total host="",region="RegionOne",service="neutron-dhcp-agent",state="disabled" 0.0
openstack_services_neutron_l3_agent_down_total host="",region="RegionOne",service="neutron-l3-agent",state="down" 0.0
openstack_services_neutron_openvswitch_agent_disabled_percent host="",region="RegionOne",service="neutron-openvswitch-agent",state="disabled" 0.0
openstack_services_neutron_metadata_agent_disabled_percent host="",region="RegionOne",service="neutron-metadata-agent",state="disabled" 0.0
openstack_services_neutron_metadata_agent_down_total host="",region="RegionOne",service="neutron-metadata-agent",state="down" 0.0
openstack_services_neutron_l3_agent_disabled_percent host="",region="RegionOne",service="neutron-l3-agent",state="disabled" 0.0
openstack_services_neutron_openvswitch_agent_disabled_total host="",region="RegionOne",service="neutron-openvswitch-agent",state="disabled" 0.0
openstack_services_neutron_neutron_l3_agent host="ubuntu-xenial",region="RegionOne",service="neutron-l3-agent",state="up" 1.0
openstack_services_neutron_dhcp_agent_up_percent host="",region="RegionOne",service="neutron-dhcp-agent",state="up" 100.0
openstack_services_nova_conductor_down_total host="",region="RegionOne",service="nova-conductor",state="down" 0.0
openstack_services_nova_consoleauth_disabled_percent host="",region="RegionOne",service="nova-consoleauth",state="disabled" 0.0
openstack_services_nova_scheduler_down_total host="",region="RegionOne",service="nova-scheduler",state="down" 0.0
openstack_services_nova_conductor_disabled_total host="",region="RegionOne",service="nova-conductor",state="disabled" 0.0
openstack_services_nova_conductor_down_percent host="",region="RegionOne",service="nova-conductor",state="down" 0.0
openstack_services_nova_conductor_disabled_percent host="",region="RegionOne",service="nova-conductor",state="disabled" 0.0
openstack_services_nova_nova_conductor host="nova-conductor-d557644d8-5rh8z",region="RegionOne",service="nova-conductor",state="up" 1.0
openstack_services_nova_compute_disabled_total host="",region="RegionOne",service="nova-compute",state="disabled" 0.0
openstack_services_nova_nova_compute host="ubuntu-xenial",region="RegionOne",service="nova-compute",state="down" 0.0
openstack_services_nova_scheduler_disabled_percent host="",region="RegionOne",service="nova-scheduler",state="disabled" 0.0
openstack_services_nova_conductor_up_percent host="",region="RegionOne",service="nova-conductor",state="up" 100.0
openstack_services_nova_scheduler_up_percent host="",region="RegionOne",service="nova-scheduler",state="up" 100.0
openstack_services_nova_consoleauth_up_percent host="",region="RegionOne",service="nova-consoleauth",state="up" 100.0
openstack_services_nova_compute_up_percent host="",region="RegionOne",service="nova-compute",state="up" 0.0
openstack_services_nova_conductor_up_total host="",region="RegionOne",service="nova-conductor",state="up" 1.0
openstack_services_nova_consoleauth_up_total host="",region="RegionOne",service="nova-consoleauth",state="up" 1.0
openstack_services_nova_scheduler_disabled_total host="",region="RegionOne",service="nova-scheduler",state="disabled" 0.0
openstack_services_nova_consoleauth_disabled_total host="",region="RegionOne",service="nova-consoleauth",state="disabled" 0.0
openstack_services_nova_compute_up_total host="",region="RegionOne",service="nova-compute",state="up" 0.0
openstack_services_nova_consoleauth_down_percent host="",region="RegionOne",service="nova-consoleauth",state="down" 0.0
openstack_services_nova_compute_disabled_percent host="",region="RegionOne",service="nova-compute",state="disabled" 0.0
openstack_services_nova_scheduler_up_total host="",region="RegionOne",service="nova-scheduler",state="up" 1.0
openstack_services_nova_scheduler_down_percent host="",region="RegionOne",service="nova-scheduler",state="down" 0.0
openstack_services_nova_nova_scheduler host="nova-scheduler-7cbb4b94d8-n88gh",region="RegionOne",service="nova-scheduler",state="up" 1.0
openstack_services_nova_compute_down_total host="",region="RegionOne",service="nova-compute",state="down" 1.0
openstack_services_nova_compute_down_percent host="",region="RegionOne",service="nova-compute",state="down" 100.0
openstack_services_nova_nova_consoleauth host="nova-consoleauth-759864bc4-4tgmm",region="RegionOne",service="nova-consoleauth",state="up" 1.0
openstack_services_nova_consoleauth_down_total host="",region="RegionOne",service="nova-consoleauth",state="down" 0.0
openstack_total_running_instances aggregate="",aggregate_id="",host="",region="RegionOne" 0.0
openstack_used_disk_GB aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne" 9.0
openstack_free_disk_GB aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne" 19.0
openstack_total_running_tasks aggregate="",aggregate_id="",host="",region="RegionOne" 0.0
openstack_total_free_ram_MB aggregate="",aggregate_id="",host="",region="RegionOne" 15535.0
openstack_running_tasks aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne" 0.0
openstack_total_used_disk_GB aggregate="",aggregate_id="",host="",region="RegionOne" 9.0
openstack_total_free_vcpus aggregate="",aggregate_id="",host="",region="RegionOne" 4.0
openstack_free_vcpus aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne" 4.0
openstack_running_instances aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne" 0.0
openstack_free_ram_MB aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne" 15535.0
openstack_total_free_disk_GB aggregate="",aggregate_id="",host="",region="RegionOne" 19.0
openstack_used_vcpus aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne" 0.0
openstack_total_used_ram_MB aggregate="",aggregate_id="",host="",region="RegionOne" 6897.0
openstack_total_used_vcpus aggregate="",aggregate_id="",host="",region="RegionOne" 0.0
openstack_used_ram_MB aggregate="",aggregate_id="",host="ubuntu-xenial",region="RegionOne" 6897.0
openstack_check_cinder_api region="RegionOne",service="cinder",url="http://cinder-api.openstack.svc.cluster.local:8776" 1.0
openstack_check_cinder_api region="RegionOne",service="cinder",url="http://cinder-api.openstack.svc.cluster.local:8776" 1.0
openstack_check_cinder_api region="RegionOne",service="cinder",url="http://cinder-api.openstack.svc.cluster.local:8776" 1.0
openstack_services_cinder_scheduler_up_percent host="",region="RegionOne",service="cinder-scheduler",state="up" 100.0
openstack_services_cinder_volume_down_total host="",region="RegionOne",service="cinder-volume",state="down" 0.0
openstack_services_cinder_volume_up_percent host="",region="RegionOne",service="cinder-volume",state="up" 100.0
openstack_services_cinder_scheduler_disabled_total host="",region="RegionOne",service="cinder-scheduler",state="disabled" 0.0
openstack_services_cinder_volume_disabled_total host="",region="RegionOne",service="cinder-volume",state="disabled" 0.0
openstack_services_cinder_volume_disabled_percent host="",region="RegionOne",service="cinder-volume",state="disabled" 0.0
openstack_services_cinder_backup_down_percent host="",region="RegionOne",service="cinder-backup",state="down" 0.0
openstack_services_cinder_cinder_scheduler host="cinder-volume-worker",region="RegionOne",service="cinder-scheduler",state="up" 1.0
openstack_services_cinder_scheduler_disabled_percent host="",region="RegionOne",service="cinder-scheduler",state="disabled" 0.0
openstack_services_cinder_backup_disabled_total host="",region="RegionOne",service="cinder-backup",state="disabled" 0.0
openstack_services_cinder_cinder_backup host="cinder-volume-worker",region="RegionOne",service="cinder-backup",state="up" 1.0
openstack_services_cinder_scheduler_down_total host="",region="RegionOne",service="cinder-scheduler",state="down" 0.0
openstack_services_cinder_backup_down_total host="",region="RegionOne",service="cinder-backup",state="down" 0.0
openstack_services_cinder_cinder_volume host="cinder-volume-worker@rbd1",region="RegionOne",service="cinder-volume",state="up" 1.0
openstack_services_cinder_backup_up_total host="",region="RegionOne",service="cinder-backup",state="up" 1.0
openstack_services_cinder_scheduler_down_percent host="",region="RegionOne",service="cinder-scheduler",state="down" 0.0
openstack_services_cinder_volume_up_total host="",region="RegionOne",service="cinder-volume",state="up" 1.0
openstack_services_cinder_backup_up_percent host="",region="RegionOne",service="cinder-backup",state="up" 100.0
openstack_services_cinder_volume_down_percent host="",region="RegionOne",service="cinder-volume",state="down" 0.0
openstack_services_cinder_backup_disabled_percent host="",region="RegionOne",service="cinder-backup",state="disabled" 0.0
openstack_services_cinder_scheduler_up_total host="",region="RegionOne",service="cinder-scheduler",state="up" 1.0

prometheus-openstack-exporter's People

Contributors

jenkins-attcomdev avatar jl401j avatar rakesh-patnaik avatar wilkers-steve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prometheus-openstack-exporter's Issues

Could not get hypervisor statistics

2019-02-25 11:54:01,818:INFO:Trying to get token from 'https://api.xxxxxx:5000/v3'
2019-02-25 11:54:01,823:INFO:Starting new HTTPS connection (1): api.xxxxxxxx
2019-02-25 11:54:01,846:DEBUG:"POST /v3/auth/tokens HTTP/1.1" 401 114
2019-02-25 11:54:01,847:INFO:https://api.xxxxx:5000/v3/auth/tokens responded with status code 401
2019-02-25 11:54:01,847:ERROR:Cannot get a valid token from https://api.xxxxxx:5000/v3
2019-02-25 11:54:01,847:ERROR:https://api.xxxxxx:5000/v3 responded with code 401
2019-02-25 11:54:01,847:ERROR:'token'
2019-02-25 11:54:01,847:ERROR:failed to get data for cache key check_os_api
2019-02-25 11:54:01,847:ERROR:Service 'neutron' not found in catalog
2019-02-25 11:54:01,847:WARNING:Cannot get state of neutron workers
2019-02-25 11:54:01,847:ERROR:Service 'cinder' not found in catalog
2019-02-25 11:54:01,847:WARNING:Cannot get state of cinder workers
2019-02-25 11:54:01,847:ERROR:Service 'nova' not found in catalog
2019-02-25 11:54:01,847:WARNING:Cannot get state of nova workers
2019-02-25 11:54:01,848:ERROR:Service 'nova' not found in catalog
2019-02-25 11:54:01,848:WARNING:Could not get nova aggregates
2019-02-25 11:54:01,848:ERROR:Service 'nova' not found in catalog
2019-02-25 11:54:01,848:WARNING:Could not get hypervisor statistics

anyone know how to fix this ?

Launching with

sudo docker run --env-file /etc/prometheus-openstack-exporter/env.conf -d --name openstack-exporter -p 9103:9103 xxxxxx:5000/prometheus-openstack-exporter```

also the website metrics shows only?

sudo curl http://localhost:9103/metrics

HELP openstack_exporter_cache_refresh_duration_seconds Cache refresh duration in seconds.
TYPE openstack_exporter_cache_refresh_duration_seconds gauge
openstack_exporter_cache_refresh_duration_seconds{region="RegionOne"} 0.029609203338623047

Hypervisors aren't mapped to aggregates because of shortname/FQDN mismatch

In the hypervisor_stats collector, a list of aggregates is assembled, and then each hypervisor is compared against each aggregate's membership list to identify whether the hypervisor is a member of the aggregate. However, aggregate memberships are stored and returned as shortnames, while the hypervisor name is an FQDN (at least in my OpenStack-Ansible-deployed OpenStack); so no hosts are ever mapped to any aggregates.

If the project maintainers agree, I will propose a PR stripping the shortname out of the hypervisor FQDN for the purposes of comparing aggregate membership; this could be controlled by a configuration option if necessary.

Github Releases

Hello,

  • Would it be possible for you to add github releases? In this way we can
    integrate it in other projects/docker images without the hassle of having to download
    the sources.

Thank you.

got exception for "http://controller:8774"

Hi,
I have been trying to use your "prometheus-openstack-exporter" to collect openstack mectrics, but some problems occur, can you give me some help?
the error logs are as follows:
2019-07-17 03:06:57,487:INFO:Trying to get token from 'http://10.0.0.5:35357/v3'
2019-07-17 03:06:57,490:INFO:Starting new HTTP connection (1): 10.0.0.5
2019-07-17 03:06:57,570:DEBUG:"POST /v3/auth/tokens HTTP/1.1" 201 4600
2019-07-17 03:06:57,570:INFO:http://10.0.0.5:35357/v3/auth/tokens responded with status code 201
2019-07-17 03:06:57,571:DEBUG:Got token 'gAAAAABdLpAOdQ3mAbaxpI8Tp7X0I-Q85mkdv1VwyuLFXbD1tKkUQVNj-z0Dg0mStesTAR_yEttN6tFGf5RephAlk-K5F2pH4klc3HNXruBPGPv4yL1YGR2fm-7LfShP5jGE945ixUV1seN4oEF0uTabX02gPHD0bA0tvZiQPWgKTY5qaTa5jsY'
2019-07-17 03:06:57,572:INFO:Starting new HTTP connection (1): controller
2019-07-17 03:07:17,585:DEBUG:Incremented Retry for (url='/'): Retry(total=0, connect=None, read=None, redirect=None)
2019-07-17 03:07:17,585:WARNING:Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b0050>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /
2019-07-17 03:07:17,585:INFO:Starting new HTTP connection (2): controller
2019-07-17 03:07:37,601:ERROR:Got exception for 'http://controller:8774': 'HTTPConnectionPool(host='controller', port=8774): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b0190>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))'
2019-07-17 03:07:37,601:INFO:Service nova check failed (returned '500' but expected '[200]')
2019-07-17 03:07:37,602:INFO:Starting new HTTP connection (1): controller
2019-07-17 03:07:57,618:DEBUG:Incremented Retry for (url='/'): Retry(total=0, connect=None, read=None, redirect=None)
2019-07-17 03:07:57,618:WARNING:Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b00d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /
2019-07-17 03:07:57,618:INFO:Starting new HTTP connection (2): controller
2019-07-17 03:08:17,622:ERROR:Got exception for 'http://controller:8776': 'HTTPConnectionPool(host='controller', port=8776): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b0390>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))'
2019-07-17 03:08:17,622:INFO:Service cinderv2 check failed (returned '500' but expected '[200, 300]')
2019-07-17 03:08:17,623:INFO:Starting new HTTP connection (1): controller
2019-07-17 03:08:37,636:DEBUG:Incremented Retry for (url='/'): Retry(total=0, connect=None, read=None, redirect=None)
2019-07-17 03:08:37,636:WARNING:Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b02d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /
2019-07-17 03:08:37,636:INFO:Starting new HTTP connection (2): controller
2019-07-17 03:08:57,651:ERROR:Got exception for 'http://controller:8778': 'HTTPConnectionPool(host='controller', port=8778): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b0590>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))'
2019-07-17 03:08:57,651:INFO:Service placement check failed (returned '500' but expected '[401]')
2019-07-17 03:08:57,652:INFO:Starting new HTTP connection (1): controller
2019-07-17 03:09:17,662:DEBUG:Incremented Retry for (url='/'): Retry(total=0, connect=None, read=None, redirect=None)
2019-07-17 03:09:17,663:WARNING:Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b04d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /
2019-07-17 03:09:17,663:INFO:Starting new HTTP connection (2): controller
2019-07-17 03:09:37,684:ERROR:Got exception for 'http://controller:5000': 'HTTPConnectionPool(host='controller', port=5000): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b0790>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))'
2019-07-17 03:09:37,684:INFO:Service keystone check failed (returned '500' but expected '[300]')
2019-07-17 03:09:37,684:INFO:No check found for service 'cinderv3', creating one
2019-07-17 03:09:37,685:INFO:Starting new HTTP connection (3): controller
2019-07-17 03:09:57,696:DEBUG:Incremented Retry for (url='/'): Retry(total=0, connect=None, read=None, redirect=None)
2019-07-17 03:09:57,696:WARNING:Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee902b0610>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /
2019-07-17 03:09:57,696:INFO:Starting new HTTP connection (4): controller

Finnally, the version of openstack is ocata.
Waiting for your reply. Thanks a lot.

Choose interface for check API

Looks like openstack_check_*_api are picking the first endpoint for particular service yield by endpoints api call. You can't be sure if you get public, internal or admin interface url (endpoint type). Would be good to check all of them (and label in metrics) or just particular type configured somewhere.

Metric collection fails on current versions of prometheus_client

The Docker container ships with prometheus_client 0.13, which appears to be less stringent about its inputs; however, installing the exporter alongside a current 0.4.2 version of prometheus results in many metrics not being returned at all.

By adding a try-except block around lines lines 141-151 in hypervisor_stats.py (https://github.com/att-comdev/prometheus-openstack-exporter/blob/master/exporter/hypervisor_stats.py#L141-L151), I was able to identify that prometheus_client is throwing a Duplicated timeseries in CollectorRegistry exception when assembling the metrics for delivery.

I suspect that the older version of prometheus_client was simply silently overwriting duplicate timeseries. I believe the same issue may affect all of the collector modules. Exception handling should be added around calls to the prometheus_client methods, and input should be sanitized ahead of those calls to ensure no duplicate timeseries are propagated. I'd be happy to help develop a PR to address some of this, if I can get some guidance from the project maintainers on how they'd like to see that implemented.

get token not connection

docker run
018-10-16 02:34:37,987:INFO:Starting new HTTP connection (1): controller
2018-10-16 02:34:58,132:DEBUG:Incremented Retry for (url='/v3/auth/tokens'): Retry(total=0, connect=None, read=None, redirect=None)
2018-10-16 02:34:58,133:WARNING:Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x7ff990fe2c90>, 'Connection to controller timed out. (connect timeout=20)')': /v3/auth/tokens
2018-10-16 02:34:58,133:INFO:Starting new HTTP connection (2): controller
2018-10-16 02:35:18,284:ERROR:Got exception for 'http://controller:35357/v3/auth/tokens': 'HTTPConnectionPool(host='controller', port=35357): Max retries exceeded with url: /v3/auth/tokens (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x7ff990fe2dd0>, 'Connection to controller timed out. (connect timeout=20)'))'

Text parsing errors

Good day

After I've build the container from github, configure & install it on a node. I get parsing errors show on the prometheus status page next to the node:

text format parsing error in line 49: second HELP line for metric name "openstack_services_neutron_neutron_dhcp_agent"

ย  | text format parsing error in line 52: second HELP line for metric name "openstack_services_neutron_neutron_openvswitch_agent"

etc

Error when get metrics Hypervisor

2018-10-25 08:56:22,440:ERROR:'HypervisorStats' object has no attribute 'extra_config'
2018-10-25 08:56:22,441:ERROR:failed to get data for cache key hypervisor_stats

                free = ((int(self.extra_config['cpu_ratio'] *
                             m_vcpus)) -
                        m_vcpus_used)

nova_aggregates[agg]['metrics']['free_vcpus'] += free

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.