{"action":"created","comment":{"url":"https://api.github.com/repos/librenms/librenms/pulls/comments/86815753","pull_request_review_id":7454365,"id":86815753,"diff_hunk":"@@ -37,22 +37,63 @@ function prep_snmp_setting($device, $setting)\n     }\n }//end prep_snmp_setting()\n \n+/**\n+ * @param $device\n+ * @return array $extra will contain a list of mib dirs\n+ */\n+function get_mib_dir($device)\n+{\n+    global $config;\n+    $extra = array();\n+\n+    if (file_exists($config['mib_dir'] . '/' . $device['os'])) {\n+        $extra[] = $config['mib_dir'] . '/' . $device['os'];\n+    }\n+\n+    if (file_exists($config['mib_dir'] . '/' . $device['os_group'])) {\n+        $extra[] = $config['mib_dir'] . '/' . $device['os_group'];\n+    }\n+\n+    if (isset($config['os_groups'][$device['os_group']]['mib_dir'])) {","path":"includes/snmp.inc.php","position":21,"original_position":21,"commit_id":"2b5ddeec9b39532f59fbf03adc017035dc6c1f51","original_commit_id":"2b5ddeec9b39532f59fbf03adc017035dc6c1f51","user":{"login":"murrant","id":39462,"avatar_url":"https://avatars.githubusercontent.com/u/39462?v=3","gravatar_id":"","url":"https://api.github.com/users/murrant","html_url":"https://github.com/murrant","followers_url":"https://api.github.com/users/murrant/followers","following_url":"https://api.github.com/users/murrant/following{/other_user}","gists_url":"https://api.github.com/users/murrant/gists{/gist_id}","starred_url":"https://api.github.com/users/murrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murrant/subscriptions","organizations_url":"https://api.github.com/users/murrant/orgs","repos_url":"https://api.github.com/users/murrant/repos","events_url":"https://api.github.com/users/murrant/events{/privacy}","received_events_url":"https://api.github.com/users/murrant/received_events","type":"User","site_admin":false},"body":"Same here.","created_at":"2016-11-07T16:45:18Z","updated_at":"2016-11-07T16:45:18Z","html_url":"https://github.com/librenms/librenms/pull/4806#discussion_r86815753","pull_request_url":"https://api.github.com/repos/librenms/librenms/pulls/4806","_links":{"self":{"href":"https://api.github.com/repos/librenms/librenms/pulls/comments/86815753"},"html":{"href":"https://github.com/librenms/librenms/pull/4806#discussion_r86815753"},"pull_request":{"href":"https://api.github.com/repos/librenms/librenms/pulls/4806"}}},"pull_request":{"url":"https://api.github.com/repos/librenms/librenms/pulls/4806","id":89498419,"html_url":"https://github.com/librenms/librenms/pull/4806","diff_url":"https://github.com/librenms/librenms/pull/4806.diff","patch_url":"https://github.com/librenms/librenms/pull/4806.patch","issue_url":"https://api.github.com/repos/librenms/librenms/issues/4806","number":4806,"state":"open","locked":false,"title":"Start of cleaning up mibs","user":{"login":"laf","id":3941142,"avatar_url":"https://avatars.githubusercontent.com/u/3941142?v=3","gravatar_id":"","url":"https://api.github.com/users/laf","html_url":"https://github.com/laf","followers_url":"https://api.github.com/users/laf/followers","following_url":"https://api.github.com/users/laf/following{/other_user}","gists_url":"https://api.github.com/users/laf/gists{/gist_id}","starred_url":"https://api.github.com/users/laf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laf/subscriptions","organizations_url":"https://api.github.com/users/laf/orgs","repos_url":"https://api.github.com/users/laf/repos","events_url":"https://api.github.com/users/laf/events{/privacy}","received_events_url":"https://api.github.com/users/laf/received_events","type":"User","site_admin":false},"body":"#### Please note\n\n> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.\n- [x] Have you signed the [Contributors agreement](http://docs.librenms.org/General/Contributing/)\n- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)\n\nThis is just a POC more than anything.\n\nThe idea behind it is that mibs for specific OS' or OS Groups live in the same named folder in mibs. I.e for this example of various zyxel ones I created them as a group and add `mibs/zyxel` and placed all the mibs in that folder. I could have equally done `mibs/zywall` to only target `zywall` os'. You can also specify `$config['os'][$os]['mib_dir'][] = 'somedir';` to hit `mibs/somedir` or `$config['os_groups'][$device['os_group']]['mib_dir'] = 'cisco';` to hit `mibs/cisco`.\n\nThe latter would be in `group-definitions.inc.php` which yes is empty but added now. We can also add other config options for groups here as well.\n\nThoughts? @librenms/reviewers \n","created_at":"2016-10-15T16:33:37Z","updated_at":"2016-11-07T16:50:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eaa06ed95d91a703bddd889eac38a76a5d482973","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/librenms/librenms/pulls/4806/commits","review_comments_url":"https://api.github.com/repos/librenms/librenms/pulls/4806/comments","review_comment_url":"https://api.github.com/repos/librenms/librenms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/librenms/librenms/issues/4806/comments","statuses_url":"https://api.github.com/repos/librenms/librenms/statuses/2b5ddeec9b39532f59fbf03adc017035dc6c1f51","head":{"label":"laf:mib-cleanup","ref":"mib-cleanup","sha":"2b5ddeec9b39532f59fbf03adc017035dc6c1f51","user":{"login":"laf","id":3941142,"avatar_url":"https://avatars.githubusercontent.com/u/3941142?v=3","gravatar_id":"","url":"https://api.github.com/users/laf","html_url":"https://github.com/laf","followers_url":"https://api.github.com/users/laf/followers","following_url":"https://api.github.com/users/laf/following{/other_user}","gists_url":"https://api.github.com/users/laf/gists{/gist_id}","starred_url":"https://api.github.com/users/laf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laf/subscriptions","organizations_url":"https://api.github.com/users/laf/orgs","repos_url":"https://api.github.com/users/laf/repos","events_url":"https://api.github.com/users/laf/events{/privacy}","received_events_url":"https://api.github.com/users/laf/received_events","type":"User","site_admin":false},"repo":{"id":39854429,"name":"librenms","full_name":"laf/librenms","owner":{"login":"laf","id":3941142,"avatar_url":"https://avatars.githubusercontent.com/u/3941142?v=3","gravatar_id":"","url":"https://api.github.com/users/laf","html_url":"https://github.com/laf","followers_url":"https://api.github.com/users/laf/followers","following_url":"https://api.github.com/users/laf/following{/other_user}","gists_url":"https://api.github.com/users/laf/gists{/gist_id}","starred_url":"https://api.github.com/users/laf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laf/subscriptions","organizations_url":"https://api.github.com/users/laf/orgs","repos_url":"https://api.github.com/users/laf/repos","events_url":"https://api.github.com/users/laf/events{/privacy}","received_events_url":"https://api.github.com/users/laf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/laf/librenms","description":"Community-based GPL-licensed network monitoring system","fork":true,"url":"https://api.github.com/repos/laf/librenms","forks_url":"https://api.github.com/repos/laf/librenms/forks","keys_url":"https://api.github.com/repos/laf/librenms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laf/librenms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laf/librenms/teams","hooks_url":"https://api.github.com/repos/laf/librenms/hooks","issue_events_url":"https://api.github.com/repos/laf/librenms/issues/events{/number}","events_url":"https://api.github.com/repos/laf/librenms/events","assignees_url":"https://api.github.com/repos/laf/librenms/assignees{/user}","branches_url":"https://api.github.com/repos/laf/librenms/branches{/branch}","tags_url":"https://api.github.com/repos/laf/librenms/tags","blobs_url":"https://api.github.com/repos/laf/librenms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laf/librenms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laf/librenms/git/refs{/sha}","trees_url":"https://api.github.com/repos/laf/librenms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laf/librenms/statuses/{sha}","languages_url":"https://api.github.com/repos/laf/librenms/languages","stargazers_url":"https://api.github.com/repos/laf/librenms/stargazers","contributors_url":"https://api.github.com/repos/laf/librenms/contributors","subscribers_url":"https://api.github.com/repos/laf/librenms/subscribers","subscription_url":"https://api.github.com/repos/laf/librenms/subscription","commits_url":"https://api.github.com/repos/laf/librenms/commits{/sha}","git_commits_url":"https://api.github.com/repos/laf/librenms/git/commits{/sha}","comments_url":"https://api.github.com/repos/laf/librenms/comments{/number}","issue_comment_url":"https://api.github.com/repos/laf/librenms/issues/comments{/number}","contents_url":"https://api.github.com/repos/laf/librenms/contents/{+path}","compare_url":"https://api.github.com/repos/laf/librenms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laf/librenms/merges","archive_url":"https://api.github.com/repos/laf/librenms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laf/librenms/downloads","issues_url":"https://api.github.com/repos/laf/librenms/issues{/number}","pulls_url":"https://api.github.com/repos/laf/librenms/pulls{/number}","milestones_url":"https://api.github.com/repos/laf/librenms/milestones{/number}","notifications_url":"https://api.github.com/repos/laf/librenms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laf/librenms/labels{/name}","releases_url":"https://api.github.com/repos/laf/librenms/releases{/id}","deployments_url":"https://api.github.com/repos/laf/librenms/deployments","created_at":"2015-07-28T19:47:06Z","updated_at":"2016-10-29T11:11:21Z","pushed_at":"2016-11-04T23:40:54Z","git_url":"git://github.com/laf/librenms.git","ssh_url":"git@github.com:laf/librenms.git","clone_url":"https://github.com/laf/librenms.git","svn_url":"https://github.com/laf/librenms","homepage":"http://www.librenms.org/","size":80909,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"librenms:master","ref":"master","sha":"521f3edd54c0c31b32481f36307349854881c7cb","user":{"login":"librenms","id":5791783,"avatar_url":"https://avatars.githubusercontent.com/u/5791783?v=3","gravatar_id":"","url":"https://api.github.com/users/librenms","html_url":"https://github.com/librenms","followers_url":"https://api.github.com/users/librenms/followers","following_url":"https://api.github.com/users/librenms/following{/other_user}","gists_url":"https://api.github.com/users/librenms/gists{/gist_id}","starred_url":"https://api.github.com/users/librenms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librenms/subscriptions","organizations_url":"https://api.github.com/users/librenms/orgs","repos_url":"https://api.github.com/users/librenms/repos","events_url":"https://api.github.com/users/librenms/events{/privacy}","received_events_url":"https://api.github.com/users/librenms/received_events","type":"Organization","site_admin":false},"repo":{"id":13914116,"name":"librenms","full_name":"librenms/librenms","owner":{"login":"librenms","id":5791783,"avatar_url":"https://avatars.githubusercontent.com/u/5791783?v=3","gravatar_id":"","url":"https://api.github.com/users/librenms","html_url":"https://github.com/librenms","followers_url":"https://api.github.com/users/librenms/followers","following_url":"https://api.github.com/users/librenms/following{/other_user}","gists_url":"https://api.github.com/users/librenms/gists{/gist_id}","starred_url":"https://api.github.com/users/librenms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librenms/subscriptions","organizations_url":"https://api.github.com/users/librenms/orgs","repos_url":"https://api.github.com/users/librenms/repos","events_url":"https://api.github.com/users/librenms/events{/privacy}","received_events_url":"https://api.github.com/users/librenms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/librenms/librenms","description":"Community-based GPL-licensed network monitoring system","fork":false,"url":"https://api.github.com/repos/librenms/librenms","forks_url":"https://api.github.com/repos/librenms/librenms/forks","keys_url":"https://api.github.com/repos/librenms/librenms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/librenms/librenms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/librenms/librenms/teams","hooks_url":"https://api.github.com/repos/librenms/librenms/hooks","issue_events_url":"https://api.github.com/repos/librenms/librenms/issues/events{/number}","events_url":"https://api.github.com/repos/librenms/librenms/events","assignees_url":"https://api.github.com/repos/librenms/librenms/assignees{/user}","branches_url":"https://api.github.com/repos/librenms/librenms/branches{/branch}","tags_url":"https://api.github.com/repos/librenms/librenms/tags","blobs_url":"https://api.github.com/repos/librenms/librenms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/librenms/librenms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/librenms/librenms/git/refs{/sha}","trees_url":"https://api.github.com/repos/librenms/librenms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/librenms/librenms/statuses/{sha}","languages_url":"https://api.github.com/repos/librenms/librenms/languages","stargazers_url":"https://api.github.com/repos/librenms/librenms/stargazers","contributors_url":"https://api.github.com/repos/librenms/librenms/contributors","subscribers_url":"https://api.github.com/repos/librenms/librenms/subscribers","subscription_url":"https://api.github.com/repos/librenms/librenms/subscription","commits_url":"https://api.github.com/repos/librenms/librenms/commits{/sha}","git_commits_url":"https://api.github.com/repos/librenms/librenms/git/commits{/sha}","comments_url":"https://api.github.com/repos/librenms/librenms/comments{/number}","issue_comment_url":"https://api.github.com/repos/librenms/librenms/issues/comments{/number}","contents_url":"https://api.github.com/repos/librenms/librenms/contents/{+path}","compare_url":"https://api.github.com/repos/librenms/librenms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/librenms/librenms/merges","archive_url":"https://api.github.com/repos/librenms/librenms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/librenms/librenms/downloads","issues_url":"https://api.github.com/repos/librenms/librenms/issues{/number}","pulls_url":"https://api.github.com/repos/librenms/librenms/pulls{/number}","milestones_url":"https://api.github.com/repos/librenms/librenms/milestones{/number}","notifications_url":"https://api.github.com/repos/librenms/librenms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/librenms/librenms/labels{/name}","releases_url":"https://api.github.com/repos/librenms/librenms/releases{/id}","deployments_url":"https://api.github.com/repos/librenms/librenms/deployments","created_at":"2013-10-28T01:37:13Z","updated_at":"2016-11-07T11:06:58Z","pushed_at":"2016-11-07T07:05:29Z","git_url":"git://github.com/librenms/librenms.git","ssh_url":"git@github.com:librenms/librenms.git","clone_url":"https://github.com/librenms/librenms.git","svn_url":"https://github.com/librenms/librenms","homepage":"http://www.librenms.org/","size":109139,"stargazers_count":528,"watchers_count":528,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":372,"mirror_url":null,"open_issues_count":303,"forks":372,"open_issues":303,"watchers":528,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/librenms/librenms/pulls/4806"},"html":{"href":"https://github.com/librenms/librenms/pull/4806"},"issue":{"href":"https://api.github.com/repos/librenms/librenms/issues/4806"},"comments":{"href":"https://api.github.com/repos/librenms/librenms/issues/4806/comments"},"review_comments":{"href":"https://api.github.com/repos/librenms/librenms/pulls/4806/comments"},"review_comment":{"href":"https://api.github.com/repos/librenms/librenms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/librenms/librenms/pulls/4806/commits"},"statuses":{"href":"https://api.github.com/repos/librenms/librenms/statuses/2b5ddeec9b39532f59fbf03adc017035dc6c1f51"}}}}
{"actor":{"display_login":"murrant"}}