Everything is a Freaking DNS problem - graphite http://127.0.0.1:8080/blog/taxonomy/term/1470/0 en Jenkins, Puppet, Graphite, Logstash and YOU http://127.0.0.1:8080/blog/jenkins-puppet-graphite-logstash-and-you <p>This is a repost of an article I wrote for the Acquia Blog some time ago.</p> <p>As mentioned before, devops can be summarized by talking about culture, automation, monitoring metrics and sharing. Although devops is not about tooling, there are a number of open source tools out there that will be able to help you achieve your goals. Some of those tools will also enable better communication between your development and operations teams.</p> <p>When we talk about Continuous Integration and Continuous Deployment we need a number of tools to help us there. We need to be able to build reproducible artifacts which we can test. And we need a reproducible infrastructure which we can manage in a fast and sane way. To do that we need a Continuous Integration framework like Jenkins.</p> <p>Formerly known as Hudson, Jenkins has been around for a while. The open source project was initially very popular in the Java community but has now gained popularity in different environments. Jenkins allows you to create reproducible Build and Test scenarios and perform reporting on those. It will provide you with a uniform and managed way to , Build, Test, Release and Trigger the deployment of new Artifacts, both traditional software and infrastructure as code-based projects. Jenkins has a vibrant community that builds new plugins for the tool in different kinds of languages. People use it to build their deployment pipelines, automatically check out new versions of the source code, syntax test it and style test it. If needed, users can compile the software, triggering unit tests, uploading a tested artifact into a repository so it is ready to be deployed on a new platform level.</p> <p>Jenkins then can trigger an automated way to deploy the tested software on its new target platform. Whether that be development, testing, user acceptance or production is just a parameter. Deployment should not be something we try first in production, it should be done the same on all platforms. The deltas between these platforms should be managed using a configuration management tool such as Puppet, Chef or friends.</p> <p>In a way this means that Infrastructure as code is a testing dependency, as you also want to be able to deploy a platform to exactly the same state as it was before you ran your tests, so that you can compare the test results of your test runs and make sure they are correct. This means you need to be able to control the starting point of your test and tools like Puppet and Chef can help you here. Which tool you use is the least important part of the discussion, as the important part is that you adopt one of the tools and start treating your infrastructure the same way as you treat your code base: as a tested, stable, reproducible piece of software that you can deploy over and over in a predictable fashion.</p> <p>Configuration management tools such as Puppet, Chef, CFengine are just a part of the ecosystem and integration with Orchestration and monitoring tools is needed as you want feedback on how your platform is behaving after the changes have been introduced. Lots of people measure the impact of a new deploy, and then we obviously move to the M part of CAMS.</p> <p>There, Graphite is one of the most popular tools to store metrics. Plenty of other tools in the same area tried to go where Graphite is going , but both on flexibility, scalability and ease of use, not many tools allow developers and operations people to build dashboards for any metric they can think of in a matter of seconds.</p> <p>Just sending a keyword, a timestamp and a value to the Graphite platform provides you with a large choice of actions that can be done with that metric. You can graph it, transform it, or even set an alert on it. Graphite takes out the complexity of similar tools together with an easy to use API for developers so they can integrate their own self service metrics into dashboards to be used by everyone.</p> <p>One last tool that deserves our attention is Logstash. Initially just a tool to aggregate, index and search the log files of our platform, it is sometimes a huge missed source of relevant information about how our applications behave.. Logstash and it's Kibana+ElasticSearch ecosystem are now quickly evolving into a real time analytics platform. Implementing the Collect, Ship+Transform, Store and Display pattern we see emerge a lot in the #monitoringlove community. Logstash now allows us to turn boring old logfiles that people only started searching upon failure into valuable information that is being used by product owners and business manager to learn from on the behavior of their users.</p> <p>Together with the Graphite-based dashboards we mentioned above, these tools help people start sharing their information and communicate better. When thinking about these tools, think about what you are doing, what goals you are trying to reach and where you need to improve. Because after all, devops is not solving a technical problem, it's trying to solve a business problem and bringing better value to the end user at a more sustainable pace. And in that way the biggest tool we need to use is YOU, as the person who enables communication.</p> http://127.0.0.1:8080/blog/jenkins-puppet-graphite-logstash-and-you#comments devops drupal graphite jenkins logstash puppet Wed, 04 Jun 2014 14:55:21 +0000 Kris Buytaert 1096 at http://127.0.0.1:8080/blog check_graphite http://127.0.0.1:8080/blog/checkgraphite <p>During my Puppetcamp Gent talk last week, I explained how to get alerts based on trends from graphite. A number of people asked ,e how to do that.</p> <p>First lets quickly explain why you might want to do that .<br /> Sometimes you don't care about the current value of a metric..as an example take a Queing system .. there is no problem if there are messages added to the queue, not even if there are a lot of messages on the queue, there might however be a problem if over a certain period the number of messages on a queue stays to high.</p> <p>In this example I`m monitoring the queue length of a hornetq setup which is exposed by JMX.<br /> On the server runnnig HornetQ I have an exported resource that tells the JMXTrans server to send the MessageCount to graphite<br /> (you could also do this using collectd plugins) </p> <p><div class="geshifilter"><pre class="text geshifilter-text" style="font-family:monospace;"><ol><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">@@jmxtrans::graphite {&quot;MessageCountMonitor-${::fqdn}&quot;:</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> jmxhost =&gt; hiera('hornetqserver'),</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> jmxport =&gt; &quot;5446&quot;,</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> objtype =&gt; 'org.hornetq:type=Queue,*',</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> attributes =&gt; '&quot;MessageCount&quot;,&quot;MessagesAdded&quot;,&quot;ConsrCount&quot;',</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> resultalias =&gt; &quot;hornetq&quot;,</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> typenames =&gt; &quot;name&quot;,</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> graphitehost =&gt; hiera('graphite'),</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> graphiteport =&gt; &quot;2003&quot;,</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">}</div></li></ol></pre></div></p> <p>This gives me a computable url on which I can get the graphite view </p> <p>The next step then is to configure a nagios check that verifies this data. For that I need to use the <a href="http://github.com/datacratic/check_graphite" rel="nofollow">check_graphite</a> plugin from Datacratic ..</p> <p>Which can work with an nrpe config like<br /> <div class="geshifilter"><pre class="text geshifilter-text" style="font-family:monospace;"><ol><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">### File managed with puppet ###</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">### Served by: '&lt;%= scope.lookupvar('::servername') %&gt;'</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">### Module: '&lt;%= scope.to_hash['module_name'] %&gt;'</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">### Template source: '&lt;%= template_source %&gt;'</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp;</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">command[check_hornetq]=/usr/lib64/nagios/plugins/check_graphite -u &quot;http://&lt;%= graphitehost%&gt;/render?target=servers.&lt;%= scope.lookupvar('::fqdn').gsub(/\./,'_')%&gt;_5446.hornetq.docstore_private_trigger_notification.MessageCount&amp;from=-30minutes&amp;rawData=true&quot; -w 2000 -c 20000</div></li></ol></pre></div></p> <p>I define this check on the host where HornetQ is running as it then will map to that host on Icinga/Nagios rather than throw a host error on an unrelated host.</p> http://127.0.0.1:8080/blog/checkgraphite#comments graphite icinga monitoringlove monitoringsucks puppet Tue, 05 Feb 2013 09:10:15 +0000 Kris Buytaert 1076 at http://127.0.0.1:8080/blog Our #monitoringsucks rpm is repository available http://127.0.0.1:8080/blog/our-monitoringsucks-rpm-repository-available <p>Not only our Rubygems Builds have changed, but also my internal #monitoringsucks repository.</p> <p>You might have noticed a variety of vagrant- projects on my github acount</p> <p><a href="http://github.com/KrisBuytaert/vagrant-ganglia" rel="nofollow">http://github.com/KrisBuytaert/vagrant-ganglia </a><br /> <a href="//github.com/KrisBuytaert/vagrant-graphite" rel="nofollow">http://github.com/KrisBuytaert/vagrant-graphite</a><br /> <a href="http://github.com/KrisBuytaert/vagrant-puppet-logstash" rel="nofollow">http://github.com/KrisBuytaert/vagrant-puppet-logstash,</a><br /> Being the #monitoringsucks part of them. All of those Vagrant projects are basically my test setups to play with those new tools.</p> <p>They contain a bunch of puppet modules that install and configure these tools. (Note that they mostly consist of<br /> of git submodules to other puppet module repositories.</p> <p>Given the fact that I also like to have my software cleanly installed from a package, that means that some of these tools had to be packaged, or I had to create a personal / internal repository which had packages from upstream that were hiding on the internet available.</p> <p>I've forked of this repository off the internal Inuits epository so you all can also benefit from these efforts.<br /> (You gotta love pulp :))</p> <p>That means you can now install all of the above mentionned #monitoringsucks tool from our public repo on </p> <p><div class="geshifilter"><pre class="text geshifilter-text" style="font-family:monospace;"><ol><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">yumrepo { 'monitoringsucks':</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> baseurl =&gt; 'http://pulp.inuits.eu/pulp/repos/monitoring',</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> descr =&gt; 'MonitoringSuck at Inuits',</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal"> gpgcheck =&gt; '0',</div></li><li style="font-family: monospace; font-weight: normal;"><div style="font-family: monospace; font-weight: normal; font-style: normal">}</div></li></ol></pre></div></p> <p>Patches to both the Vagrant projects and the puppet modules are welcome ...</p> http://127.0.0.1:8080/blog/our-monitoringsucks-rpm-repository-available#comments devops ganglia graphite logstash monitoring monitoringsucks puppet repo vagrant Sat, 11 Aug 2012 19:49:39 +0000 Kris Buytaert 1068 at http://127.0.0.1:8080/blog FlossUK and Puppetcamp Edinburgh http://127.0.0.1:8080/blog/flossuk-and-puppetcamp-edinburgh <p>I've just finished presenting my talk on how I currently work on Puppet modules at Puppetcamp here in Edinburgh where I've been for the week talking on both FlossUK 2012 and Puppetcamp.</p> <div style="width:425px" id="__ss_12093262"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/KrisBuytaert/7-tools-for-your-devops-stack" title="7 tools for your devops stack" target="_blank">7 tools for your devops stack</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/12093262" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br /> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/KrisBuytaert" target="_blank">Kris Buytaert</a> </div> </div> <p>Earlier this week I opened FlossUK 2012 with my talk on 7 tools for your devops stack </p> <div style="width:425px" id="__ss_12130149"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/KrisBuytaert/how-ihackonpuppetmodules" title="How I hack on puppet modules" target="_blank">How I hack on puppet modules</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/12130149" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br /> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/KrisBuytaert" target="_blank">Kris Buytaert</a> </div> </div> http://127.0.0.1:8080/blog/flossuk-and-puppetcamp-edinburgh#comments conference devops graphite logstash mcollective puppet puppetcamp vagrant Fri, 23 Mar 2012 14:49:47 +0000 Kris Buytaert 1064 at http://127.0.0.1:8080/blog Graphite, JMXTrans, Ganglia, Logster, Collectd, say what ? http://127.0.0.1:8080/blog/graphite-jmxtrans-ganglia-logster-collectd-say-what <p>Given that @patrickdebois is working on improving data collection I thought it would be a good idea to describe the setup I currently have hacked together.</p> <p>(Something which can be used as a starting point to improve stuff, and I have to write documentation anyhow) </p> <p>I currently have 3 sources , and one target, which will eventually expand to at least another target and most probably more sources too.</p> <p><img src="http://www.krisbuytaert.be/images/VagrantGraphite.jpg" /></p> <p>The 3 sources are basically typical system data which I collect using collectd, However I`m using collectd-carbon from <a href="https://github.com/indygreg/collectd-carbon.git" title="https://github.com/indygreg/collectd-carbon.git">https://github.com/indygreg/collectd-carbon.git</a> to send data to Graphite.</p> <p>I`m parsing the Apache and Tomcat logfiles with logster , currently sending them only to Graphite, but logster has an option to send them to Ganglia too.</p> <p>And I`m using JMXTrans to collect JMX data from Java apps that have this data exposed and send it to Graphite. (JMXTrans also comes with a Ganglia target option) </p> <p>Rather than going in depth over the config it's probably easier to point to a Vagrant box I build <a href="https://github.com/KrisBuytaert/vagrant-graphite" title="https://github.com/KrisBuytaert/vagrant-graphite">https://github.com/KrisBuytaert/vagrant-graphite</a> which brings up a machine that does pretty much all of this on localhost.</p> <p>Obviously it's still a work in progress and lots of classes will need to be parametrized and cleaned up. But it's a working setup, and not just on my machine .. </p> http://127.0.0.1:8080/blog/graphite-jmxtrans-ganglia-logster-collectd-say-what#comments collectd devops ganglia graphite jmxtrans logster monitoringsucks Tue, 03 Jan 2012 20:46:47 +0000 Kris Buytaert 1058 at http://127.0.0.1:8080/blog #monitoringsucks and we'll fix it ! http://127.0.0.1:8080/blog/monitoringsucks-and-well-fix-it <p>If you are hacking on monitoring solutions, and want to talk to your peers solving the problem<br /> Block the monday and tuesday after fosdem in your calendar !</p> <p>That's right on february 6 and 7 a bunch of people interrested to fix the problem will be meeting , discussing and hacking stuff together in Antwerp</p> <p>In short a #monitoringsucks hackathon</p> <p>Inuits is opening up their offices for everybody who wants to join the effort Please let us (@KrisBuytaert and @patrickdebois) know if you want to join us in Antwerp</p> <p>Obviously if you can't make it to Antwerp you can join the effort on ##monitoringsucks on Freenode or on Twitter.</p> <p>The <a href="http://www.inuits.eu/contact" rel="nofollow">location will be Duboistraat 50 , Antwerp</a><br /> It is about 10 minutes walk from the Antwerp Central Trainstation<br /> Depending on Traffic Antwerp is about half an hour north of Brussels and there are hotels at walking distance from the venue.</p> <p>Plenty of parking space is available on the other side of the Park</p> http://127.0.0.1:8080/blog/monitoringsucks-and-well-fix-it#comments collectd devops ganglia graphite icinga monitoring monitoringsucks munin nagios rrd Tue, 03 Jan 2012 18:23:00 +0000 Kris Buytaert 1057 at http://127.0.0.1:8080/blog