Ad Widget

Collapse

How add link of item graph to e-mail

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rudlafik
    Senior Member
    • Nov 2018
    • 144

    #1

    How add link of item graph to e-mail

    Hi,
    Grains of sand at the foot of the mountains. ;-)

    1. Message template in HTML
    2. add this line of your url graph

    HTML Code:
    <p><a href="https://127.0.0.1/chart.php?from=now-3h&to=now&itemids[0]={ITEM.ID}&profileIdx=web.item.graph.filter&width= 1200&height=200">Link of GRAPH</a></p>
    Alert mesage for example:

    HTML Code:
    <span style="font-size:80px"></span><br>
    <p><b>Problem started at </b>{EVENT.TIME} <b>on</b> {EVENT.DATE}<br>
    <b>Problem name:</b> {EVENT.NAME}<br>
    <h3 style="color:Blue;">Host: {HOST.NAME}</h3>
    <p> <h1 style="background-color:Tomato;color:White;">Severity: {EVENT.SEVERITY}</h1></p>
    <b>Operational data:</b> {EVENT.OPDATA}<br>
    <p><a href="https://127.0.0.1/chart.php?from=now-3h&to=now&itemids[0]={ITEM.ID}&profileIdx=web.item.graph.filter&width= 1200&height=200">Link of GRAPH</a></p>
    &#10060 ❌
  • Earlbottoms
    Junior Member
    • Jun 2023
    • 1

    #2
    Originally posted by Rudlafik
    Hi,
    Grains of sand at the foot of the mountains. ;-)

    1. Message template in HTML
    2. add this line of your url graph

    HTML Code:
    <p><a href="https://127.0.0.1/chart.php?from=now-3h&to=now&itemids[0]={ITEM.ID}&profileIdx=web.item.graph.filter&width= 1200&height=200">Link of GRAPH</a></p>
    Alert mesage for example:

    HTML Code:
    <span style="font-size:80px"></span><br>
    <p><b>Problem started at </b>{EVENT.TIME} <b>on</b> {EVENT.DATE}<br>
    <b>Problem name:</b> {EVENT.NAME}<br>
    <h3 style="color:Blue;">Host: {HOST.NAME}</h3>
    <p> <h1 style="background-color:Tomato;color:White;">Severity: {EVENT.SEVERITY}</h1></p>
    <b>Operational data:</b> {EVENT.OPDATA}<br>
    <p><a href="https://127.0.0.1/chart.php?from=now-3h&to=now&itemids[0]={ITEM.ID}&profileIdx=web.item.graph.filter&width= 1200&height=200">Link of GRAPH</a></p>
    &#10060 ❌
    Hello,
    To add the link of the item graph to an email, you can use the following HTML code as a template:
    <p>
    <a href="https://127.0.0.1/chart.php?from=now-3h&to=now&itemids[0]={ITEM.ID}&profileIdx=web.item.graph.filter&width= 1200&height=200">Link of GRAPH</a>
    </p>
    ​You can incorporate this code into your email template, replacing the placeholder "{ITEM.ID}" with the actual ID of the item graph you want to link to.

    Here's an example of an alert message with the graph link included:​
    <span style="font-size:80px">❌</span><br>
    <p><b>Problem started at </b>{EVENT.TIME} <b>on</b> {EVENT.DATE}<br>
    <b>Problem name:</b> {EVENT.NAME}<br>
    <h3 style="color:Blue;">Host: {HOST.NAME}</h3>
    <p> <h1 style="background-color:Tomato;color:White;">Severity: {EVENT.SEVERITY}</h1></p>
    <b>Operational data:</b> {EVENT.OPDATA}<br>
    <p><a href="https://127.0.0.1/chart.php?from=now-3h&to=now&itemids[0]={ITEM.ID}&profileIdx=web.item.graph.filter&width= 1200&height=200">Link of GRAPH</a></p>
    ​Remember to replace the placeholders "{EVENT.TIME}", "{EVENT.DATE}", "{EVENT.NAME}", "{HOST.NAME}", "{EVENT.SEVERITY}", "{EVENT.OPDATA}", and "{ITEM.ID}" with the relevant information you want to include in the email.
    I hope the information helps you.

    Best regards,
    Earlbottoms



    Comment

    • wilfred
      Junior Member
      • Jun 2024
      • 7

      #3
      Hi Everyone,

      I already applied the HTML Code that you provide everything is fine but the link code is not working after I click the link from email notification and the result is "cannot be reach" or " File not found" Is there any other way to see the graph from email notification?


      Thanks and Regards,

      Comment

      • wilfred
        Junior Member
        • Jun 2024
        • 7

        #4
        Hi Anyone who can assist me on this matter. Thanks in advance..

        Comment

        • Lone Wolf
          Member
          • Mar 2010
          • 34

          #5
          Wilfred, you probably need to modify the beginning of the URL provided. It should match the URL that you use to access the Zabbix web interface. For example, it may begin with this: Replace 127.0.0.1 with the IP/domain name of your Zabbix instance and have a look, its URL may include /zabbix/ or some other path.

          Comment

          • wilfred
            Junior Member
            • Jun 2024
            • 7

            #6
            Hi Lone Wolf,

            The link is now accessible with the item graph i've missed this /zabbix/ at the URL link.

            Thank you for assistance.

            Have a great day!

            Comment

            Working...