{"action":"created","issue":{"url":"https://api.github.com/repos/ranl/monitor-utils/issues/23","repository_url":"https://api.github.com/repos/ranl/monitor-utils","labels_url":"https://api.github.com/repos/ranl/monitor-utils/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/ranl/monitor-utils/issues/23/comments","events_url":"https://api.github.com/repos/ranl/monitor-utils/issues/23/events","html_url":"https://github.com/ranl/monitor-utils/pull/23","id":149136151,"number":23,"title":"OID Validation for check-cisco.pl","user":{"login":"Retakfual","id":18418847,"avatar_url":"https://avatars.githubusercontent.com/u/18418847?v=3","gravatar_id":"","url":"https://api.github.com/users/Retakfual","html_url":"https://github.com/Retakfual","followers_url":"https://api.github.com/users/Retakfual/followers","following_url":"https://api.github.com/users/Retakfual/following{/other_user}","gists_url":"https://api.github.com/users/Retakfual/gists{/gist_id}","starred_url":"https://api.github.com/users/Retakfual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Retakfual/subscriptions","organizations_url":"https://api.github.com/users/Retakfual/orgs","repos_url":"https://api.github.com/users/Retakfual/repos","events_url":"https://api.github.com/users/Retakfual/events{/privacy}","received_events_url":"https://api.github.com/users/Retakfual/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-18T12:25:25Z","updated_at":"2016-05-09T12:23:36Z","closed_at":"2016-04-18T21:05:53Z","pull_request":{"url":"https://api.github.com/repos/ranl/monitor-utils/pulls/23","html_url":"https://github.com/ranl/monitor-utils/pull/23","diff_url":"https://github.com/ranl/monitor-utils/pull/23.diff","patch_url":"https://github.com/ranl/monitor-utils/pull/23.patch"},"body":"the check for a valid session in _create_session was not working, because $sess was always filled with an hash value even, if there was no session created. I deleted this part instead I created the function check_oid_return, which returns an error, if snmp does not give back any value regarding to the checked oid"},"comment":{"url":"https://api.github.com/repos/ranl/monitor-utils/issues/comments/217849795","html_url":"https://github.com/ranl/monitor-utils/pull/23#issuecomment-217849795","issue_url":"https://api.github.com/repos/ranl/monitor-utils/issues/23","id":217849795,"user":{"login":"Retakfual","id":18418847,"avatar_url":"https://avatars.githubusercontent.com/u/18418847?v=3","gravatar_id":"","url":"https://api.github.com/users/Retakfual","html_url":"https://github.com/Retakfual","followers_url":"https://api.github.com/users/Retakfual/followers","following_url":"https://api.github.com/users/Retakfual/following{/other_user}","gists_url":"https://api.github.com/users/Retakfual/gists{/gist_id}","starred_url":"https://api.github.com/users/Retakfual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Retakfual/subscriptions","organizations_url":"https://api.github.com/users/Retakfual/orgs","repos_url":"https://api.github.com/users/Retakfual/repos","events_url":"https://api.github.com/users/Retakfual/events{/privacy}","received_events_url":"https://api.github.com/users/Retakfual/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T12:23:36Z","updated_at":"2016-05-09T12:23:36Z","body":"Actually I saw, that you create your session always like:\r\n\r\nmy ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => $version, -community => $comm);\r\n \tif (!defined($sess)) {\r\n \t\tprint \"Can't create SNMP session to $server\\n\";\r\n \t\texit(1);\r\n\r\nwhich should not be working, because you get a hash value back even, if there was no session created.\r\nThe way like in check_cisco would be very complicated, maybe you just can check for an empty value behind this hash value?\r\nI am not an Pearl Specialist, so maybe you know how to handle this?\r\nCheers Retakfual"}}