Ad Widget

Collapse

Zabbix 3.2 Pushover message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Florius
    Junior Member
    • Jan 2017
    • 15

    #1

    Zabbix 3.2 Pushover message

    Hi guys. I've been searching all over the internet, but no luck so far.
    Hopefully somebody here can help me.

    We have always used Pushovers in Zabbix 2.4 with this script:
    #!/bin/bash
    # Zabbix (PushOver)

    PToken=(Our APP token)
    PUser=$1
    PSubject=$2
    PMessage=$3

    curl -s \
    -F "token=$PToken" \
    -F "user=$PUser" \
    -F "subject=$PSubject" \
    -F "message=$PMessage" \
    https://api.pushover.net/1/messages.json >> /var/log/pushover/pushover.log
    However, this script doesn't work anymore when using in Zabbix 3.2.
    We use the exact same settings, and in the actions log I can see Zabbix sent the message, but I never receive them.
    If I do it via the CLI the script works fine.
    So it must be a change in Zabbix, but I am not sure what exactly.

    Thanks in advance!
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Do you add script parameters?
    ex. {ALERT.SENDTO}, {ALERT.SUBJECT} and {ALERT.MESSAGE}
    Please check your media setting.

    Comment

    • Florius
      Junior Member
      • Jan 2017
      • 15

      #3
      Originally posted by Atsushi
      Do you add script parameters?
      ex. {ALERT.SENDTO}, {ALERT.SUBJECT} and {ALERT.MESSAGE}
      Please check your media setting.

      https://www.zabbix.com/documentation...s/media/script
      Hi Atsushi. Thanks a lot for replying! I indeed suspect that I miss script parameters. Unfortunately I don't have any experience. What parameters do I need to add for my script to work?
      Or do I need to adjust my script to "{ALERT.SENDTO}, {ALERT.SUBJECT} and {ALERT.MESSAGE}"?

      EDIT:

      After adding the parameters to Zabbix, it worked, thanks a lot!
      Last edited by Florius; 26-01-2017, 18:01.

      Comment

      Working...