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! :-)

Icinga 2 v2.4.7 bugfix release

The fix for “notification was not sent out to any contact” introduced a new bug. When a notification is triggered but all users won’t be notified (e.g. with state = [ OK ] as filter for a problem notification) this caused the DB IDO layer to crash. The release v2.4.7 fixes that issue. Package updates are available soon-ish as always.

 

What’s New in Version 2.4.7

Bugfixes

  • Bug 11639: Crash in IdoMysqlConnection::ExecuteMultipleQueries