{"action":"closed","number":212,"pull_request":{"url":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls/212","id":193752362,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNzUyMzYy","html_url":"https://github.com/martinlindhe/wmi_exporter/pull/212","diff_url":"https://github.com/martinlindhe/wmi_exporter/pull/212.diff","patch_url":"https://github.com/martinlindhe/wmi_exporter/pull/212.patch","issue_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/issues/212","number":212,"state":"closed","locked":false,"title":"Fix IIS warning when IIS collector is NOT in use","user":{"login":"xphyr","id":3779715,"node_id":"MDQ6VXNlcjM3Nzk3MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3779715?v=4","gravatar_id":"","url":"https://api.github.com/users/xphyr","html_url":"https://github.com/xphyr","followers_url":"https://api.github.com/users/xphyr/followers","following_url":"https://api.github.com/users/xphyr/following{/other_user}","gists_url":"https://api.github.com/users/xphyr/gists{/gist_id}","starred_url":"https://api.github.com/users/xphyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xphyr/subscriptions","organizations_url":"https://api.github.com/users/xphyr/orgs","repos_url":"https://api.github.com/users/xphyr/repos","events_url":"https://api.github.com/users/xphyr/events{/privacy}","received_events_url":"https://api.github.com/users/xphyr/received_events","type":"User","site_admin":false},"body":"Hi, whenever you start the collector on a machine without IIS installed you would get a warning like so:\r\nC:\\wmi_exporter>wmi_exporter.exe\r\nWARN[0000] Couldn't open registry to determine IIS version:The system cannot find the file specified.  source=\"iis.go:34\"\r\n\r\nThis error message was causing some confusion since the IIS collector was not enabled.  I moved the IIS version struct into the IISCollector and then put the code that checks for the version inside the \"NewIISCollector\" function.  This way the code checking for IIS only runs IF you enabled the IIS collector, otherwise it never runs, and you dont get an erroneous error.\r\n\r\nI also moved the \"defer\" up to before the check to ensure that the defer is properly handled.\r\n","created_at":"2018-06-09T01:39:31Z","updated_at":"2018-06-10T14:52:20Z","closed_at":"2018-06-10T14:52:20Z","merged_at":"2018-06-10T14:52:20Z","merge_commit_sha":"bb67658853cc3cecc3d83e19c466838a54ed6be9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls/212/commits","review_comments_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls/212/comments","review_comment_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/issues/212/comments","statuses_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/statuses/a95399e090c12349dc359acffcd2c6529b426ec4","head":{"label":"xphyr:master","ref":"master","sha":"a95399e090c12349dc359acffcd2c6529b426ec4","user":{"login":"xphyr","id":3779715,"node_id":"MDQ6VXNlcjM3Nzk3MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3779715?v=4","gravatar_id":"","url":"https://api.github.com/users/xphyr","html_url":"https://github.com/xphyr","followers_url":"https://api.github.com/users/xphyr/followers","following_url":"https://api.github.com/users/xphyr/following{/other_user}","gists_url":"https://api.github.com/users/xphyr/gists{/gist_id}","starred_url":"https://api.github.com/users/xphyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xphyr/subscriptions","organizations_url":"https://api.github.com/users/xphyr/orgs","repos_url":"https://api.github.com/users/xphyr/repos","events_url":"https://api.github.com/users/xphyr/events{/privacy}","received_events_url":"https://api.github.com/users/xphyr/received_events","type":"User","site_admin":false},"repo":{"id":121440148,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE0NDAxNDg=","name":"wmi_exporter","full_name":"xphyr/wmi_exporter","owner":{"login":"xphyr","id":3779715,"node_id":"MDQ6VXNlcjM3Nzk3MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3779715?v=4","gravatar_id":"","url":"https://api.github.com/users/xphyr","html_url":"https://github.com/xphyr","followers_url":"https://api.github.com/users/xphyr/followers","following_url":"https://api.github.com/users/xphyr/following{/other_user}","gists_url":"https://api.github.com/users/xphyr/gists{/gist_id}","starred_url":"https://api.github.com/users/xphyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xphyr/subscriptions","organizations_url":"https://api.github.com/users/xphyr/orgs","repos_url":"https://api.github.com/users/xphyr/repos","events_url":"https://api.github.com/users/xphyr/events{/privacy}","received_events_url":"https://api.github.com/users/xphyr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xphyr/wmi_exporter","description":"Prometheus exporter for Windows machines using WMI","fork":true,"url":"https://api.github.com/repos/xphyr/wmi_exporter","forks_url":"https://api.github.com/repos/xphyr/wmi_exporter/forks","keys_url":"https://api.github.com/repos/xphyr/wmi_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xphyr/wmi_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xphyr/wmi_exporter/teams","hooks_url":"https://api.github.com/repos/xphyr/wmi_exporter/hooks","issue_events_url":"https://api.github.com/repos/xphyr/wmi_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/xphyr/wmi_exporter/events","assignees_url":"https://api.github.com/repos/xphyr/wmi_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/xphyr/wmi_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/xphyr/wmi_exporter/tags","blobs_url":"https://api.github.com/repos/xphyr/wmi_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xphyr/wmi_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xphyr/wmi_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/xphyr/wmi_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xphyr/wmi_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/xphyr/wmi_exporter/languages","stargazers_url":"https://api.github.com/repos/xphyr/wmi_exporter/stargazers","contributors_url":"https://api.github.com/repos/xphyr/wmi_exporter/contributors","subscribers_url":"https://api.github.com/repos/xphyr/wmi_exporter/subscribers","subscription_url":"https://api.github.com/repos/xphyr/wmi_exporter/subscription","commits_url":"https://api.github.com/repos/xphyr/wmi_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/xphyr/wmi_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/xphyr/wmi_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/xphyr/wmi_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/xphyr/wmi_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/xphyr/wmi_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xphyr/wmi_exporter/merges","archive_url":"https://api.github.com/repos/xphyr/wmi_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xphyr/wmi_exporter/downloads","issues_url":"https://api.github.com/repos/xphyr/wmi_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/xphyr/wmi_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/xphyr/wmi_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/xphyr/wmi_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xphyr/wmi_exporter/labels{/name}","releases_url":"https://api.github.com/repos/xphyr/wmi_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/xphyr/wmi_exporter/deployments","created_at":"2018-02-13T21:44:23Z","updated_at":"2018-06-09T17:49:10Z","pushed_at":"2018-06-09T17:49:08Z","git_url":"git://github.com/xphyr/wmi_exporter.git","ssh_url":"git@github.com:xphyr/wmi_exporter.git","clone_url":"https://github.com/xphyr/wmi_exporter.git","svn_url":"https://github.com/xphyr/wmi_exporter","homepage":"","size":1631,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"martinlindhe:master","ref":"master","sha":"aecd90dcf127f1c26ade82939cafc1420eed1906","user":{"login":"martinlindhe","id":181531,"node_id":"MDQ6VXNlcjE4MTUzMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/181531?v=4","gravatar_id":"","url":"https://api.github.com/users/martinlindhe","html_url":"https://github.com/martinlindhe","followers_url":"https://api.github.com/users/martinlindhe/followers","following_url":"https://api.github.com/users/martinlindhe/following{/other_user}","gists_url":"https://api.github.com/users/martinlindhe/gists{/gist_id}","starred_url":"https://api.github.com/users/martinlindhe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinlindhe/subscriptions","organizations_url":"https://api.github.com/users/martinlindhe/orgs","repos_url":"https://api.github.com/users/martinlindhe/repos","events_url":"https://api.github.com/users/martinlindhe/events{/privacy}","received_events_url":"https://api.github.com/users/martinlindhe/received_events","type":"User","site_admin":false},"repo":{"id":66566232,"node_id":"MDEwOlJlcG9zaXRvcnk2NjU2NjIzMg==","name":"wmi_exporter","full_name":"martinlindhe/wmi_exporter","owner":{"login":"martinlindhe","id":181531,"node_id":"MDQ6VXNlcjE4MTUzMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/181531?v=4","gravatar_id":"","url":"https://api.github.com/users/martinlindhe","html_url":"https://github.com/martinlindhe","followers_url":"https://api.github.com/users/martinlindhe/followers","following_url":"https://api.github.com/users/martinlindhe/following{/other_user}","gists_url":"https://api.github.com/users/martinlindhe/gists{/gist_id}","starred_url":"https://api.github.com/users/martinlindhe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinlindhe/subscriptions","organizations_url":"https://api.github.com/users/martinlindhe/orgs","repos_url":"https://api.github.com/users/martinlindhe/repos","events_url":"https://api.github.com/users/martinlindhe/events{/privacy}","received_events_url":"https://api.github.com/users/martinlindhe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martinlindhe/wmi_exporter","description":"Prometheus exporter for Windows machines using WMI","fork":false,"url":"https://api.github.com/repos/martinlindhe/wmi_exporter","forks_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/forks","keys_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/teams","hooks_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/hooks","issue_events_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/events","assignees_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/tags","blobs_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/languages","stargazers_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/stargazers","contributors_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/contributors","subscribers_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/subscribers","subscription_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/subscription","commits_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/merges","archive_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/downloads","issues_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/labels{/name}","releases_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/martinlindhe/wmi_exporter/deployments","created_at":"2016-08-25T14:41:36Z","updated_at":"2018-06-08T05:41:27Z","pushed_at":"2018-06-10T14:52:20Z","git_url":"git://github.com/martinlindhe/wmi_exporter.git","ssh_url":"git@github.com:martinlindhe/wmi_exporter.git","clone_url":"https://github.com/martinlindhe/wmi_exporter.git","svn_url":"https://github.com/martinlindhe/wmi_exporter","homepage":"","size":1584,"stargazers_count":241,"watchers_count":241,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":59,"open_issues":36,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls/212"},"html":{"href":"https://github.com/martinlindhe/wmi_exporter/pull/212"},"issue":{"href":"https://api.github.com/repos/martinlindhe/wmi_exporter/issues/212"},"comments":{"href":"https://api.github.com/repos/martinlindhe/wmi_exporter/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/martinlindhe/wmi_exporter/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/martinlindhe/wmi_exporter/statuses/a95399e090c12349dc359acffcd2c6529b426ec4"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"carlpett","id":214867,"node_id":"MDQ6VXNlcjIxNDg2Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/214867?v=4","gravatar_id":"","url":"https://api.github.com/users/carlpett","html_url":"https://github.com/carlpett","followers_url":"https://api.github.com/users/carlpett/followers","following_url":"https://api.github.com/users/carlpett/following{/other_user}","gists_url":"https://api.github.com/users/carlpett/gists{/gist_id}","starred_url":"https://api.github.com/users/carlpett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlpett/subscriptions","organizations_url":"https://api.github.com/users/carlpett/orgs","repos_url":"https://api.github.com/users/carlpett/repos","events_url":"https://api.github.com/users/carlpett/events{/privacy}","received_events_url":"https://api.github.com/users/carlpett/received_events","type":"User","site_admin":false},"comments":3,"review_comments":1,"maintainer_can_modify":false,"commits":7,"additions":9,"deletions":6,"changed_files":1}}
{"actor":{"display_login":"carlpett"}}