MogiePete / zabbix-systemd-service-monitoring

Simple Zabbix Template to discover, monitor, and alert on systemd services.
GNU General Public License v2.0
91 stars 41 forks source link

Script fails when working with wireguard systemd services #33

Closed tunloop closed 3 years ago

tunloop commented 3 years ago

Wireguard services are named wg-quick@wg0

Script cannot parse the @ symbol.

zabbix_agentd -t "systemd.service.status[wg-quick@wg0]" systemd.service.status[wg-quick@wg0] [m|ZBX_NOTSUPPORTED] [Special characters "\, ', ", `, *, ?, [, ], {, }, ~, $, !, &, ;, (, ), <, >, |, #, @, 0x0a" are not allowed in the parameters.]

systemctl status wg-quick@wg0 ● wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0 Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/wg-quick@wg0.service.d └─override.conf Active: active (exited) since Tue 2021-03-02 14:46:06 EST; 3 months 4 days ago

MogiePete commented 3 years ago

This is a zabbix issue.

ZBX_NOTSUPPORTED] [Special characters ", ', ", `, *, ?, [, ], {, }, ~, $, !, &, ;, (, ), <, >, |, #, @, 0x0a" are not allowed in the parameters.

Follow this guide and update your whitelist.

https://www.zabbix.com/documentation/4.4/manual/appendix/preprocessing/jsonpath_functionality/escaping_lld_macros