I'm struggling to do a proof of concept test of running a custom shell script on a Linux host via Zabbix agent. Zabbix 6.0.19 is our version. I created a login on forums and asked for help a couple of weeks ago. It said my post was not approved. Then a user responded. I was not able to find the old post to reply. The link in the email did not work. So I'm creating a new post. My problem is not resolved. Any help is greatly appreciated. Running a one-line shell script shouldn't be this difficult.
I did this to create an item.
Data collection -> Hosts -> Next to one Linux host, clicked on Items
Created an item:
Type is Zabbix agent
Key is system.run[/tmp/test.sh]
Type of Information: text
I clicked on test and it gave me an error:
sh: /tmp/test.sh: Permission denied
I added this line to zabbix_agentd.conf on the LInux host
AllowKey=system.run[*]
The permission on /tmp/test.sh is 777.
I'm able to run this test successfully -
zabbix_agentd -t system.run[/tmp/test.sh]
system.run[/tmp/test.sh] [t|]
The Zabbix agent log has no error related to this. The Linux host has RedHat Linux.
I did this to create an item.
Data collection -> Hosts -> Next to one Linux host, clicked on Items
Created an item:
Type is Zabbix agent
Key is system.run[/tmp/test.sh]
Type of Information: text
I clicked on test and it gave me an error:
sh: /tmp/test.sh: Permission denied
I added this line to zabbix_agentd.conf on the LInux host
AllowKey=system.run[*]
The permission on /tmp/test.sh is 777.
I'm able to run this test successfully -
zabbix_agentd -t system.run[/tmp/test.sh]
system.run[/tmp/test.sh] [t|]
The Zabbix agent log has no error related to this. The Linux host has RedHat Linux.
Comment