{"id":1410,"date":"2013-10-06T08:33:27","date_gmt":"2013-10-06T06:33:27","guid":{"rendered":"http:\/\/www.extradrm.com\/?p=1410"},"modified":"2013-10-06T08:40:53","modified_gmt":"2013-10-06T06:40:53","slug":"how-to-enable-snmp-monitoring-on-ubuntu-server-12-04","status":"publish","type":"post","link":"https:\/\/www.extradrm.com\/?p=1410","title":{"rendered":"How to enable SNMP Monitoring on Ubuntu Server 12.04"},"content":{"rendered":"<p><strong>snmpd<\/strong> is an SNMP agent which binds to a port and awaits requests from SNMP management software. Upon receiving a request, it processes the request(s), collects the requested information and\/or performs the requested operation(s) and returns the information to the sender.<\/p>\n<p>Make sure that snmp is installed on your server : if not you must first do : apt-get snmp.<\/p>\n<p><strong>Install SNMPD<\/strong><\/p>\n<pre>sudo apt-get install snmpd\r\nCreate a backup file of snmpd.conf original file that we will edit later<\/pre>\n<pre> sudo mv \/etc\/snmp\/snmpd.conf \/etc\/snmp\/snmpd.conf.ori<\/pre>\n<p>Create the new snmpd.conf file<\/p>\n<pre> sudo nano \/etc\/snmp\/snmpd.conf<\/pre>\n<p>Add the file with these lines<\/p>\n<pre>rocommunity public\r\nsyslocation \"Your Location\"\r\nsyscontact admin@domain.com<\/pre>\n<p>Then edit the \/etc\/default\/snmpd file<\/p>\n<pre>sudo nano \/etc\/default\/snmpd<\/pre>\n<p>Disable this line below by adding # in front of the line<\/p>\n<pre>#SNMPDOPTS='-Lsd -Lf \/dev\/null -u snmp -g snmp -I -smux -p \/var\/run\/snmpd.pid'<\/pre>\n<p>And add a new line<\/p>\n<pre>SNMPDOPTS='-Lsd -Lf \/dev\/null -u snmp -I -smux -p \/var\/run\/snmpd.pid -c \/etc\/snmp\/snmpd.conf'<\/pre>\n<p>Restart the SNMPD service<\/p>\n<pre> sudo \/etc\/init.d\/snmpd restart\r\n* Restarting network management services<\/pre>\n<hr\/>\n<h3>Test snmp transfer data<\/h3>\n<p>Do a <strong>snmpwalk <\/strong>from another host against your newly configured host. <strong>the udp port do not need to be opened on the monitored host.<\/strong><\/p>\n<pre>[root@op5 ~]# snmpwalk -v 1 -c public -O e your_ip_server_to_be_monitored\r\nSNMPv2-MIB::sysDescr.0 = STRING: Linux ibsen 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686\r\nSNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10\r\nDISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (68869) 0:11:28.69\r\nSNMPv2-MIB::sysContact.0 = STRING: peter@it-slav.net\r\nSNMPv2-MIB::sysName.0 = STRING: ibsen\r\nSNMPv2-MIB::sysLocation.0 = STRING: \"PDC, Peters DataCenter\"\r\nSNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01\r\nSNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance\r\nSNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance\r\nSNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance\r\nSNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB\r\nSNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB\r\nSNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip<\/pre>\n<p>Yes it works!!<br \/>\nCheers<\/p>\n","protected":false},"excerpt":{"rendered":"<p>snmpd is an SNMP agent which binds to a port and awaits requests from SNMP management software. Upon receiving a request, it processes the request(s), collects the requested information and\/or performs the requested operation(s)&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2843,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[209,14],"tags":[234,236,237,238,239],"youtube_video":null,"_links":{"self":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1410"}],"collection":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1410"}],"version-history":[{"count":0,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1410\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/media\/2843"}],"wp:attachment":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}