{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/graphite_exporter/issues/10","labels_url":"https://api.github.com/repos/prometheus/graphite_exporter/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/graphite_exporter/issues/10/comments","events_url":"https://api.github.com/repos/prometheus/graphite_exporter/issues/10/events","html_url":"https://github.com/prometheus/graphite_exporter/pull/10","id":125922243,"number":10,"title":"allow user-defined regular expressions","user":{"login":"rokroskar","id":3353586,"avatar_url":"https://avatars.githubusercontent.com/u/3353586?v=3","gravatar_id":"","url":"https://api.github.com/users/rokroskar","html_url":"https://github.com/rokroskar","followers_url":"https://api.github.com/users/rokroskar/followers","following_url":"https://api.github.com/users/rokroskar/following{/other_user}","gists_url":"https://api.github.com/users/rokroskar/gists{/gist_id}","starred_url":"https://api.github.com/users/rokroskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokroskar/subscriptions","organizations_url":"https://api.github.com/users/rokroskar/orgs","repos_url":"https://api.github.com/users/rokroskar/repos","events_url":"https://api.github.com/users/rokroskar/events{/privacy}","received_events_url":"https://api.github.com/users/rokroskar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-11T11:20:30Z","updated_at":"2016-01-13T16:44:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/prometheus/graphite_exporter/pulls/10","html_url":"https://github.com/prometheus/graphite_exporter/pull/10","diff_url":"https://github.com/prometheus/graphite_exporter/pull/10.diff","patch_url":"https://github.com/prometheus/graphite_exporter/pull/10.patch"},"body":"The default simple regex can be too restrictive -- for example, it makes it impossible to import any of the graphite-exported hadoop metrics because they start with a \".\" and contain standard hostnames.\r\n\r\nHere I've modified the metric line parsing to allow for arbitrary user-defined regular expressions on lines that begin with \":userRegExp:\" -- all other metric specifications are treated like before. "},"comment":{"url":"https://api.github.com/repos/prometheus/graphite_exporter/issues/comments/171358607","html_url":"https://github.com/prometheus/graphite_exporter/pull/10#issuecomment-171358607","issue_url":"https://api.github.com/repos/prometheus/graphite_exporter/issues/10","id":171358607,"user":{"login":"rokroskar","id":3353586,"avatar_url":"https://avatars.githubusercontent.com/u/3353586?v=3","gravatar_id":"","url":"https://api.github.com/users/rokroskar","html_url":"https://github.com/rokroskar","followers_url":"https://api.github.com/users/rokroskar/followers","following_url":"https://api.github.com/users/rokroskar/following{/other_user}","gists_url":"https://api.github.com/users/rokroskar/gists{/gist_id}","starred_url":"https://api.github.com/users/rokroskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokroskar/subscriptions","organizations_url":"https://api.github.com/users/rokroskar/orgs","repos_url":"https://api.github.com/users/rokroskar/repos","events_url":"https://api.github.com/users/rokroskar/events{/privacy}","received_events_url":"https://api.github.com/users/rokroskar/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T16:43:59Z","updated_at":"2016-01-13T16:43:59Z","body":"Thanks for the suggestion to try JMX instead -- I've been playing around with it, but it seems to me that the functionality offered by exporting to Graphite is still preferred. For example, using JMX, I would have to configure one instance per node to scrape -- as far as I can tell there are no wildcards allowed in the target specification? Having to specify all the targets by hand for a whole hadoop cluster would be pretty cumbersome. I suppose it could be done [using the custom service discovery functionality](http://prometheus.io/blog/2015/06/01/advanced-service-discovery/#custom-service-discovery) but then you still have to have an external script run to put all the ports and hostnames into a file. \r\n\r\nIn any case, having more flexibility in the regex used for the `graphite_exporter` is still desirable IMO. Why not use a `.yml` (or json) file like in `jmx_exporter`?"}}