{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/315","repository_url":"https://api.github.com/repos/prometheus/snmp_exporter","labels_url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/315/comments","events_url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/315/events","html_url":"https://github.com/prometheus/snmp_exporter/issues/315","id":340128515,"node_id":"MDU6SXNzdWUzNDAxMjg1MTU=","number":315,"title":"Config parser loads invalid metric names.","user":{"login":"SuperQ","id":1320667,"node_id":"MDQ6VXNlcjEzMjA2Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/1320667?v=4","gravatar_id":"","url":"https://api.github.com/users/SuperQ","html_url":"https://github.com/SuperQ","followers_url":"https://api.github.com/users/SuperQ/followers","following_url":"https://api.github.com/users/SuperQ/following{/other_user}","gists_url":"https://api.github.com/users/SuperQ/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperQ/subscriptions","organizations_url":"https://api.github.com/users/SuperQ/orgs","repos_url":"https://api.github.com/users/SuperQ/repos","events_url":"https://api.github.com/users/SuperQ/events{/privacy}","received_events_url":"https://api.github.com/users/SuperQ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-11T07:46:36Z","updated_at":"2018-08-15T10:54:12Z","closed_at":null,"author_association":"MEMBER","body":"The config parser needs to validate metric names against Prometheus [valid metric names](https://prometheus.io/docs/instrumenting/writing_exporters/#naming).\r\n\r\nI don't remember if there's a function or not, but we could implement this with a basic regexp: `[a-zA-Z_]([a-zA-Z0-9_])*`\r\n\r\nFor example, this should fail:\r\n```yaml\r\nif_mib:\r\n  walk:\r\n  - 1.3.6.1.2.1.2\r\n  get:\r\n  - 1.3.6.1.2.1.1.3.0\r\n  metrics:\r\n  - name: sys.UpTime\r\n    oid: 1.3.6.1.2.1.1.3\r\n    type: gauge\r\n```"},"comment":{"url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/comments/413163125","html_url":"https://github.com/prometheus/snmp_exporter/issues/315#issuecomment-413163125","issue_url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/315","id":413163125,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzE2MzEyNQ==","user":{"login":"RichiH","id":754723,"node_id":"MDQ6VXNlcjc1NDcyMw==","avatar_url":"https://avatars2.githubusercontent.com/u/754723?v=4","gravatar_id":"","url":"https://api.github.com/users/RichiH","html_url":"https://github.com/RichiH","followers_url":"https://api.github.com/users/RichiH/followers","following_url":"https://api.github.com/users/RichiH/following{/other_user}","gists_url":"https://api.github.com/users/RichiH/gists{/gist_id}","starred_url":"https://api.github.com/users/RichiH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichiH/subscriptions","organizations_url":"https://api.github.com/users/RichiH/orgs","repos_url":"https://api.github.com/users/RichiH/repos","events_url":"https://api.github.com/users/RichiH/events{/privacy}","received_events_url":"https://api.github.com/users/RichiH/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T10:54:12Z","updated_at":"2018-08-15T10:54:12Z","author_association":"MEMBER","body":"The generator has come a long way, but e.g. https://github.com/prometheus/snmp_exporter/issues/180 is still blocking a lot of people from using it. I know of several reimplementations of snmp_exporter due to this and other factors.\r\n\r\nUsers crafting configs by hand will not stop just because the handcrafted part is kept brittle.\r\n\r\n@SuperQ and me are willing & able to support people who handcraft configs so you would not need to care about that.\r\n\r\n"}}
{"actor":{"display_login":"RichiH"}}