Monitoring Blog
Release announcements, technical guides and monitoring insights from the ConSol team.
Ansible limit pitfalls
Wednesday, March 15, 2017 in Insights
Mit steigender Zahl der im Ansible-Inventory gepflegten Hosts verlängert sich die Laufzeit eines Playbooks. Ansible erkennt zwar, welche Tasks nicht ausgeführt müssen (z.B. weil bestimmte Pakete bereits installiert sind), jedoch kostet auch diese Überprüfung Zeit. Früher oder später wird man deshalb den Playbook-Parameter --limit|-l einsetzen - und sich wundern, warum Teile des Playbooks plötzlich nicht mehr funktionieren. Dieser Blogpost zeigt, in welche Probleme man laufen kann bzw. wie man sie vermeidet und löst. Funktionsweise von –limit In jedem “Play” eines Playbook pflegt Ansible die Liste ansible_play_hosts, welche die Hosts enthält, auf die die Tasks des Plays angewendet werden (hier: alle Hosts der Gruppe g_webservers): --- hosts: g_webservers tasks: - name: ensure apache is at …
Getting Started With Java 9's New HTTP Client
Tuesday, March 14, 2017 in Insights
If you ever needed to request HTTP resources with Java, you probably came across several solutions put together from a surprising number of lines. And you probably ended up with using a third party library to achieve your goal in a reasonable manner. Good news: besides Java 9 modules, the next JDK version comes with a brand new HTTP client, and it not only brings support for HTTP/2, but also a sleek and comprehensive API. Let’s have a closer look at the new features. Why HTTP/2? HTTP/2 brings awesome new features to the protocol, including bidirectional communication using push requests multiplexing within a single TCP connection long running connections stateful connections We’ll focus on the HTTP client here, for in-depth information about HTTP/2 you should watch Fabian’s Devoxx talk …
Ansible meets DokuWiki
Monday, March 13, 2017 in Insights
Ansible meets DokuWiki Dokumentation belegt in der Rangliste der beliebtesten Arbeiten eines Administrators sicher einen der hinteren Plätze. Neben der Beliebtheit der Aufgabe ist es auch mit zunehmender Anzahl der vorhandenen Systeme immer aufwändiger, die Dokumentation auf einem aktuellen Stand zu halten. Ein klassischer Fall also für Automatisierung. Das Ziel in diesem Blog soll es sein, für jedes System eine DokuWiki Seite automatisch zu erzeugen. Weiter soll auf jeder Seite noch die Möglichkeit bestehen, individuelle Dokumentation mit einzufügen. Bereits seit langem sind Lösungen mit Dokuwiki in Verbindung mit diversen Scripten erfolgreich im Einsatz. Dokuwiki arbeitet mit textbasierten Dateien. Diese lassen sich leicht von “aussen” erzeugen. Ausserdem ist Dokuwiki von Anfang an …
Testing Logstash Configuration with Citrus and Docker
Wednesday, March 08, 2017 in Insights
The ELK-Stack is a good option to aggregate and visualize distributed logging-data. It basically based on Logstash for extracting and distributing the data Kibana as visualization frontend. The core of the most ELK applications is the Logstash configuration. A user defines here which data (inputs) is processed, how (filter) the data is processed and where it will go afterwards (outputs). Especilly this configuration contains a lot of logic which is unfortunally not easy to test. In this article I want to show you how to setup a testing environment for your Logstash configuration. The Scenario To keep it simple we’ll just focus on the setup. Therefore we neither create complex tests nor a too large szenario. Our szenario is basically to ship some apache log events to a Elasticsearch …
Prometheus und die Fritzbox
Wednesday, March 08, 2017 in Insights
Prometheus ist ein quelloffenes Monitoring- und Alarmierungs-Werkzeug. Seine Basis bildet eine Zeitreihen-Datenbank, auf deren Daten mit einer eingebauten, sehr mächtigen Abfragesprache zugegriffen werden kann. Prometheus verfolgt den Ansatze des sogenannten “whitebox-monitoring”. Anwendungen stellen hier entweder nativ Metriken zur Verfügung, oder alternativ macht ein “exporter” Applikations- oder Geräte-Metriken für Prometheus abfragbar. In diesem Artikel möchte ich zeigen, wie man mit Hilfe des fritzbox_exporter und des speedtest_exporter im Zusammenspiel mit Grafana Einblicke in die Performance seines Heimnetzwerks und seines Internetanschlusses bekommen kann. Die Hardware-Basis für dieses Projekt stellt ein RaspberryPi. In den folgenden Listings zeigen diese Präfixe die verwendeten …
Portchannel-Monitoring mit check_nwc_health
Sunday, February 26, 2017 in Insights
Version 6.0 von check_nwc_health ist erschienen und hat neben Aufräumarbeiten unter der Haube ein paar neue Features zu bieten: interface-etherstats F5 Wide IPs Juniper VSD Memberstatus interface-stack-status Interface-Monitoring auf Ethernet-Ebene Die Anforderung lautete, diese ganzen Ethernet-bezogenen Zähler von Interfaces zu monitoren, also CRC-Errors, Late Collisions, Broadcasts, etc. Das ist ab jetzt möglich mit dem Mode interface-etherstats. $ check_nwc_health ... --mode interface-etherstats --name GigabitEthernet2/0/3 OK - interface GigabitEthernet2/0/3 (alias BCKMUC33212, 002-03) dot3StatsAlignmentErrorsPercent is 0.00%, interface GigabitEthernet2/0/3 (alias BCKMUC33212, 002-03) dot3StatsFCSErrorsPercent is 0.00%, interface GigabitEthernet2/0/3 (alias BCKMUC33212, 002-03) …
SNMP-Traps und OMD - Teil 1
Saturday, February 25, 2017 in Insights
SNMP-Traps und Nagios ist eins der Themen, um das man bislang gerne einen großen Bogen gemacht hat. Grundsätzlich gibt es seit etlichen Jahren die AddOns SNMPTT und Nagtrap, deren Konfiguration aber ein wenig mühsam ist. In einem Projekt, bei dem es um die Überwachung von mehreren Tausend Storage-Systemen ging, entstand eine Methode, welche ressourcenschonend und einfach automatisierbar ist. Im ersten Teil dieses Artikels geht es um die entsprechende Vorbereitung eines OMD-Servers. Genauer gesagt darum, wie man dafür sorgt, daß ein eingehender Trap gleichzeitig an mehrere OMD-Sites (Test, Produktion, …) zugestellt wird. Zunächst muss ein eventuell vorhandener snmptrapd-Prozeß gestoppt werden und das zugehörige Init-Script bzw. der Systemd-Service entfernt werden. Das Lauschen auf udp/162 …
Using .gitignore the Right Way
Wednesday, February 22, 2017 in Insights
Have you ever wondered what kind of patterns .gitignore allows? Was it **/*/target, target/* or *target*?? Read on and find out! Motivation Everyone who uses Git sooner or later has to define a .gitignore in a newly created project. We simply don’t want to version control everything, especially generated files like Maven’s target or Gradle’s build folder. So how exactly can we specify which files to exclude? Can we use Ant-style syntax like **/*, simple Wildcards *target or even Regex [a-z]{0,3}? The Truth There is only one source of truth. The official Git documentation on gitignore: https://git-scm.com/docs/gitignore If only people would read this before posting to Stackoverflow… As it turns out Git does not use regex, nor wildcards, nor Ant-style syntax, but unix glob patterns …
PNP4Nagios and Grafana
Tuesday, February 21, 2017 in Insights
Many Nagios folks use PNP4nagios to store performance data and draw graphs. Nowadays time series databases like Influxdb are quite trendy and have their own pros and cons. But In the end they visualize the stored metrics with Grafana which comes with a plugable datasource api, so wouldn’t it be nice to use the already collected RRD data in Grafana as well? This combines the speed of rrd with the more modern graphs from Grafana. PNP4Nagios Started as a side project to PNP4Nagios there is a metrics api available which allows us to query the used hosts, services and performance labels along with the metrics itself. Hopefully the api will be part of the next PNP4Nagios release. Thanks Jörg for your work here. Grafana The counterpart on Grafanas side is the pnp datasource which connects grafana …
Getting Started with Java 9 Modules
Monday, February 13, 2017 in Insights
So, 2017 has arrived - this is the year when Java 9 will finally be released. And with it, the brand new module system called Jigsaw. In January, Marc Reinhold has announced that JDK 9 is feature complete, so we have every reason to be optimistic that the final release will actually ready in July. So it is about time to get acquainted with project Jigsaw, also known as Java 9 modules. Shortcut: you already know the concept behind Java 9 modules and are impatient to get your hands dirty? Proceed to How to Declare a Java 9 Module or see a Java 9 Modules Example with Maven and JUnit in action. Goals of Project Jigsaw Besides improving the platform itself, JDK 9 will completely change the way we will be structuring our Java applications. One of the goals is to bring strong encapsulation: with …