Monitoring systemd services in real time with Chronograf

Already today, classes are starting in the new group of the course "Monitoring and Logging: Zabbix, Prometheus, ELK" from OTUS . During the next week , everyone will have the opportunity to join the course at a special price . Well, right now we are sharing the traditional translation of useful material on the topic .


All system administrators are familiar with systemd. Developed by Lennart Poettering and freedesktop.org, systemd is a very handy tool for managing Linux services. Most modern software comes in the form of systemd services.

, - ? , - . 

systemd . , , Slack!

Dashboard for systemd
systemd

1. D-Bus

, , D-Bus ( D-Bus, 2).

D-Bus — , , .

, D-Bus, , . D-Bus, . D-Bus .

, , .

D-Bus , Linux-.

, UPower ( ) thermald ( ), ( ).

D-Bus systemd? Systemd D-Bus org.freedesktop.systemd1. , , systemd- . .

2. D-Bus

Xubuntu 18.04 . dbus-daemon busctl.

:

ps aux | grep dbus-daemon

: .

busctl status

.

D-Bus

, systemd , -, systemd.

, systemd . systemd , .

sudo busctl monitor org.freedesktop.systemd1> systemd.output 

, , .

Systemd bus signals
systemd

"ActiveState" "deactivating"? InfluxDB. , !

org.freedesktop.systemd : active (), reloading (), inactive (), failed (), activating (), deactivating (). , failed-, . 

, systemd , .

3.

systemd :

The ultimate systemd monitoring architecture
systemd

. — , dbus-daemon.

D-Bus ( Go!), systemd.   InfluxDB.

InfluxDB Chronograf, .

, Kapacitor ( ) Slack .

! ?

D-Bus Go

, systemd, , :

  1. systemd

  2. InfluxDB

: , Go D-Bus. dbus InfluxDB Go, .

, , , . Github

systemd InfluxDB . , , . .

InfluxDB () ( ), — (failed, active, activating …).

. IQL , . 

: , systemd, "ActiveState", .

, Go, , Chronograf.

4.

InfluxDB, . Chronograf , . 

:

  1. , .

  2. , .

  3. 12 , 12 systemd, .

: , Chronograf, InfluxDB.

,

:

:

 

, . .

, , systemd- . !

, Slack?

5.

Kapacitor ( ), .

Kapacitor, Chronograf .

"Manage Tasks" : (alert rules) (tick scripts). , "Build Alert Rule".

:

- Slack', (.. ). Slack :

6.

, . D-Bus   Golang, , ( ) — .

, .

, , , . , SignalFX Telegraf. .

:




All Articles