{"id":789,"date":"2017-12-14T11:07:22","date_gmt":"2017-12-14T11:07:22","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=789"},"modified":"2024-03-05T10:38:29","modified_gmt":"2024-03-05T09:38:29","slug":"snmpget-plugin-for-snmp-v2c","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/snmpget-plugin-for-snmp-v2c\/","title":{"rendered":"SNMPGET plugin for snmp v2c"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_text _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<div class=\"maint-error\">\n  <img decoding=\"async\" src=\"http:\/\/pandorafms.com\/library\/wp-content\/uploads\/2024\/02\/Plugin-out-of-maintenance-alt.png\"><\/p>\n<p><strong>Important Notice:<\/strong> This plugin is no longer actively maintained or updated. We strongly advise you to explore alternative plugins available in our library for the latest features and support.<\/p>\n<\/div>\n<p><\/p>\n<p>This is a small server plugin developed for Pandora FMS v3.0 that enables creation of Pandora plugin modules to work with snmp protocol version 1 and 2c.<\/p>\n<h2>Module data<\/h2>\n<pre>\r\n#!\/bin\/bash\r\n######################################################\r\n# snmpget remote plugin for Pandora FMS Server\r\n# Developed by Miguel Sanz (2009)\r\n#\r\n# This program is free software; you can redistribute it and\/or\r\n# modify it under the terms of the GNU General Public License\r\n# as published by the Free Software Foundation; version 2\r\n# This program is distributed in the hope that it will be useful,\r\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n# GNU General Public License for more details.\r\n# You should have received a copy of the GNU General Public License\r\n# along with this program; if not, write to the Free Software\r\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r\n######################################################\r\n\r\n\r\n\r\n# Default values\r\nHOST=\"\"\r\nPORT=161\r\nCOMMUNITY=\"public\"\r\nVERSION=\"\"\r\nOID=\"\"\r\n\r\nfunction help {\r\necho -e \"snmpget remote Plugin for Pandora FMS Plugin server\"\r\necho -e \"Syntax:\"\r\necho -e \"\\t\\t-h host\"\r\necho -e \"\\t\\t-p port (by default 161)\"\r\necho -e \"\\t\\t-c community\"\r\necho -e \"\\t\\t-v version (1 or 2c)\"\r\necho -e \"\\t\\t-o OID\\n\"\r\necho -e \"Samples:\"\r\necho \" .\/snmpget_plugin.sh -h 192.168.0.51 -p 161 -c public -v 1 -o 1.3.6.1.4.1.1.4988.1303.1.0\"\r\necho \" .\/snmpget_plugin.sh -h localhost -c public -v 2c -o sysDescr.0\"\r\necho \" .\/snmpget_plugin.sh -h 192.168.0.101 -p 166 -c public -v 2c -o 1.3.6.1.4.1.1.4988.1303.1.0\"\r\necho \" .\/snmpget_plugin.sh -h 192.168.0.101 -p 166 -c public -v 2c -o 1.3.6.1.4.1.1.4988.1303.1.0\"\r\necho \"\"\r\nexit\r\n}\r\n\r\n\r\nif [ $# -eq 0 ]\r\nthen\r\nhelp\r\nfi\r\n\r\n# Main parsing code\r\n\r\nwhile getopts \":h:p:c:v:o:\" optname\r\ndo\r\ncase \"$optname\" in\r\n\"h\")\r\nHOST=$OPTARG\r\n;;\r\n\"p\")\r\nPORT=$OPTARG\r\n;;\r\n\"c\")\r\nCOMMUNITY=$OPTARG\r\n;;\r\n\"v\")\r\nVERSION=$OPTARG\r\n;;\r\n\"o\")\r\nOID=$OPTARG\r\n;;\r\n?)\r\nhelp\r\n;;\r\ndefault)\r\nhelp\r\n;;\r\nesac\r\ndone\r\n\r\n# if PORT=0 change to PORT=161\r\n\r\nif [ $PORT -eq 0 ]\r\nthen\r\nPORT=161\r\nfi\r\n\r\n# Execution\r\n\r\nsnmpget $HOST:$PORT -c $COMMUNITY -v $VERSION -O Uevqt $OID\r\n\r\n<\/pre>\n<h2>Files:<\/h2>\n<p><a href=\"\/library\/files_repository\/1268144488.micky.snmpget_plugin.sh\">snmpget_plugin.sh<\/a>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Important Notice: This plugin is no longer actively maintained or updated. We strongly advise you to explore alternative plugins available in our library for the latest features and support. This is a small server plugin developed for Pandora FMS v3.0 that enables creation of Pandora plugin modules to work with snmp protocol version 1 and [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<div class=\"maint-error\">\r\n  <img src=\"http:\/\/pandorafms.com\/library\/wp-content\/uploads\/2024\/02\/Plugin-out-of-maintenance-alt.png\">\r\n  <p><strong>Important Notice:<\/strong> This plugin is no longer actively maintained or updated. We strongly advise you to explore alternative plugins available in our library for the latest features and support.<p>\r\n<\/div>\r\n\r\n<br>\r\n\r\nThis is a small server plugin developed for Pandora FMS v3.0 that enables creation of Pandora plugin modules to work with snmp protocol version 1 and 2c.\r\n\r\n<h2>Module data<\/h2>\r\n<pre>\r\n#!\/bin\/bash\r\n######################################################\r\n# snmpget remote plugin for Pandora FMS Server\r\n# Developed by Miguel Sanz (2009)\r\n#\r\n# This program is free software; you can redistribute it and\/or\r\n# modify it under the terms of the GNU General Public License\r\n# as published by the Free Software Foundation; version 2\r\n# This program is distributed in the hope that it will be useful,\r\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n# GNU General Public License for more details.\r\n# You should have received a copy of the GNU General Public License\r\n# along with this program; if not, write to the Free Software\r\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r\n######################################################\r\n\r\n\r\n\r\n# Default values\r\nHOST=\"\"\r\nPORT=161\r\nCOMMUNITY=\"public\"\r\nVERSION=\"\"\r\nOID=\"\"\r\n\r\nfunction help {\r\necho -e \"snmpget remote Plugin for Pandora FMS Plugin server\"\r\necho -e \"Syntax:\"\r\necho -e \"\\t\\t-h host\"\r\necho -e \"\\t\\t-p port (by default 161)\"\r\necho -e \"\\t\\t-c community\"\r\necho -e \"\\t\\t-v version (1 or 2c)\"\r\necho -e \"\\t\\t-o OID\\n\"\r\necho -e \"Samples:\"\r\necho \" .\/snmpget_plugin.sh -h 192.168.0.51 -p 161 -c public -v 1 -o 1.3.6.1.4.1.1.4988.1303.1.0\"\r\necho \" .\/snmpget_plugin.sh -h localhost -c public -v 2c -o sysDescr.0\"\r\necho \" .\/snmpget_plugin.sh -h 192.168.0.101 -p 166 -c public -v 2c -o 1.3.6.1.4.1.1.4988.1303.1.0\"\r\necho \" .\/snmpget_plugin.sh -h 192.168.0.101 -p 166 -c public -v 2c -o 1.3.6.1.4.1.1.4988.1303.1.0\"\r\necho \"\"\r\nexit\r\n}\r\n\r\n\r\nif [ $# -eq 0 ]\r\nthen\r\nhelp\r\nfi\r\n\r\n# Main parsing code\r\n\r\nwhile getopts \":h:p:c:v:o:\" optname\r\ndo\r\ncase \"$optname\" in\r\n\"h\")\r\nHOST=$OPTARG\r\n;;\r\n\"p\")\r\nPORT=$OPTARG\r\n;;\r\n\"c\")\r\nCOMMUNITY=$OPTARG\r\n;;\r\n\"v\")\r\nVERSION=$OPTARG\r\n;;\r\n\"o\")\r\nOID=$OPTARG\r\n;;\r\n?)\r\nhelp\r\n;;\r\ndefault)\r\nhelp\r\n;;\r\nesac\r\ndone\r\n\r\n# if PORT=0 change to PORT=161\r\n\r\nif [ $PORT -eq 0 ]\r\nthen\r\nPORT=161\r\nfi\r\n\r\n# Execution\r\n\r\nsnmpget $HOST:$PORT -c $COMMUNITY -v $VERSION -O Uevqt $OID\r\n\r\n<\/pre>\r\n\r\n\r\n\r\n<h2>Files:<\/h2>\r\n\r\n<a href=\"\/library\/files_repository\/1268144488.micky.snmpget_plugin.sh\">snmpget_plugin.sh<\/a>","_et_gb_content_width":"","footnotes":""},"categories":[7,40],"tags":[172,187,188],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/789"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=789"}],"version-history":[{"count":2,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/789\/revisions"}],"predecessor-version":[{"id":8341,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/789\/revisions\/8341"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}