Ad Widget

Collapse

Zabbix 3.4.3 - AlertScriptsPath Ignored

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • devsum
    Junior Member
    • Nov 2017
    • 2

    #1

    Zabbix 3.4.3 - AlertScriptsPath Ignored

    Wanted to post this as a bug report as I've validated on my dev and production ZBX systems.

    In my zabbix 3.2 environment, we place our alert scripts in /usr/lib/zabbix/alertscripts

    root@null:/usr/lib/zabbix/alertscripts# ls -l /usr/lib/zabbix/
    total 8
    drwxr-xr-x 2 root root 4096 Nov 13 15:06 alertscripts
    drwxr-xr-x 2 root root 4096 Sep 26 10:55 externalscripts

    Our Zabbix Server confs call out this dir:

    AlertScriptsPath=/usr/lib/zabbix/alertscripts

    After upgrading to 3.4.3, I've noticed this variable is ignored and zabbix only looks for scripts in {datadir} which in my (and I imagine most cases) is /usr/share/zabbix/alertscripts/.

    I believe the AlertScriptPath parameter is being mishandled or is ignored.
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2
    Cannot confirm it on Zabbix 3.4.4

    Code:
    [root@zabbix tmp]# cat /etc/zabbix/zabbix_server.conf | grep AlertScripts
    ### Option: AlertScriptsPath
    # AlertScriptsPath=${datadir}/zabbix/alertscripts
    AlertScriptsPath=/etc/zabbix/alertscripts
    Code:
    2017-11-14 15:34:00	Test	AlertScript Original problem ID: 9321 Sent
    Have you restarted Zabbix Server after config change in zabbix_server.conf ?

    Regards,
    Kaspars

    Comment

    • devsum
      Junior Member
      • Nov 2017
      • 2

      #3
      Originally posted by kaspars.mednis

      Have you restarted Zabbix Server after config change in zabbix_server.conf ?
      Yep, reloaded the conf cache, restarted the zabbix-server.service, and even the whole host.

      I should mention, if I have any path specified for alertscripts, the param seems to be mishandled and unused.

      For example, my datadir is /usr/share/zabbix/alertscripts... If I place my alert scripts in that dir and comment out the alertscripts param in the configuration file, the scripts execute correctly. As soon as I call out a dir which could be /usr/share/zabbix/alertscripts or /foo/alertscripts, the scripts will not run and the action log never even shows an attempt to call the script.

      Comment

      • kaspars.mednis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2017
        • 349

        #4
        Have you tried to upgrade to 3.4.4 ? i have tested 3.4.4 with different alertpaths, and everything seems ok.
        Does zabbix OS user have read/execute rights on the Alertscripts path ?
        Do you have SELINUX enabled ?

        Regards,
        Kaspars

        Comment

        Working...