OpenStack SD Error - could not create OpenStack compute session: No suitable endpoint could be found

1,993 views
Skip to first unread message

mru...@gmail.com

unread,
Oct 20, 2017, 5:27:04 PM10/20/17
to Prometheus Users
We're testing the OpenStack service discovery in Prometheus v1.8, but we're running into consistent errors returned by OpenStack. We have RedHat OpenStack Newton deployed that we're trying to test off of. We've tried changing the roles from "hypervisor" to "instance" in the prometheus.yml config as well to no avail.

We were curious if anyone else has experienced this issue with OpenStack service discovery in Prometheus. The errors are somewhat generic OpenStack errors which complicates troubleshooting the Prometheus config.

Prometheus: v1.8
OpenStack: Newton
Identity API: v3

Errors:
time="2017-10-20T10:32:46-04:00" level=error msg="could not create OpenStack compute session: No suitable endpoint could be found in the service catalog." source="hypervisor.go:61"
time="2017-10-20T10:45:53-04:00" level=error msg="could not create OpenStack compute session: No suitable endpoint could be found in the service catalog." source="instance.go:66"

Prometheus Job Config:
- job_name: openstack
  scrape_interval: 1m
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  openstack_sd_configs:
  - identity_endpoint: https://SUBDOMAIN.DOMAIN.com:13000/v3
    username: admin
    userid: ""
    password: <secret>
    project_name: ""
    project_id: ""
    domain_name: Default
    domain_id: ""
    role: hypervisor
    region: regionOne
    refresh_interval: 1m
    port: 80


Simon Pasquier

unread,
Oct 23, 2017, 9:46:30 AM10/23/17
to mru...@gmail.com, Prometheus Users
Hello Matt,
I've been playing with the OpenStack SD recently and it worked fine for me.
I suspect that in your case, the Keystone catalog doesn't contain an entry for the "compute" service in "regionOne". Can you share the output of the "openstack endpoint list" command?
Also setting role to "instance" will tell Prometheus to collect metrics from your Nova instances while "hypervisor" will tell it to monitor your hypervisor nodes. See [1] for an example with monitoring of the instances.
HTH
Simon

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d0a77d42-e845-42a7-a5ca-eae8e1797dc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mru...@gmail.com

unread,
Oct 23, 2017, 5:23:45 PM10/23/17
to Prometheus Users
Hi Simon,

Thank you for the response and link to the example from your blog. Here is the output from that command. I also included some output from Nova if that helps.

$ openstack endpoint list |grep compute
| 7dcda573634a40d6a0cf5f475eeb344b | regionOne | nova         | compute        |
$ openstack endpoint show compute
+--------------+----------------------------------------+
| Field        | Value                                  |
+--------------+----------------------------------------+
| adminurl     | http://???.???.?.??:8774/v2.1          |
| enabled      | True                                   |
| id           | 7dcda573634a40d6a0cf5f475eeb344b       |
| internalurl  | http://???.???.?.??:8774/v2.1          |
| publicurl    | https://SUB.DOMAIN.com:13774/v2.1      |
| region       | regionOne                              |
| service_id   | c1024915f5274cd29eb9b2c0b86adbcf       |
| service_name | nova                                   |
| service_type | compute                                |
+--------------+----------------------------------------+

$ nova list --all-tenants
+--------------------------------------+---------------+----------------------------------+--------+------------+-------------+---------------------------------+
| ID                                   | Name          | Tenant ID                        | Status | Task State | Power State | Networks                        |
+--------------------------------------+---------------+----------------------------------+--------+------------+-------------+---------------------------------+
| 9cc9944d-66a6-4ee8-9862-8272e44d8ea0 | test          | e7c363ac547242c0b2e3dacbe6efba57 | ACTIVE | -          | Running     | provider_vlan194=??.???.??.???  |
| 45722adb-9277-4771-884a-c42b959b7bc9 | lab101        | e7c363ac547242c0b2e3dacbe6efba57 | ACTIVE | -          | Running     | provider_vlan193=??.???.??.???  |
| 86f80e83-adaa-4768-9991-36b3aab58e8b | lab102        | e7c363ac547242c0b2e3dacbe6efba57 | ACTIVE | -          | Running     | provider_vlan192=??.???.??.???  |
| db44b737-42fe-4f2b-b764-45078a443cf6 | test          | a609966ad78e4eaf97f5a5dbc4c05849 | ERROR  | -          | NOSTATE     |                                 |
| a0bf7342-5a8c-459d-933e-5b084b7ab935 | test2         | a609966ad78e4eaf97f5a5dbc4c05849 | ACTIVE | -          | Running     | provider_vlan1013=??.???.??.??? |
+--------------------------------------+---------------+----------------------------------+--------+------------+-------------+---------------------------------+

Regards,
Matt
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.

Simon Pasquier

unread,
Oct 24, 2017, 8:09:20 AM10/24/17
to Matt Russi, Prometheus Users
Hmm, this is weird because everything looks ok. That being said, I've tested personally with the Keystone v2 API and I know that the v3 API is slightly different. So maybe the gophercloud client isn't recent enough and doesn't handle v3 properly?
If you still have the Keystone v2 API enabled, I would suggest to try with it.
BR,
Simon

To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/27924556-87dc-4edf-a0d6-d67371bc0cf1%40googlegroups.com.

r3sp...@gmail.com

unread,
Jan 4, 2018, 5:21:20 AM1/4/18
to Prometheus Users
The issue you're facing is most probably that you haven't defined project_name.
Reply all
Reply to author
Forward
0 new messages