prometheus / prometheus/pushgateway
Specify the instance grouping key in the message body instead of the URL
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.4k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
updated with a clearer suggestion of a solution
Feature request
Permit specifying the instance in the body of the message and that it can be used as a grouping key in addition to the job name.
NxLog(for example) which can send http output to pushgateway, cannot have dynamic variables in the URL itself. This would provide a more open and flexible method of sending data to the pushgateway.
The message body would contain a label which would be considered as a grouping key in addition to the job.
This label should have strict rules in how it can be recognized as an additionnal grouping key. (label prefix name, particular label name. or other method.
Bug Report
What did you do?
Configure NxLog to send data:
http://10.10.0.1:9091/metrics/job/job_name/
metricname{instance="1234",label2="value2"} 50
What did you expect to see?
Grouping key job_name, instance.
What did you see instead? Under which circumstances?
Grouping key is only: job_name
Instance in this case is considered a regular label and not a grouping key.
If specifying a label with a particular name or semantic (KEY_name, or instance) in the body, I would expect it to be used as an additionnal grouping key.
Ubuntu 18.04LTS, pushgateway version 1.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names the Pushgateway HTTP endpoint and metric message body, but no repository files or tests. Start by tracing how the endpoint parses grouping keys from the URL and metric labels, then clarify the recognition rule for a body label. Done means the behavior and its strict label semantics are agreed and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100