-
Notifications
You must be signed in to change notification settings - Fork 47
Add environment Info to return. #2
Comments
@JamesBarwell You think this might be an easy one we can knock off? |
Should be easy if we can get the environment name passed into the node process somehow. Could it be made available as an environment variable by adjusting the docker-compose file? I'm thinking that exposing it as a label would be better than trying to insert it into the variable name. I'd prefer to keep the metric names static, which as far as I'm aware is how every other exporter does it. |
Indeed, labels are probably the best bet here. We can populate with the details within the API, it should be listed on each object as a parent. |
FYI I'd would like this feature too. In the meantime I worked around it with relabeling:
In case it helps someone else ! |
I've been experimenting with monitoring multiple environment with a single instance of this service, and having env field out of the box would be great (as would stack and service fields everywhere they're relevant!). For now I'm doing something similar to @jmatsushita by setting labels via my custom discovery mechanism. |
Hi All, Looking at scoping this one out, i'm after some clarity however on peoples requirements: @joshbenner @jmatsushita - To confirm, is it the rancher 'environment' that you wish to be populated for each of the metrics? I can't get at the Rancher server details, but it seems i can list the projects. The downside would be, if you wish to monitor projects outside your environment, you would need to supply API credentials with the appropriate privileged against those 'environments'. The smart labels wouldn't then be applicable. For those using this as part of the community catalog template, this would only handle the prometheus integration with the API. To discover hosts and containers in other environments, you would have to do some manual configuration, can't see a way around this. |
+1 |
For running multiple ones of these, we need to either:
As highlighted in infinityworks/prom-conf#2
The text was updated successfully, but these errors were encountered: