Hi,
I am new to zabbix, but familiar with linux etc. I have setup two servers, one with zabbix server and one with GLPI helpdesk. All running well. I have installed the webservices plugin in GLPI and created the Trigger action in zabbix to generate tickets in GLPI. The active command for the trigger is
/usr/bin/php /usr/lib/zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi.php eventhost="{HOSTNAME}" event="DOWN" state="{TRIGGER.STATUS}" hostproblemid=0 lasthostproblemid=0 servico="{TRIGGER.NAME}" triggerid="{TRIGGER.ID}" eventzabbix="{EVENT.ID}"
I have spent a day debugging the script to get it to work with the latest version of zabbix and GLPI and it all works well from the command line. For example if I execute this
sudo runuser -l zabbix /usr/bin/php /usr/lib/zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi.php eventhost="Graeme Phone" event="DOWN" state="PROBLEM" hostproblemid=0 lasthostproblemid=0 servico="ICMP" triggerid="16973" eventzabbix="1448"
from the command line it runs fine and creates a ticket in the GLPI server.
Problem is, I can't for the life of me get it to execute on an event. The event fires and I get this in the logs on zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi
Failed to execute command "/usr/bin/php /usr/lib/zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi.php eventhost="Graeme Phone" event="DOWN" state="PROBLEM" hostproblemid=0 lasthostproblemid=0 servico="ICMP" triggerid="16973" eventzabbix="1624"": Could not open input file: /usr/lib/zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi.php
zabbix:zabbix is the owner of the php file.
I am sure this looks like a permissions issue, but I can't work it out.
The zabbix user has a shell /bin/bash defined. If I run "sudo runuser -l zabbix" and try to execute the command it works fine.
Any ideas anyone ?
thanks
I am new to zabbix, but familiar with linux etc. I have setup two servers, one with zabbix server and one with GLPI helpdesk. All running well. I have installed the webservices plugin in GLPI and created the Trigger action in zabbix to generate tickets in GLPI. The active command for the trigger is
/usr/bin/php /usr/lib/zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi.php eventhost="{HOSTNAME}" event="DOWN" state="{TRIGGER.STATUS}" hostproblemid=0 lasthostproblemid=0 servico="{TRIGGER.NAME}" triggerid="{TRIGGER.ID}" eventzabbix="{EVENT.ID}"
I have spent a day debugging the script to get it to work with the latest version of zabbix and GLPI and it all works well from the command line. For example if I execute this
sudo runuser -l zabbix /usr/bin/php /usr/lib/zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi.php eventhost="Graeme Phone" event="DOWN" state="PROBLEM" hostproblemid=0 lasthostproblemid=0 servico="ICMP" triggerid="16973" eventzabbix="1448"
from the command line it runs fine and creates a ticket in the GLPI server.
Problem is, I can't for the life of me get it to execute on an event. The event fires and I get this in the logs on zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi
Failed to execute command "/usr/bin/php /usr/lib/zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi.php eventhost="Graeme Phone" event="DOWN" state="PROBLEM" hostproblemid=0 lasthostproblemid=0 servico="ICMP" triggerid="16973" eventzabbix="1624"": Could not open input file: /usr/lib/zabbix/externalscripts/zabbix-glpi/tickets_zabbix_glpi.php
zabbix:zabbix is the owner of the php file.
I am sure this looks like a permissions issue, but I can't work it out.
The zabbix user has a shell /bin/bash defined. If I run "sudo runuser -l zabbix" and try to execute the command it works fine.
Any ideas anyone ?
thanks
Comment