Hello guys,
here i go again. I'm having some issues with Zabbix and the simple execution of an userparameter. I want to see
the status of every single service on my linux servers, so to do that i made this userparameter:
I have to say, that the Timeout=20 in the Linux Server and also in the Proxy. I have also already changed the Timeout value to 30 seconds in both config files (Proxy and Server) but it didn't work.
When i try to run the command on the server:
or just
it works. Do you have any idea, what i'm doing wrong? How can i fix that? Thank you in advance.
here i go again. I'm having some issues with Zabbix and the simple execution of an userparameter. I want to see
the status of every single service on my linux servers, so to do that i made this userparameter:
Code:
UserParameter=services.systemctl,echo "{\"data\":[$(systemctl list-unit-files --type=service|grep \.service|grep -v "@"|sed -E -e "s/\.service\s+/\",\"{#STATUS}\":\"/;s/(\s+)?$/\"},/;s/^/{\"{#NAME}\":\"/;$ s/.$//")]}"
UserParameter=systemctl.status[*],systemctl status "$1"
When i try to run the command on the server:
Code:
zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t services.systemctl
Code:
systemctl list-unit-files --type=service|grep \.service|grep -v "@"|sed -E -e "s/\.service\s+/\",\"{#STATUS}\":\"/;s/(\s+)?$/\"},/;s/^/{\"{#NAME}\":\"/;$ s/.$//"