Ad Widget

Collapse

Put the user's name into the e-mails subject

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PacsoT
    Junior Member
    • Jul 2023
    • 3

    #1

    Put the user's name into the e-mails subject

    Hello All!

    I wish to set up SMS alerts for events that have Disaster set as severity,
    We have a small group of people, who should be notified via SMS, if something reeeealy bad happens:

    We have an ancient​ SMS gateway that only capable of sending SMS via e-mail.
    The destination phone number goes to the SUBJECT, and the text goes in plain text into the e-mail's body.

    And Zabbix is absolutely not prepared for this stuff! :-)

    I did put my phone number into my user's last name field, and have set up a new media type specificity for Disasters. This would send an e-mail to a specific e-mail address, with the phone number in the subject, and the short problem description in the body...something like in the attached photo.

    However the macro doesn't get translated, into the last name...which would be the destination phone number.
    Do you have any ides how could I get this to work?
  • SanMonitor
    Member
    • Aug 2022
    • 48

    #2
    Hello PascoT,
    I think the USER macros can only be used in the context of starting scripts so in this case it has no value.
    Maybe you can try the macro {ALERT.SENDTO}? I have no experience with this macro but it's worth a try

    Comment

    • PacsoT
      Junior Member
      • Jul 2023
      • 3

      #3
      ​Thank you for the suggestion, tried it and failed miserably.
      There are no useful macros I could utilize to get a phone number into the subject.
      Click image for larger version

Name:	image.png
Views:	130
Size:	14.3 KB
ID:	468269

      Resultant e-mails look like this:

      Click image for larger version

Name:	image.png
Views:	134
Size:	14.6 KB
ID:	468268

      Comment

      Working...