{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/490","labels_url":"https://api.github.com/repos/prometheus/prometheus/issues/490/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/490/comments","events_url":"https://api.github.com/repos/prometheus/prometheus/issues/490/events","html_url":"https://github.com/prometheus/prometheus/issues/490","id":55982974,"number":490,"title":"Need to be able to collect metrics without adding an instance (or job) label","user":{"login":"brian-brazil","id":7115638,"avatar_url":"https://avatars.githubusercontent.com/u/7115638?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-brazil","html_url":"https://github.com/brian-brazil","followers_url":"https://api.github.com/users/brian-brazil/followers","following_url":"https://api.github.com/users/brian-brazil/following{/other_user}","gists_url":"https://api.github.com/users/brian-brazil/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-brazil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-brazil/subscriptions","organizations_url":"https://api.github.com/users/brian-brazil/orgs","repos_url":"https://api.github.com/users/brian-brazil/repos","events_url":"https://api.github.com/users/brian-brazil/events{/privacy}","received_events_url":"https://api.github.com/users/brian-brazil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/prometheus/prometheus/labels/feature-request","name":"feature-request","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-30T01:27:33Z","updated_at":"2015-03-17T17:41:04Z","closed_at":null,"body":"Service-level stats are exported by things like the push gateway and cloudwatch exporter that don't have an instance label. Currently they'll end up with the instance, such as that of the target.\r\n\r\nWe need a way to signal that for some metrics, that the injection logic isn't to add in an instance or exporter_instance label. Maybe a flag in the config file for targets where this applies, and an empty instance label in the metric protobuf?"},"comment":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/comments/82493845","html_url":"https://github.com/prometheus/prometheus/issues/490#issuecomment-82493845","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/490","id":82493845,"user":{"login":"beorn7","id":5609886,"avatar_url":"https://avatars.githubusercontent.com/u/5609886?v=3","gravatar_id":"","url":"https://api.github.com/users/beorn7","html_url":"https://github.com/beorn7","followers_url":"https://api.github.com/users/beorn7/followers","following_url":"https://api.github.com/users/beorn7/following{/other_user}","gists_url":"https://api.github.com/users/beorn7/gists{/gist_id}","starred_url":"https://api.github.com/users/beorn7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beorn7/subscriptions","organizations_url":"https://api.github.com/users/beorn7/orgs","repos_url":"https://api.github.com/users/beorn7/repos","events_url":"https://api.github.com/users/beorn7/events{/privacy}","received_events_url":"https://api.github.com/users/beorn7/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T17:41:04Z","updated_at":"2015-03-17T17:41:04Z","body":"As recently discussed in https://github.com/prometheus/pushgateway/issues/18 , it looks we should have a directive `honor-client-labels`, in which case the server will not add `exporter_...` labels in case of clashes, but just _not_ add the server provided labels. In addition, if a client wants to prevent an instance (or even job) label altogether, it has to set the respective label value to \"\" (empty string), in which case the server will _not_ add its own version of the label (provided `honor-client-labels` is set, otherwise it will add an `exporter_instance` label), but _after_ that, it will effectively disregard the empty instance label, as empty labels are treated  equivalent to labels not set by the expression language (see https://github.com/prometheus/prometheus/issues/494)."}}