Icinga in Amsterdam – Icinga Camp and DevOpsDays

Icinga Camp Amsterdam

vagrant_icinga2_dashingWe had a lovely time in Amsterdam meeting great community members on our Icinga Camp. Generously hosted at LeaseWeb and sponsored by OlinData, NETWAYS and Inuits we had a lot of interesting talks and discussions. Pretty much really a full day of monitoring madness connecting with the community. We also had the latest and greatest releases and ideas to share with us.

Getting started with Monitoring, going further for automation with Puppet and Ansible – and last but not least a closer look into the possibilities with the Icinga 2 REST API. We’re also proud to have a revamped Icinga 2 Dashing dashboard available for you after the talk.

grafana_net_icinga2_dashboardWe’ve also had Blerim doing a step by step introduction into performance data on the way down to metrics in Graphite and Grafana correlated with additional monitoring information (thresholds, metadata such as downtimes). Blerim further announced our very own Icinga 2 Grafana dashboard available on Grafana.net.

Tom did hack on the Icinga Director before giving an interesting talk into all the details – last commit 15 minutes before the talk ;-) And we even have a fine Icinga Director 1.1.0 release now.

Christian presented the new Powershell toolstack for automating an Icinga 2 client install on Windows. Brain overflow included we enjoyed a lovely BBQ dinner sponsored by Olindata.

You can find all slides, videos and pictures from Icinga Camp Amsterdam in the event archive and our Youtube channel.

 

DevOpsDays Amsterdam

IMG_3420We did give an Icinga 2 workshop on the first day at DevOpsDays Amsterdam based on the official Icinga 2 training material. Luckily we were also invited to the speaker’s dinner on a boat driving through the Amsterdam docks while enjoying food, beer and good music.

The official schedule in the next two upcoming days unveiled interesting #devops topics on not only automation and containers but also important topics in tech. Erica Baker from Slack kicking off DevOpsDays Amsterdam with the keynote on diversity and inclusion in tech. After lunch Avishai Ish-Shalom started with mathematics which turned into reliability and scaling pretty fast – the talk was interesting and entertaining at best :)

IMG_0034As usual the afternoon was reserved for ignites and then open spaces. Blerim suggested to discuss container monitoring in #devops environments in the open spaces gaining really much attraction and generating lots of interesting ideas and todos.

Last but not least the final day of DevOpsDays Amsterdam on Friday provided interesting talks and the ignite session. Bernd talked about Open source communities in an entertaining (“Chaos. German Style.”) but also to-the-point way. We really enjoyed the friendly atmosphere in Amsterdam. Especially the Twitter wall and of course the nice sketch-up drawings. We’ll be back for sure! :)

PS: DevOpsDays organisers are Lego addicted, the goodie bag contained a nice special mini-figure wearing the event’s t-shirt :)

 

vim, Puppet, Vagrant and Icinga 2 syntax highlighting

vim is my preferred editor after all. Even I hack Icinga 2 code with vim way faster than any other interface. vim requires some configuration love of course.

Many distributions do not install vim or set it as default editor. In the Git training sessions on Debian/Ubuntu we’ll have a lab for making vim the default for example. Inside the CentOS base box used for the Icinga 2 Vagrant boxes I’ll also ensure via puppet manifest to install the vim package.

Now for the configuration bits – one keeps a local $HOME/.vimrc with own customizations. That works fine for your own workstation but what if you want to automate such setups and distribute a custom vimrc config on all your servers? You could keep just a file and sync that using Puppet manifests of course. But what about the mentioned default editor settings? And you do not want to break anything with a syntax error?

I’ve found this puppet-vim module pretty nifty and helpful. The most recent commit inside the Vagrant boxes uses it already.

class { 'vim':
  opt_bg_shading => 'light',
}

There are many other options available such as setting it as default editor on Debian. To mention some more:

  • opt_nocompatible
  • opt_bg_shading – I prefer a light background, also easier on a beamer for an Icinga Camp demo
  • opt_lastposition – jump to the last position when opening a file. I definitely want that everywhere.
  • opt_syntax – enable syntax highlighting. On older systems or Debian this is disabled by default.
  • opt_misc – sets some interesting default values for incremental search, etc.:
    [‘hlsearch’,’showcmd’,’showmatch’,’ignorecase’,’smartcase’,’incsearch’,’autowrite’,’hidden’]

In case you ask – why do you care so much about vim? I wanted to integrate the new Icinga 2 vim syntax highlighting packages into the Vagrant boxes. Just install “vim-icinga2” (currently snapshot packages, available with 2.5.0) and you’re ready to go. This is also part of our Icinga 2 training sessions helping you to understand keywords and object definitions far more easy.

  package { 'vim-icinga2':
    ensure => 'latest',
    require => [ Class['icinga_rpm'], Class['vim'] ],
    alias => 'vim-icinga2'
  }

Enjoy vim everywhere :-)

vagrant_icinga2_vim_syntax_highlighting

Icinga Camp and DevOpsDays Amsterdam

Team Icinga is going to Amsterdam next week – join us at Icinga Camp Amsterdam on 28.6.2016 and DevOpsDays Amsterdam from 29.6.-1.7.2016!

 

Icinga Camp Amsterdam

amsterdam_campA full day of monitoring madness – getting started with Icinga monitoring, Icinga project updates and hands-on with Icinga Web 2. Diving further into beautiful graphs with Graphite and Grafana and Icinga 2 API for managing your monitoring stack. Automation and configuration management with Puppet and Ansible is also covered during the camp talks. And keep your fingers crossed – Tom will talk about the Icinga Director providing latest insights into the upcoming 1.1.0 release.

Register now if you haven’t done so already!

 

devopsdays_amsterdamDevOpsDays Amsterdam

We’ll be having our Icinga 2 Workshop on 29.6.2016 on the first day of DevOpsDays Amsterdam. Basic installation of Icinga 2 and Icinga Web 2 diving deeper in fancy dashboards, configuration hands-on and the Icinga 2 API. Join us there – we’re also sponsoring the event, just look for the guys wearing the Icinga logo!

See you in Amsterdam :-)

Icinga 2: Host state calculation from all services

There is a variety of questions answered in the community support channels. Sometimes we just hack away fancy solutions directly inside the Icinga 2 DSL. Some of these examples are collected inside the documentation, others are posted on the community channels. Or they are just provided in hands-on workshops at customers waiting for sharing their stories to the world :)

This time there was the this question over at monitoring-portal.org – a host object collects a bunch of passive services and should calculate its overall state and output from the (worst) state of all referenced services.

Sounds easy. You could go for business process check returning the calculated value. Or you stick with many of the Icinga 2 configuration language features and put them altogether.

For a small test environment, I’ve generated 5 services using the random check (replace that with your real world scenario).

 

for (j in range(5)) {
  object Service "host-servicestatus-" + j {
    check_command = "random"
    check_interval = 30s
    retry_interval = 15s
    host_name = "host-servicestatus"
  }
}

The host object called “host-servicestatus” just uses the “dummy” check command provided by the ITL. This check command expects two custom attributes: “dummy_state” and “dummy_text”.

Now for the fun part – implement two lambda functions for these custom attributes using the available methods.

  vars.dummy_state = {{ ... }}
  vars.dummy_text = {{ ... }}

We want to calculate the worst state for all services on this specific host. Therefore we’ll use a temporary variable to save and update the worst state.

    var worst_state = 0

At first glance we want to selectively iterate over all service objects using the object accessor method “get_objects” with “Service” type. Then we’ll compare the service “host_name” attribute to the local scope (our host and its name). We’ll just skip all services not matching.

    for (s in get_objects(Service)) {
      if (s.host_name != host.name) {
        continue; //skip all services not referencing this host object
      }

The local to the loop variable “s” provides us with access to the all attributes for the current service object. Check whether its state is greater than 0 (not OK) and greater than the previously collected worst state. If so, store it in the local variable “worst_state”.

      if (s.state > 0 && s.state > worst_state) {
        worst_state = s.state
      }
    }

After the loop is finished, just return the “worst_state” variable for this function.

    return worst_state

In terms of generating an additional output text with all service names and their state, we’re using the same loop and conditional checking as above. Except we are using a temporary variable as an array of strings like this:

    var output = []

Inside the loop we’ll add the current service name and its state as string element to the “output” array.

      output.add(s.name + ": " + s.state)

Once the loop is finished, join the array elements with the separator “, ” concatenate the final output string and return it.

    return "Service summary: " + output.join(", ")

We could also concatenate the string as is but then we would need to think about the last loop run not adding the “,” character. The array join method just simplifies that step.

icinga2_host_servicestatus_web2The final solution works like a charm :-) If you say – hey I am not a coder – it helps to know Javascript, or Python or something similar of course. After all it is a pretty neat solution for helping a community member :)

 

object Host "host-servicestatus" {
  check_command = "dummy"

  vars.dummy_state = {{
    var worst_state = 0
    for (s in get_objects(Service)) {
      if (s.host_name != host.name) {
        continue; //skip all services not referencing this host object
      }

      if (s.state > 0 && s.state > worst_state) {
        worst_state = s.state
      }
    }

    return worst_state
  }}

  vars.dummy_text = {{
    var output = []

    for (s in get_objects(Service)) {
      if (s.host_name != host.name) {
        continue; //skip all services not referencing this host object
      }

      output.add(s.name + ": " + s.state)
    }

    return "Service summary: " + output.join(", ")
  }}
}

Icinga turns 7

Time flies with new features and ideas. Inspired by our beloved community, designed with dedication for the best free and open source monitoring solution out there. Last year was already pushing the motivation and spirit to the next level. The 7th year Icinga added again the icing on the cake.

 

Community

oOwYuGetting together at Icinga Camps and presenting the latest awesome stuff, chatting and discussing new ideas with community members or just hanging out together is just awesome. Kuala Lumpur, Portland, San Francisco and Berlin were a huge success and overwhelming. We’ve also uploaded the talks from Berlin onto our Youtube channel. And as every year – Icinga at OSMC including a great hackathon. Our next Icinga Camp will take place in Amsterdam on 28th of June 2016, save the date!.

We’ve seen a lot of activity on our community channels over the past year, most recently over at monitoring-portal.org but also the mailing lists, IRC and on social media (>4000 followers on twitter, yay!). It is always a pleasure to see community members helping each other and making Icinga a great platform :)

Oh, and if you ever wanted an Icinga sticker or a hoodie, just get one in our Icinga shop. Eric is still not included ;)

 

Official Partners, Support and Training

Icinga is an open source project which does not and cannot provide enterprise grade support or training on its own. We are aware of companies all over the world providing support and also trainings for Icinga. Over the past years Icinga became more popular and users kept asking for enterprise support. We’ve therefore established a partner program helping you find professional support for Icinga all over the world.

 

Icinga 2

001-MacBook-SilverAPI, API, API – and here we are. The Icinga 2 v2.4 release also added a new Graphite schema paving the way for the Icinga Web 2 module and Grafana with better templates and dashboards. The previous “demo for Portland only” Dashing for Icinga 2 also attracted many users and we’re going to add new community contributed features over there. The v2.4.5 release also added a new Windows installer package as well as x64 packages.

 

Icinga Web 2

The first stable release 2.0.0 reached your systems out right before our Icinga Camp in Portland. It did not stop there – at the time of writing the developers are already working on their v2.4.0 release. The current v2.3.2 release ensures stable interfaces for the official Icinga Web 2 modules. PNP and Graphite for graph integration, NagVis for map visualisation, Business Processes and GenericTTS for ticket system integration – more to come soon.

 

Icinga Director

director_main_screenA configuration frontend for Icinga 2 and a tool fully flexing your automated deployments – one thing modern sysadmins will dream of. Now it has become reality with the first Icinga Director 1.0.0 release.

 

Integrations and Tools

The Puppet module developers are receiving a lot of community feedback and patches working on their very first 1.0.0 release. The idea is to get this module approved by Puppet amongst providing an official Puppet module for Icinga 2 and Icinga Web 2 ourselves.

In terms of Ansible, Valentino is going strong with the roles and there’s probably coming a dedicated module talking to the Icinga 2 API. Check the community channels for further discussions on that. On the Chef side of life, Virender is putting the cookbook into shape and constantly releasing new versions helping your monitoring automation stack. We do not have one for Salt, if you want to provide and maintain an official one, please get in touch.

Jordan who is working at Adobe recently joined the Icinga team to work on the Icinga 2 Docker container. There are also native packages for Alpine Linux available which is a common base distribution for your own Docker images. The Vagrant boxes have been overhauled as well, especially the Icinga 2 box which now provides Graphite/Grafana, Dashing and all Icinga Web 2 modules including the new Icinga Director. A great place for demos and tests getting you started within minutes.

 

More to come

coreWhile working on bug fixes increasing the stability of Icinga 2, we’re also looking into releasing community contributed features such as the InfluxdbWriter feature, SSL support for the IdoMysqlConnection feature and TimePeriod excludes. The Icinga Web 2 development focuses on stability and new modules on their way (Graphite, Elasticsearch, etc.).

Tom is working hard on the next Icinga Director 1.1.0 release which includes numerous bugfixes but also new features sponsored by a partner customer. Help test and install the latest Git master.

Module developers will keep pushing their work into stable releases and hopefully more awesome stuff to come. Heike is working on the Icinga documentation bits and ensures that working with Icinga is a breeze (extended white papers and use cases, better getting started guides, etc.). Her first contribution was an article on creating your very own Icinga book. We are also excited about to the first Icinga 2 book in German scheduled for later this year.

We are looking forward to meet you on our community events. If you want to spread the love for Icinga, submit a talk or let us know about your presentation at an event.

Thanks for using Icinga and help making it awesome! :-)