Ad Widget

Collapse

How to update Acknowledge URL within alert e-mail?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snmpguru8
    Junior Member
    • Apr 2020
    • 19

    #1

    How to update Acknowledge URL within alert e-mail?


    When a problem occurs, I get an e-mail like this:
    Problem started at 11:12:02 on 2021.02.08 Problem name: HOST CPU usage critical: 95 % Host: HOST Severity: Critical
    Original problem ID: 352631
    ACK: https://zabbix.contoso.com/zabbix/zabbix.php?action=acknowledge.edit&eventids[]=352631
    Action Name: ALERT ALL
    When I built this (Zabbix 5), I setup a redirect so that it's accessible at just https://zabbix.contoso.com/, no need to specify /zabbix at the end.
    Is it possible to update the URL in the notification e-mail to remove the /zabbix, as well?


    For reference, I have redirected /zabbix to the top level URL by updating the zabbix.conf within /etc/apache2/conf-enabled

  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    The correct solution is to configure your apache server to use the url https://zabbix.contoso.com/ for zabbix frontend without redirection and an additional path.
    Then there will be a correct link in the email.
    To do this is quite simple, but I will not give advice because there is a high probability of making a mistake without knowing the full configuration of Apache vhosts and question is more related to the administration of the apache server.

    Last edited by Hamardaban; 13-02-2021, 17:41.

    Comment

    • snmpguru8
      Junior Member
      • Apr 2020
      • 19

      #3
      Originally posted by Hamardaban
      The correct solution is to configure your apache server to use the url https://zabbix.contoso.com/ for zabbix frontend without redirection and an additional path.
      Then there will be a correct link in the email.
      To do this is quite simple, but I will not give advice because there is a high probability of making a mistake without knowing the full configuration of Apache vhosts and question is more related to the administration of the apache server.

      https://www.zabbix.com/forum/zabbix-...path-to-zabbix
      Thanks for the update, mate. Reading that thread, I attempted the recommended change from that thread:
      "Found it, for those others trying the same thing here's what i did.

      edited both;

      /etc/apache2/sites-available\default
      /etc/apache2/sites-available\default-ssl

      Changed from /var/www to /usr/share/zabbix

      restarted apache2."

      And while I can access the URL without appending /zabbix, I still cannot acknowledge alerts in the e-mail.
      They still come in as:
      https://zabbix.contoso.com/zabbix/za....edit&eventids[]=7399596

      And when the link is clicked on, this error is displayed:
      "Class not found for action acknowledge.edit."

      Thanks again

      Comment

      • Hamardaban
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2019
        • 2713

        #4
        Go to Configuration -> Actions, select the action that sends your emails, and check what is written next to ACK:?
        Or try to edit Message templates for email https://www.zabbix.com/documentation...mon_parameters
        Last edited by Hamardaban; 14-02-2021, 18:15.

        Comment

        • snmpguru8
          Junior Member
          • Apr 2020
          • 19

          #5
          Originally posted by Hamardaban
          Go to Configuration -> Actions, select the action that sends your emails, and check what is written next to ACK:?
          Or try to edit Message templates for email https://www.zabbix.com/documentation...mon_parameters
          Thanks! It looks like under Configuration -> Actions, there were several that had the /zabbix URL hard coded. I have updated these.

          Comment

          • snmpguru8
            Junior Member
            • Apr 2020
            • 19

            #6
            Unfortunately, it looks like I am running into the same error, despite the URL now showing:



            Class not found for action acknowledge.edit.

            Any other thoughts?

            Comment

            • snmpguru8
              Junior Member
              • Apr 2020
              • 19

              #7
              In case it helps anyone else. It appears the URL format under Actions changed between versions 4 and 5. I updated the following and all is well

              Original:
              https://zabbix.contoso.com/zabbix.ph....edit&eventids[]={EVENT.ID}

              Updated to:
              https://zabbix.contoso.com/zabbix.php?action=popup&popup_action=acknowledge.e dit&eventids%5B%5D={EVENT.ID}


              Comment

              Working...