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

Systemctl status service_name takes too much time #27

Closed user9931 closed 3 years ago

user9931 commented 3 years ago

It can be only happens on slow systems

On my Vps (very cheap & small, openvz) its takes forever to show logs of sshd service, for example (maybe another). its about line

UserParameter=systemd.service.status[*],$(systemctl status $1 2>/dev/null

so its trying to show log and we dont need them.

UserParameter=systemd.service.status[*],$(systemctl status --lines=0 $1 2>/dev/null

work instantly.

MogiePete commented 3 years ago

Fixed.