Thanks! I missed that part. I'll tinker around with it.
On Thu, Nov 19, 2020 at 5:55 PM Christian Hoffmann < [email protected]> wrote: > Hi, > > On 11/19/20 11:32 PM, Laurent Dumont wrote: > > collectd_openstack_nova_gauge{exported_instance=" > site1-director.potato.com > > <http://site1-director.potato.com>",instance="123.123.123.123:9103 > > <http://123.123.123.123:9103>",job="collectors",openstack_nova=" > hypervisor-site1-compute001.potato.com > > <http://hypervisor-site1-compute001.potato.com > >",role="Director",short_hostname="director",site="site1",tripleo_role="Director",type="hypervisor_version"} > > > > In our case, because we are scraping a central endpoint, our > > short_hostname will carry the label of the actual scraped target. > > Ideally, I would want short_hostname to be changed to qasite1-compute001. > > > > I've tried using the following metric_relabel_configs, but while it > > doesn't break anything, it doesn't seem to change the labels when > > looking at Prometheus. > > > > metric_relabel_configs: > > # Change the nova metric short_hostname to the compute name. > > - source_labels: ["openstack_nova"] > > regex: '([a-z]+.-compute\d\d\d)' > > Prometheus regexps are fully anchored. Either try adding the > \.potato\.com suffix to the end of your regex (after the bracket) or > adapt the regex to add some wildcard (e.g. \..+) in the same place. > > Kind regards, > Christian > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAOAKi8wwBy%2BCwv2McnFjHLjzf%2BGaUYvm6FTFtx3b3RapyO-fhg%40mail.gmail.com.

