Hello i have a problem my simple script waont be executed on a action
in events they still is the message "fails"
aim using zabbix Zabbix Appliance 2.0.6
in zabbix_server.cfg the default path of the alertscripts is defined as
by default Aplience this folder does not exist (the same by externalscripts!)
but externalscripts works for me :-) => ${datadir} = /usr/share/
so i created this folder
i have a simple script there "test.sh"
the user who has this media type is a superadmin ( no right problems for this zabbix user)
does zabbix executing this script as root ?
for externalscripts it works :
anny suggestions ?
in events they still is the message "fails"
aim using zabbix Zabbix Appliance 2.0.6
in zabbix_server.cfg the default path of the alertscripts is defined as
Code:
### Option: ExternalScripts
# Full path to location of external scripts.
# Default depends on compilation options.
#
# Mandatory: no
# Default:
# ExternalScripts=${datadir}/zabbix/externalscripts
### Option: AlertScriptsPath
# Full path to location of custom alert scripts.
# Default depends on compilation options.
#
# Mandatory: no
# Default:
AlertScriptsPath=${datadir}/zabbix/alertscripts
but externalscripts works for me :-) => ${datadir} = /usr/share/
so i created this folder
/usr/share/zabbix/alertscripts
Code:
#!/bin/bash echo `date >> /tmp/test_ok.txt`
Code:
zabbix:/usr/share/zabbix/alertscripts # ls -als total 12 4 drwxr-xr-x 2 root root 4096 Aug 23 15:18 . 4 drwxr-xr-x 15 root root 4096 Aug 23 15:18 .. 4 -rwxrwxrwx 1 root root 44 Aug 23 15:18 test.sh
for externalscripts it works :
Code:
zabbix:/usr/share/zabbix/externalscripts # ls -als total 28 4 drwxr-xr-x 2 root root 4096 Aug 22 17:58 . 4 drwxr-xr-x 15 root root 4096 Aug 23 15:18 .. 4 -rwxrwxrwx 1 root root 2291 Jul 17 12:47 sanbox_get_connUnitId.sh 4 -rwxrwxrwx 1 root root 702 Jul 17 12:47 sanbox_get_connUnitPortHWState_by_port.sh 4 -rwxrwxrwx 1 root root 3778 Jul 17 16:54 sanbox_get_connUnitSensorMessage_by_sensor.sh 8 -rwxrwxrwx 1 root root 7103 Jul 17 12:47 sanbox_get_connUnitSensorStatus_by_sensor.sh
anny suggestions ?
Comment