EN
Currency:
EUR – €
Choose a currency
  • Euro EUR – €
  • United States dollar USD – $
VAT:
OT 0%
Choose your country (VAT)
  • OT All others 0%

31.10.2022

Monitoring Linux Services with Prometheus

server one
HOSTKEY
Rent dedicated and virtual servers with instant deployment in reliable TIER III class data centers in the Netherlands and the USA. Free protection against DDoS attacks included, and your server will be ready for work in as little as 15 minutes. 24/7 Customer Support.

Author: Senior Devops. Hostkey Lead Infrastructure Specialist Nikita Zubarev

In the last article we talked about how to set up metric collection and the display alerts to monitor services using Prometheus. However, during the process, the question arose of how to monitor individual services on Linux servers. For example, in one of our previous articles, we described the case of using Ovirt web consoles using Apache Guacamole. Now let's look at how to organize the monitoring of services on Linux machines.

Guacamole is a cross-platform remote desktop gateway that requires Apache Tomcat and Guacd to run.

Open the service created for node_exporter:

/usr/lib/systemd/system/node_exporter.service

[Unit]

Description=Prometheus exporter for machine metrics, written in Go with pluggable metric collectors.
Documentation=https://github.com/prometheus/node_exporter
After=network.target


[Service]

EnvironmentFile=-/etc/default/node_exporter
User=root
ExecStart=/usr/bin/node_exporter $NODE_EXPORTER_OPTS
Restart=on-failure
RestartSec=5s

[Install]

WantedBy=multi-user.target

by default, $NODE_EXPORTER_OPTS is loaded from the file:
# /etc/default/node_exporter


If necessary, we can either monitor individual services by adding the collector.systemd.unit-whitelist option:

#NODE_EXPORTER_OPTS="--collector.systemd --collector.systemd.unit-whitelist="(tomcat|guacd).service""

After restarting the service, we get the metric on node_exporter:

All you need to do is describe the rule for the alert:

- alert: guacd_service
	expr: node_systemd_unit_state{name="guacd.service",state="active"} == 0
	for: 1s
	annotations:
		summary: "Instance {{ $labels.instance }} is down"
		description: "{{ $labels.instance }} of job {{ $labels.job }} is down."
- alert: tomcat_service
	expr: node_systemd_unit_state{name="tomcat.service",state="active"} == 0
	for: 1s
	annotations:
		summary: "Instance {{ $labels.instance }} is down"
		description: "{{ $labels.instance }} of job {{ $labels.job }} is down."

An example of an alert on the Alertmanager dashboard in Grafana:

Conclusions

In this short article, we looked at how services are monitored on Linux machines.This solution allows you to monitor the work of any system server and greatly simplifies the administration of server hardware. In the next article, we will explain how you should not display the basic parameters that the exporter returns.

Rent dedicated and virtual servers with instant deployment in reliable TIER III class data centers in the Netherlands and the USA. Free protection against DDoS attacks included, and your server will be ready for work in as little as 15 minutes. 24/7 Customer Support.

Other articles

30.10.2026

OpenWebUI Pipes: Why Write Code When "Everything Is Already in the Settings"?

Configuring a custom model with tools and RAG in OpenWebUI is easy. Making it behave predictably in production is the hard part. Our support bot powered by Gemma 4 initially provided plausible answers, but they lacked actual system data. We analyzed why this happens and transformed a "single model in a UI" into a deterministic pipeline using Pipes.

30.10.2026

Which LLM Gateway to Install on Your Server: LiteLLM or OmniRoute

We compared LiteLLM and OmniRoute under load: latency, requests per second, memory and CPU usage, and the settings worth changing right after installation.

20.10.2026

GPU VPS vs GPU Dedicated Servers: Which to Choose?

The same RTX 4090 with a €150 price gap: what are you really paying for? Learn how to tell a whole GPU from a slice of one, when a GPU VPS is enough, and when it is time to move to a dedicated GPU server.

20.10.2026

How to Run Language Models (DeepSeek, Gemma, Phi) on Your Own Server: A Complete 2026 Guide

Step-by-step guide to running DeepSeek, Gemma, and Phi on your own server. Ollama, vLLM, Docker, GPU configuration, and code examples.

22.09.2026

Ways to Install an Application on a Server and How They Differ

The debate over how to install software on a server usually ends in a stalemate because everyone has their own habits. We categorized twelve methods, ran five of them on identical servers with a stopwatch, and discovered that more than half of the time difference is not spent installing the application itself, but installing the tool itself.

Upload