Seite wählen

NETWAYS Blog

Neue Features in Icinga 2.3

Die nächste Major-Version von Icinga 2 wird einige interessante Features unterstützen, die es noch einfacher machen, Ausnahmen für Services zu definieren. Bis die 2.3 als Release-Version verfügbar ist, wird es zwar noch eine Weile dauern, aber hier gibt es schonmal einen kleinen Vorgeschmack:

Konditionale Statements

Auch bekannter als if/else: In 2.3 ist es möglich, Attribute nur dann zu setzen, wenn bestimmte andere Bedingungen erfüllt sind. Hier ein Beispiel:

object Host "localhost" {
  check_command = "hostalive"
  address = "127.0.0.1"
  vars.http_vhosts["icinga.org"] = {
    http_address = "icinga.org"
    interval = 1m
  }
  vars.http_vhosts["netways.de"] = {
    http_address = "netways.de"
  }
}
apply Service "vhost " for (vhost => config in host.vars.http_vhosts) {
  host_name = "localhost"
  check_command = "http"
  if (config.interval) {
    check_interval = config.interval
  } else {
    check_interval = 5m
  }
  assign where host.vars.http_vhosts
}

Entwicklungs-Konsole

Um Filterregeln für „apply“ und auch andere Ausdrücke einfacher testen zu können, gibt es eine CLI-basierte Konsole, die beliebige Befehle auswerten kann und deren Ergebnis anzeigt:

$ icinga2 console
Icinga (version: v2.2.0-262-g7075607)
<1> => config = { http_address = "icinga.org", interval = 1m }
{"http_address":"icinga.org","interval":60.0}
<2> => if (config.interval) { check_interval = config.interval } else { check_interval = 5m }
60.0
<3> => check_interval
60.0

Prototypen

Alle eingebauten Datentypen (d.h. Strings, Zahlen, Arrays und Dictionaries) verfügen nun über Methoden. Mit Hilfe dieser Methoden können z.B. Dictionaries manipuliert werden:

<1> => vhosts = { "icinga.org" = { http_address = "icinga.org" }, "netways.de" = { http_address = "netways.de" } }
{"icinga.org":{"http_address":"icinga.org"},"netways.de":{"http_address":"netways.de"}}
<2> => vhosts.remove("icinga.org")
null
<3> => vhosts
{"netways.de":{"http_address":"netways.de"}}
<4> => vhosts.len()
1.0

Mit Dictionary#remove würden sich so z.B. bestimmte Dictionary-Items entfernen lassen, falls diese bei einem bestimmten Host bzw. Service nicht vorhanden sein sollen.

Reminder für das Puppet Webinar – Windows Configuration Management

puppet Heute will ich noch mal auf das Webinar zum Thema Puppet: Windows Configuration Management am Freitag, den 12.12.2014 um 10:30 Uhr hinweisen. Gemeinsam mit Dirk werde ich demonstrieren, wie man Windows-Systeme mit Puppet deployen und konfigurieren kann.
Wer hieran teilnemhen möchte, kann sich natürlich gerne registrieren.
Um die Zeit zu überbrücken, kann man sich auch gerne die Webinar-Videos in unserem Webinar-Archiv anschauen.
Bis Freitag!

Christian Stein
Christian Stein
Manager Sales

Christian kommt ursprünglich aus der Personalberatungsbranche, wo er aber schon immer auf den IT Bereich spezialisiert war. Bei NETWAYS arbeitet er als Manager Sales und berät unsere Kunden in der vertrieblichen Phase rund um das Thema Monitoring. Gemeinsam mit Georg hat er sich Mitte 2012 auch an unserem Hardware-Shop "vergangen".

Weekly Snap: Neon 110 & Coshsh, Confs & Camps in San Francisco

weekly snap18 – 22 August offered an eclectic mix of subjects – from sys admin and handyman tools to configuration generators and analyzers.
On events, Eva counted 99 days to the OSMC with Gerhard Laußer’s talk: ‘Coshsh – Configuration Generation’ while Bernd made plans to join Puppet Conf and Icinga Camp in San Francisco.
Continuing the travel theme, Thomas shared his thoughts on the troubles of flying with and without Swiss army knives as Ronny reflected on the excitement of discovering new sys admin tools.
Lastly, Georg helped bring about a firmware update for the Neon 110 network thermometer and Gunnar offered a peek into a new configuration analyzer for Icinga 2.

Neue Webinar-Termine und Änderung zum Webinar am 26. Juni

Es ist wieder soweit – die nächste Runde von Webinaren ist jetzt online! Vorab gibt es meinerseits noch eine kleine Planänderung bzgl. des Webinars am 26. Juni 2014. Anstatt des Themas „inGraph: Neues Webfrontend für Graphite„, werden wir das Thema „Foreman: OpenNebula orchestrieren“ behandeln.
Das Graphing-Webinar werden wir voraussichtlich gegen Ende des Jahres mit Icinga-Web 2 durchführen.
In den anderen geplanten Webinaren werden wir uns schwerpunktmäßig mit Icinga 2 beschäftigen.
Übrigens: Der Release ist heute!
Hier nochmal eine kurze Auflistung der nächsten Themen:

Titel Zeitraum
Foreman: OpenNebula orchestrieren 26. Juni 2014 – 10:30 Uhr
Icinga 2: Enterprise Monitoring der nächsten Generation 22. Juli 2014 – 10:30 Uhr
Icinga 2: Migration von Nagios oder Icinga 1.x leicht gemacht 02. September 2014 – 10:30 Uhr
Icinga 2: Integrierte Hochverfügbarkeit 07. Oktober 2014 – 10:30 Uhr

Einige weitere Themen für mögliche Webinare sind aktuell noch in Planung und wir werden natürlich zeitnah informieren, sobald diese konkret feststehen. Wer in der Sommerpause lust auf Webinare hat, kann natürlich gerne in unserem Webinar-Archiv vorbeischauen und sich bereits gehaltene Vorträge anschauen.
Bis dann!

Christian Stein
Christian Stein
Manager Sales

Christian kommt ursprünglich aus der Personalberatungsbranche, wo er aber schon immer auf den IT Bereich spezialisiert war. Bei NETWAYS arbeitet er als Manager Sales und berät unsere Kunden in der vertrieblichen Phase rund um das Thema Monitoring. Gemeinsam mit Georg hat er sich Mitte 2012 auch an unserem Hardware-Shop "vergangen".

Project of the month: Nagios templates for configuration clarity

September 2009: When Schüco approached NETWAYS, they had a basic, sluggish Nagios installation they wanted to expand and optimise. With over 46 locations around the globe and 650 devices to monitor, Schüco was looking for support in the coming configuration chaos. Inadvertently, config details were replicated many times over, sitting in large unstructured files so that Schüco admins simply had too much information and no overview.
The first task for consultant William was to restructure their config files into a tree and added template functionality. This suited their multiuser admin needs and simplifying their file structure in turn simplified configuration work. Instead of changing a config variable over 40 times, with templates they now only needed to do it twice.
On this new tidy configuration base, he could then expand the monitoring system’s capabilities to include the usual suspects: EventDB, PNP4Nagios, Nagvis, NETWAYSPortal, SMS alerts, business processes and even Jasper reports. As William customised the NETWAYSPortal for Schüco, he enhanced the SLA view to make target SLAs easier to compare with ‘actual availability’. After a good 20 days work on and offsite, their new state of the art monitoring system was up and running at optimum efficiency. Kudos to that.

sla_screenshot

Enhanced SLA View for easy target vs. actual availability comparison