Sign in

Software Development, Linux Administrator

Introduction

In this blog post, I want to show how to monitor docker containers via the monitoring software Zabbix.

The available containers will be discovered by Zabbix so new containers will be automatically added to the monitoring.

Prerequisites

Version 2 of Zabbix-agent is required. If don’t know how to install it, check out my last blog post.

Add the docker group to the Zabbix user

The Zabbix agent runs under a user named “zabbix”. By default “zabbix” is not allowed to execute docker commands. But that is neccesary to check the health of single docker containers.

To fix the problem, you have to add the group “docker” to the user…


Zabbix is popular monitoring software. In this article, I’m going to show how to install version 2 of Zabbix-agent. With Zabbix-agent2 you have also the possibility to monitor docker containers.

Add Zabbix repository to known repositories

In order to install the Zabbix-agent2 via the package repository of your Linux distribution, you have to add Zabbix to your known repositories.

For Debian 10 you can do that by executing the following commands:

# wget https://repo.zabbix.com/zabbix/5.2/debian/pool/main/z/zabbix-release/zabbix-release_5.2-1+debian10_all.deb
# dpkg -i zabbix-release_5.2-1+debian10_all.deb
# apt update

For other distributions, you can find instructions on the official Zabbix download page.

Then you can install the Zabbix-agent2 with:

apt install zabbix-agent2

Configure agent

In order…


Annoyed of this warning?

I want to share a quick solution, how to suprress the warning in the Dependency Injection Framework Koin for Kotlin.

This is neccesary in Koin 2.2.2, but will be probably not needed any more in Koin 2.2.3.

Follow the Discussion on GitHub: https://github.com/InsertKoinIO/koin/issues/939

Photo by André François McKenzie on Unsplash

Kotlin JVM

Add the following snippet to your build.gradle:

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += '-Xopt-in=org.koin.core.component.KoinApiExtension'
}
}

Kotlin Android

Add the following snippet to each app module:

android {
...
kotlinOptions {
freeCompilerArgs += "-Xopt-in=org.koin.core.component.KoinApiExtension"
}
...
}


Photo by Maddi Bazzocco on Unsplash

Intro

Jetpack Compose is the new toolkit for android to build native user interfaces. To get started, i highly recommend going through the “Jetpack Compose basics” Codelab by Google. If you prefer video content, the youtuber CodingWithMitch has a complete course on how to build apps with jetpack compose.

Please note that jetpack compose is not stable yet, so changes in the API might be possible.

Demo

In this blogpost i want to share, how to build a simple datepicker textfield, that looks like that:


Today a want to talk about a bug in CLion. The Bug is present on the Ubuntu Subsystem for Windows and on Arch Linux. I guess that this bug is also present on more linux distributions.

Photo by Annelie Turner on Unsplash

Bug description

When Using the Package manager on linux, i sometimes get the following error in CLion.


Photo by Maxwell Nelson on Unsplash

In this article i want to show how to install swift on Arch Linux and integrate it in the CLion IDE¹.

Swift Toolchain Installation

First you have to install the swift-Package.

There are multiple aur packages available:

  • swift: Builds swift from source²
  • swift-bin: Uses a patched version of the ubuntu binaries$²

I prefer using the swift-bin aur over swift aur, because of faster installation and update times. (I don’t have to build the complete swift binaries from source)

yay -S swift-bin

Locate swift toolchain location

When installing the swift-bin aur, the path of the toolchain will be /usr/lib/swift.

In this folder you can find all binaries and…


In this article you will learn how to create a post route which receives json, does some logic with the content of the json and returns json content to the executor.

Prerequirements

You should know how to create a basic ktor rest application and know how to test your routes, e.g. via curl command.

If don’t do so, consider reading my first post about ktor:

What we want to build

Let’s build a small login application. The user sends a username and password to the ktor backend. The server responds whether to credentials are correct.

For simplicity reasons we check the credentials against hardcoded strings. For…


In this tutorial we will create another POST-Route. Special in this case is that we want to specify parameters and use them then in the reponse.

This is a follow up tutorial on simple POST requests. You can find the basics how to create a POST route in the following article.

Photo by Marc Reichelt on Unsplash

What we build

We want to pass two parameters param1 and param2 to the server on the POST route /test2.

This is the curl command for our needs:

curl -X POST -F param1=value1 -F param2=value2 http://localhost:8081/test2
  • In the -X paramter we specify that want to execute a POST request
  • We use -F…


In this tutorial we will create our first POST-Route in ktor and test it.

Ktor is a framework for building asnchronous servers with the kotlin programming language.

Photo by Bundo Kim on Unsplash

Requirements

For this tutorials it is required that you have created the “Hello World” ktor application. If you don’t have so, you can watch my youtube video where i explain how to get started.

The bitrate quality of this video is quite bad, so if you prefer something to read try out the official quickstart guide by jetbrains.

Get Started

So let’s not wait any longer and get started!

Adding a new post-Route to our…


Photo by Christin Hume on Unsplash

For this tutorial you need to have zsh and the oh-my-zsh framework installed. You can find further help in the Getting Started guide on the Github page of oh-my-zsh.

As an example we want to create a command hello that accepts multiple programming languages as a first argument and prints a hello world message. The problem is, that we are too lazy to type these programming language and want some fancy auto completion for that.

Example

Here you can see, how our command will look like, when we execute it.

> hello kotlin
Hello kotlin!
> hello python
Hello python!

Our…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store