Ad Widget

Collapse

Zabbix 3.0.1 - alertscripts not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paulgruendel
    Junior Member
    • Mar 2016
    • 6

    #1

    Zabbix 3.0.1 - alertscripts not working

    Ubuntu 14.04.4 LTS

    I have create some "alerscript" but this will not send - in "Zabbix Webinterface" said - Status SEND ???

    "zabbix_server.conf" root root

    ### Option: AlertScriptsPath
    AlertScriptsPath=/etc/zabbix/alert

    1.
    folder "alert" with "root root" 755 and 777
    test.sh with "root root 755 and 777

    2.
    folder "alert" with "zabbix zabbix" 755 and 777
    test.sh with "zabbix zabbix 755 and 777

    "etc/passwd":
    zabbix:x:111:118::/var/lib/zabbix/:/bin/false:/bin/bash

    Thanks for help, Paul
  • paulgruendel
    Junior Member
    • Mar 2016
    • 6

    #2
    ... but I found out that the "remote command" ist working!?!

    1. Actions > Operations
    2. remote commands
    3. /etc/zabbix/alert/test.sh

    This is the script:

    HTML Code:
    #!/bin/bash
    TOKEN="$1"
    SUBJECT="$2"
    MESSAGE="$3"
     
    curl https://api.pushbullet.com/v2/pushes \
          -k \
          -u $TOKEN: \
          -d type=note \
          -d title="$SUBJECT" \
          -d body="$MESSAGE" \
          -X POST

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      Please specify an explicit parameters if the call with the same parameters as before.

      Code:
      {ALERT.SENDTO}
      {ALERT.SUBJECT}
      {ALERT.MESSAGE}
      manual:

      Comment

      • waicheung.yung
        Junior Member
        • Apr 2016
        • 2

        #4
        Fail on posting alert to Slack

        I am unable to receive alert message even add macro as below, any ideas about it? Appreciate for any help.

        Code:
        {ALERT.SENDTO}
        {ALERT.SUBJECT}
        {ALERT.MESSAGE}
        I am currently using https://github.com/ericoc/zabbix-sla...aster/slack.sh

        Comment

        • jayshrin
          Junior Member
          • Apr 2016
          • 2

          #5
          Same problem here

          Even I tried runnign slack.sh from Zabbix webui but no luck.

          Did that work for you later?


          Thanks,
          Jayshri

          Comment

          • waicheung.yung
            Junior Member
            • Apr 2016
            • 2

            #6
            Originally posted by jayshrin
            Even I tried runnign slack.sh from Zabbix webui but no luck.

            Did that work for you later?


            Thanks,
            Jayshri
            Yes, it works for me, found it was related to my typo in zabbix

            Comment

            Working...