{"id":674,"date":"2017-08-02T03:15:02","date_gmt":"2017-08-02T01:15:02","guid":{"rendered":"http:\/\/www.maartenmoerman.nl\/?p=674"},"modified":"2017-08-02T03:42:29","modified_gmt":"2017-08-02T01:42:29","slug":"1-minute-polling-on-observium","status":"publish","type":"post","link":"https:\/\/www.maartenmoerman.nl\/?p=674","title":{"rendered":"How to configure 1 minute polling on Observium"},"content":{"rendered":"<p>1 Minute polling for Observium, quite an interesting and useful feature if you ask me. Especially with large capacity interfaces such as 25\/40\/100gbit interfaces, there&#8217;s tiny differences which could be interesting to spot, and you just can&#8217;t see those when you are using 5 minute polling. Another interesting used case for example are your uplinks, and your core links in your network.<\/p>\n<p>By default Observium is not setup to do this, and it requires a couple of changes. Now luckily, it&#8217;s not that hard to change this, as the configuration settings for the RRDs are a bit hidden, but setup in such a way, that you can actually change this.<\/p>\n<p>First before we get into the details on how to actually do this there are a couple of things you&#8217;ll need\/want to know:<\/p>\n<p><span style=\"color: red;\"><b>N E E D\u00a0\u00a0\u00a0T O\u00a0\u00a0\u00a0 K N O W :<\/b><\/span><\/p>\n<ul>\n<li>These changes are an all or nothing setup. Meaning, all your things will be polled on a 1 minute interval, that is sensors, ports, cpu&#8217;s, memory, everything. No possibility to do just a couple of things on 1 minute intervals<\/li>\n<li>You\u00a0<strong>NEED<\/strong> to do this\u00a0with an empty RRD directory \/ new installation, as RRD files need to be recreated with the proper &#8216;time brackets&#8217; configured in them<\/li>\n<li>I have not tested it on an existing installation, so i don&#8217;t know what will happen, you could probably loose your data, or at least corrupt it. I simply don&#8217;t know enough of RRDtool what will happen.<\/li>\n<li>Make sure all your devices finish their polling within 1 minute<\/li>\n<li>It&#8217;s NOT, and i repeat NOT an officially supported thing. Observium (Adam Armstrong) recommends against it<\/li>\n<li>There will be a 5time increase in load on your server<\/li>\n<li>Your disk IO will increase by 5 times as well. Keep that in mind if your are for example runnning your RRD directory on an SSD, as this will wear out 5 times as fast<\/li>\n<\/ul>\n<p><b>Configuration<\/b><br \/>\nOk, let&#8217;s see how to configure this:<\/p>\n<p>In the default configuration thats deployed once you have downloaded it, the RRD settings are configured for:<\/p>\n<ul>\n<li>7 days of 5 minutes<\/li>\n<li>62 days of 30 minutes<\/li>\n<li>120 days of 2 hours<\/li>\n<li>4 years of 1 day<\/li>\n<\/ul>\n<p>Now these settings are perfectly acceptable for me, except the first one ofcourse. We&#8217;ll want that to change to 1 minute.<\/p>\n<p>You&#8217;ll need to make changes in 2 places:<\/p>\n<ul>\n<li>Observium configuration file<\/li>\n<li>Crontab<\/li>\n<\/ul>\n<p>Your configuration is stored in, and you can lookup them up in the file <strong>\/opt\/observium\/includes\/defaults.inc.php<\/strong><\/p>\n<p>It looks like this:<\/p>\n<blockquote><p><code><br \/>\n\/\/ Default Poller Interval (in seconds)<br \/>\n$config['rrd']['step'] = 300;<br \/>\n\/\/ 7 days of 5 min 62 days of 30 min 120 days of 2 hour 4 years of 1 day<br \/>\n$config['rrd']['rra'] = \"RRA:AVERAGE:0.5:1:2016 RRA:AVERAGE:0.5:6:2976 RRA:AVERAGE:0.5:24:1440 RRA:AVERAGE:0.5:288:1440 \";<br \/>\n$config['rrd']['rra'] .= \" RRA:MIN:0.5:6:1440 RRA:MIN:0.5:96:360 RRA:MIN:0.5:288:1440 \";<br \/>\n$config['rrd']['rra'] .= \" RRA:MAX:0.5:6:1440 RRA:MAX:0.5:96:360 RRA:MAX:0.5:288:1440 \";<br \/>\n<\/code><\/p><\/blockquote>\n<p>Now you could modify the RRD settings in this file, but that&#8217;s not really helping if the default settings get adjusted when you upgrade your Observium instance. So change it in the file <strong>\/opt\/observium\/config.php<\/strong><\/p>\n<p>Change 2 things in that piece of text:<\/p>\n<ul>\n<li>the rrd step size from 300 to 60<\/li>\n<li>the first RRA value from RRA:AVERAGE:0.5:1:2016 to RRA:AVERAGE:0.5:1:10080<\/li>\n<\/ul>\n<p>Once this has been changed, change your cronjob (<strong>\/etc\/cron.d\/observium<\/strong>) to run poller-wrapper \/ poller every minute<\/p>\n<p>That should be it! Enjoy your 1 minute resolution in Observium!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 Minute polling for Observium, quite an interesting and useful feature if you ask me. Especially with large capacity interfaces such as 25\/40\/100gbit interfaces, there&#8217;s tiny differences which could be interesting to spot, and you just can&#8217;t see those when you are using 5 minute polling. Another interesting used case for example are your uplinks, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=\/wp\/v2\/posts\/674"}],"collection":[{"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=674"}],"version-history":[{"count":13,"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=\/wp\/v2\/posts\/674\/revisions"}],"predecessor-version":[{"id":687,"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=\/wp\/v2\/posts\/674\/revisions\/687"}],"wp:attachment":[{"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.maartenmoerman.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}