{"id":326,"date":"2015-02-18T14:43:00","date_gmt":"2015-02-18T14:43:00","guid":{"rendered":"https:\/\/www.geekmungus.co.uk\/?p=326"},"modified":"2022-11-05T10:53:19","modified_gmt":"2022-11-05T10:53:19","slug":"ubuntu-linux-14-04-lts-snmpd-configuration-with-baracuda-load-balancer","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=326","title":{"rendered":"Ubuntu Linux 14.04 LTS &#8211; SNMPD Configuration with Baracuda Load Balancer"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We have some Linux web servers that we use for Moodle they are setup behind a Barracuda Load Balancer that then distributes the load based on how busy each of the web servers are. Essentially the more busy the server the less clients it is given to process. The barracuda load balancer uses an SNMP query determining the current load.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Barracuda load balancer side is well documented, but the configuration on your Linux box is not so much, so assuming you&#8217;ve configured the Barracuda you just need to follow these steps on the 14.04 LTS Ubuntu server. Remember this is a basic configuration, offering basic security, so if you are looking to do this you need to review these settings, but this gives a basic operational configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Firstly install SNMPD (the SNMP agent) that can respond to SNMP queries:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install snmpd (Install the SNMP listener)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now download the SNMP MIBS, these are not included in the SNMP package anymore you need to get them separately with this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install snmp-mibs-downloader<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once this is done you need to replace the \/etc\/snmp\/snmpd.conf file with the following, this will allow you to access this SNMP agent from any host on the 192.168.0.0\/24 network using the community string: &#8220;mycommunitystring.&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>###############################################################################\n#\n#  AGENT BEHAVIOUR\n#\n###############################################################################\n#  Listen for connections from all IPv4 addresses on the network\nagentAddress udp:161\n###############################################################################\n#\n#  ACCESS CONTROL\n#\n###############################################################################\nview   systemonly  included   .1.3.6.1.2.1.1\nview   systemonly  included   .1.3.6.1.2.1.25.1\n#rocommunity communitystring  default    -V systemonly\nrocommunity mycommunitystring 192.168.0.0\/24\nrouser   authOnlyUser\n###############################################################################\n#\n#  SYSTEM INFORMATION\n#\n###############################################################################\nsysLocation    Place\nsysContact     Things servicedesk@somewhere.com\nsysServices    72\nproc  mountd\nproc  ntalkd    4\nproc  sendmail 10 1\ndisk       \/     10000\ndisk       \/var  5%\nincludeAllDisks  10%\nload   12 10 5\n###############################################################################\n#\n#  ACTIVE MONITORING\n#\n###############################################################################\ntrapsink     localhost public\niquerySecName   internalUser\nrouser          internalUser\ndefaultMonitors          yes\nlinkUpDownNotifications  yes\n###############################################################################\n#\n#  EXTENDING THE AGENT\n#\n###############################################################################\nextend    test1   \/bin\/echo  Hello, world!\nextend-sh test2   echo Hello, world! ; echo Hi there ; exit 35\nmaster          agentx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To get the SNMPD daemon to take the setting restart it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service snmpd restart<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now from another Linux box you should be able to get the CPU load back using SNMPWalk to test with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>snmpwalk -v1 -c mycommunitystring myhost.domain.com 1.3.6.1.4.1.2021.10.1.3.1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If it works you should see something like: UCD-SNMP-MIB::laLoad.1 = STRING: 0.04<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now using the Test button on the Barracuda Load Balancer configuration, you can test the SNMP load balancing you should see it calculating a metric based on the current load of the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additional Links:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/thejoyofstick.com\/blog\/2012\/12\/01\/installing-snmp-mib-files-in-linux-ubuntu-12-04-lts\/\">http:\/\/thejoyofstick.com\/blog\/2012\/12\/01\/installing-snmp-mib-files-in-linux-ubuntu-12-04-lts\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/www.liquidweb.com\/kb\/how-to-install-and-configure-snmp-on-centos\/\">http:\/\/www.liquidweb.com\/kb\/how-to-install-and-configure-snmp-on-centos\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/kaivanov.blogspot.co.uk\/2012\/02\/linux-snmp-oids-for-cpumemory-and-disk.html\">http:\/\/kaivanov.blogspot.co.uk\/2012\/02\/linux-snmp-oids-for-cpumemory-and-disk.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/linuxdrops.com\/how-to-monitor-linux-hosts-using-snmp-oids-for-linux-rhelcentos-ubuntu-debian-fedora\/\">http:\/\/linuxdrops.com\/how-to-monitor-linux-hosts-using-snmp-oids-for-linux-rhelcentos-ubuntu-debian-fedora\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/kb.paessler.com\/en\/topic\/5353-monitoring-linux-problem-snmp-port-not-reachable\">http:\/\/kb.paessler.com\/en\/topic\/5353-monitoring-linux-problem-snmp-port-not-reachable<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have some Linux web servers that we use for Moodle they are setup behind a Barracuda Load Balancer that then distributes the load based on how busy each of the web servers are. Essentially the more busy the server the less clients it is given to process. The barracuda load balancer uses an SNMP &#8230; <a title=\"Ubuntu Linux 14.04 LTS &#8211; SNMPD Configuration with Baracuda Load Balancer\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=326\" aria-label=\"Read more about Ubuntu Linux 14.04 LTS &#8211; SNMPD Configuration with Baracuda Load Balancer\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-326","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/326\/revisions"}],"predecessor-version":[{"id":1446,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/326\/revisions\/1446"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}