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

Timeout while executing a shell script. #21

Closed fabjsousa closed 4 years ago

fabjsousa commented 4 years ago

Hello,

I've the zabbix-systemd-service-monitoring configured in several hosts, but in some cases on zabbix web I've this error Timeout while executing a shell script.

image

If I run the script manually all the services are detected but on the web not

[root@server1 ~]# /usr/local/bin/zbx_service_discovery.sh {"data":[{"{#SERVICE}": "firewalld"},{"{#SERVICE}": "nrpe"},{"{#SERVICE}": "ntpd"},{"{#SERVICE}": "postfix"},{"{#SERVICE}": "sshd"},{"{#SERVICE}": "service1"},{"{#SERVICE}": "service2"},{"{#SERVICE}": "zabbix-agent"}]}

I've tried to change the Timeout value on zabbix_agentd.conf and in some case the error disappear and another not. For those who can execute the services aren't detected.

Any idea what is wrong?

Thank you.

MogiePete commented 4 years ago

Check SELinux and the Zabbix Agents logs.

fabjsousa commented 4 years ago

Fixed!!! I've to add a rule with semodule to permit the excution of the script. Thank you.