Sometimes you may want to delete some metrics from Prometheus if those metrics are unwanted or you just need to free up some disk space. Time series in Prometheus can be deleted over administrative HTTP API only (disabled by default). To enabled it, pass –web.enable-admin-api flag to Prometheus through start-up script or docker-compose file, depending […]
In Jinja2 templates, it is often a good practice to test if a variable exists and what value does it carry. There are several useful tests that you can make using Jinja2 builtin tests and filers. In this article, i’ll show how to test if a variable exists or not, if it is empty or […]
What is Go? Go or Golang is a programming language created by Google in 2009 by Robert Griesemer, Rob Pike, and Ken Thompson. Go language is designed for building simple, fast and reliable software. In this tutorial i’ll show how to install Go on MacOS, Ubuntu, CentOS and how to create a simple “Hello world!” […]
What is Node Exporter? Node Exporter is a Prometheus exporter for hardware and OS metrics with pluggable metric collectors. It allows to measure various machine resources such as memory, disk and CPU utilization. In this article I’ll show how to install and configure Node Exporter on Ubuntu and CentOS using a systemd service manager.
What is Prometheus? Prometheus is an open-source monitoring and alerting software written in Go. It collects metrics from configured targets and stores them in a local time series database. Prometheus can run rules over collected data to either aggregate and record new time series from existing data or generate alerts. To visualize the collected data […]
What is Docker Compose? The docker-compose is a tool for defining and running complex multi-container Docker applications. With docker-compose you can define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running. In this note i’ll show […]
Each time you want to commit a bug or a feature, you need to create a branch for it. To create a new branch there is a git branch command. After you have created a branch, you need to switch in this branch using a git checkout command. But it is also possible to create […]
When browser connects to a website, it includes a User-Agent string in its HTTP header. Sometimes you may need to change User-Agent with curl to access some URL as a different browser. This is a small note on how to set a custom User-Agent with curl from the command line in Linux.
Redis is a key-value database (also known as a key-value store) that uses a simple key/value method to store data. Strings are the simplest data type in Redis and are simple key/value entries. To save or fetch string data there are Redis SET and GET commands. Redis SET command creates a key and assigns it […]
In Redis you can flush cache/database and delete all keys from all databases or from the particular database only using FLUSHALL and FLUSHDB commands. To delete all keys from all Redis databases, use the FLUSHALL command. To delete all keys of the selected Redis database only, use the FLUSHDB commnad.