Monitoring Blog
Release announcements, technical guides and monitoring insights from the ConSol team.
Dynamic and complex configurations with FreeMarker
Monday, March 26, 2018 in Insights
When you are developing software, you will most likely stumble upon situations where you must perform frequent, but minor, code changes. Changes that do not alter your software’s basic functionality, changes so simple that from a developer’s perspective are more like a different configuration for your code but are still a bit too complex to use a simple configuration file. In this article I will show you how to use Apache FreeMarker to implement dynamic and complex configurations in Java projects that can be configured from outside the application. Introduction Some example use cases which I will also address in detail later in this article are: Complex and dynamic configurations You need to configure something simple, but it depends on runtime conditions and/or operations which might also …
Database testing with Citrus
Thursday, March 01, 2018 in Insights
Database communication is an essential part of many applications, when persistent data storage is required. May it be orders, customer data, product recommendations or product information, if persistent storage is in place, the data contains a certain business value. Therefore it’s important that your software handles your persistent storage the right way. In this blog post you’ll learn how to test your database communication using Citrus. Why would you test your database with Citrus? Testing database communication at all is not an easy task. There are a lot of things to consider if you want to use a test database and work with it in an effective, automated way. You have to deploy a test database. You have costs for additional hardware, licence fees, etc. You have to setup your test …
FOSDEM Video: Monitoring Legacy Java Applications with Prometheus
Sunday, February 04, 2018 in Insights
At this year’s FOSDEM conference I did a 30 minutes presentation on Monitoring Legacy Java Applications with Prometheus. The talk gives an overview of some of the options you have for monitoring Java applications with Prometheus when you cannot modify the application’s source code: Logfile monitoring (grok_exporter), and how it differs from Elastic stack Blackbox monitoring (blackbox_exporter) JMX (jmx_exporter) Write your own Java agent (promagent.io) The video is available below. Video tag not supported. Download the video here. Link to the talk: https://fosdem.org/2018/schedule/event/monitoring_legacy_java_applications_with_prometheus/.
Application monitoring in OpenShift with Prometheus and Grafana
Friday, January 19, 2018 in Insights
There are a lot of articles that show how to monitor an OpenShift cluster (including the monitoring of Nodes and the underlying hardware) with Prometheus running in the same OpenShift cluster. This article however is based on a different scenario: You are responsible for an application on an OpenShift cluster and want to monitor just this application, but you don’t have any administrative permission on it. The reason for this can be that you are working in a big company where the operation of the OpenShift environment is outsourced or the process to introduce a new monitoring solution takes way too long or the current monitoring solution doesn’t match your requirements and so on. In this article I’m going to show you how to setup the monitoring of a demo application in 6 easy steps. The …
Automated debugging with git
Friday, January 12, 2018 in Insights
Imagine your’re working on a bigger feature in a complex piece of software. Your implementation is complete, all tests in scope turned green and you push your changes for integration testing. Then, some integration tests from a completely different module fail and you have no clue which change may have caused this. Now you start analyzing the issue. Probing your commits by hand would end up in a very tedious process for sure. Thankfully git can do all the work for you, while you enjoy a cup of coffee. The high-level command git bisect allows you to automatically run a specified test procedure, while it’s crawling through your commit history to find the bad revision. Requirements To do the hands-on part, the following setup is required on your local machine: Git Java 8 Maven Bash (Cygwin …
Devoxx Video: Prometheus Monitoring for Java Web Applications w/o Modifying Source Code
Tuesday, November 07, 2017 in Insights
The Prometheus monitoring tool follows a white-box monitoring approach: Applications actively provide metrics about their internal state to the Prometheus server. In order to instrument an application with Prometheus metrics, you have to add a metrics library and call that library in the application’s source code. However, DevOps teams do not always have the option to modify the source code of the applications they are running. At this year’s Devoxx conference, Fabian Stäber did a talk on how to instrument Java Web Applications with Prometheus metrics without modifying the application’s source code. This talk focuses on how to use the [Byte Buddy] library to write a Java agent instrumenting Java applications with Prometheus metrics. **If you are looking for a general introduction to …
Simulating 3rd party services with Spring Boot and Citrus
Friday, September 22, 2017 in Insights
When developing software that exchanges data with other components or services you may be confronted with the proper simulation of those foreign services during integration testing. This is because you need to connect with a foreign service that is simply not available on your local machine or in a test environment. For unit testing purpose you can use mocks that help out to simulate proper responses. There will be times where your software is deployed to a test environment in order to perform some acceptance tests with your stakeholders before going to a final release. Usually this is also done with the customer exploring the software through manual testing. In these situations traditional service mocking is not a good option and you need a real simulator instance that receives requests …
Docker Headless VNC Container 1.2.0 Released
Tuesday, September 19, 2017 in Insights
Docker Headless VNC Container 1.2.0 has been released today. The different Docker images contains a complete VNC based, headless UI environment for testautomation like Sakuli does or simply for web browsing and temporary work in a throw-away UI container. The functionality is pretty near to a VM based image, but can be started in seconds instead of minutes. Each Docker image has therefore installed the following components: Desktop environment Xfce4 or IceWM VNC-Server (default VNC port 5901) noVNC - HTML5 VNC client (default http port 6901) Browsers: Mozilla Firefox Chromium Provided Images consol/centos-xfce-vnc:1.2.0 consol/ubuntu-xfce-vnc:1.2.0 consol/centos-icewm-vnc:1.2.0 consol/ubuntu-icewm-vnc:1.2.0 Usage The usage is for all provide images similar, for instance see following the …
Monitoring Plugin Language Comparison
Wednesday, September 13, 2017 in Insights
Which programming language should we use to write monitoring check_plugins? This question rose some discussion and this post is trying to give some hints. This kind of a follow up post to this older Blogpost. The focus of this post was more on the monitoring core, this post will focus more on the plugin itself. Currently there are plugins written in Bash, C, Go, Perl and Python that is why this post will focus on these languages. Due to its popularity Java has also been taken into account. Setup The following Virtual Box machine has been used as testsetup: 2 Cores: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz SSD Debian 9 The following compilers/interpreters has been used: Bash: 4.4.12 gcc: 6.3.0 Go: 1.9 Java: 1.8.0_144 Perl: v5.24.1 Python 2.7.13 The programs are just simple Hello-World …
Reunite separate git repositories
Friday, September 08, 2017 in Insights
I recently had to deal with two projects that have a common origin but separated at some point in time. I now had to try to bring them back together again - basically merging the changes. Sounds like a pretty standard git merge or git rebase job. Unfortunately the separation was done in a not so clever way. Someone cloned the original repository, checked out some branch, made some first refactoring steps, got rid of the git stuff (probably rm -rf .git) and started a new git repository with this status. Rumors are that the situation at that time was so tense that people wanted to make a clear cut - which they did in a technical way. Quite some time later it was my task to try to get the projects together again. The only input I had was two git URLs and the above story. So for the rest of …