Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCan't relabel based on instance from pushgateway #871
Comments
This comment has been minimized.
This comment has been minimized.
|
First you want the Second without that, you'd want to work with |
This comment has been minimized.
This comment has been minimized.
|
On 02/07/15 15:00, Brian Brazil wrote:
I think this is not the same case you are thinking about. The instance For example, this is a successful relabel from the host_exporter: node_memory_MemUsed{dc="cap",host="capXX.YY",instance="capXX-oam.YY:6100",job="node",monitor="ZZ"} And this is the one that fails: DocumentStoreEntriesCount{exporter_instance="localhost:6101",exporter_job="pushgateway",instance="capXX.YY:16892",job="JJ",monitor="ZZ"} As you see, I am missing the host and dc labels. Martín Ferrari (Tincho) |
This comment has been minimized.
This comment has been minimized.
|
@fabxc will know more. I guess this has to do with the exact order of relabelings (wich also might or might not have changed in 0.15.0). |
This comment has been minimized.
This comment has been minimized.
|
Could it be that |
This comment has been minimized.
This comment has been minimized.
|
But in this case, instance is set by the pushgateway already, isn't it? |
This comment has been minimized.
This comment has been minimized.
|
Without the |
This comment has been minimized.
This comment has been minimized.
|
According to @TheTincho 's example, the instance label set on the PGW is |
This comment has been minimized.
This comment has been minimized.
|
Hmm, that's not the right behaviour at all. I suspect the issue is you're not using a new enough prometheus - try a build from head. |
This comment has been minimized.
This comment has been minimized.
|
0.14.0 does not have As regular What you have should work with 0.15.0rc1. |
This comment has been minimized.
This comment has been minimized.
|
On 02/07/15 18:19, Fabian Reinartz wrote:
To answer all comments at once: I am setting the 'instance' label in the PGW, via PUT I tried using relabel_config instead of metric_relabel_configs, and no
And this also gets ignored silently.. Both with 0.14.0 and with Martín Ferrari (Tincho) |
This comment has been minimized.
This comment has been minimized.
|
It might be a static label for you but for Prometheus it's not. Static labels are those associated with scrape targets, which is PGW itself in your case and none of the instances pushing to it. What is the |
This comment has been minimized.
This comment has been minimized.
|
Sorry for the silence. I will try to reproduce this in a minimal test and report back. |
This comment has been minimized.
This comment has been minimized.
|
So, I made a test. First with 0.14.0 and then with 0.15.0rc1. The test configuration is as follows:
And the data in the PGW:
I can confirm that there is an issue in both versions: 0.15.0rc1:
0.14.0 (copy&paste from the webpage, as I learn now prom-cli does not work with this version!)
You can see that in neither case the To double-check, I performed similar tests with the node_exporter. As expected, Configuration:
And the result (0.15.0rc1):
So... Am I doing something wrong here? |
This comment has been minimized.
This comment has been minimized.
|
When a new target is discovered it comes with a set of labels that are assigned to all metrics scraped from this target. For PGW your target is PGW itself, the instances that pushed to it are entirely unknown to Prometheus. Based on that knowledge the above applies. |
This comment has been minimized.
This comment has been minimized.
|
OK, now I understand my mistake: I misunderstood what Closing this now. |
TheTincho
closed this
Jul 8, 2015
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
TheTincho commentedJul 2, 2015
Hi,
I have set up a pushgateway to collect stats from logs in different instances of the same service. As I want to be able to easily match these data with the node_exporter stats, I am creating a label 'host' from the instance.
This works well for the node_exporter job (using the
__address__meta metric as a source), but I cannot make it work with the pushgateway; I've triedrelabel_configsandmetric_relabel_configswith the same regex that works for the node_exporter, using theinstancemetric, but it seems that it is being ignored.Config snippet: