Trying to get graph data added to emails. I've got 2 attachments here, one showing what our current notifications look like, and one showing what I want to add to it.
What it looks like now:
What I want to add:
I have noticed that right clicking on the perf graph allows the option to copy the image link, I just need to know if there's anyway to wildcard it so that it pulls the graph for the right service on the right host. Long shot, and it's probably not possible, but I figured it wouldn't hurt to check.
Include perf graph in email notification
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Include perf graph in email notification
You do not have the required permissions to view the files attached to this post.
Re: Include perf graph in email notification
I think main issue here is that our notification php script does not have the logic to do this at this time. It would need to generate the relevant graph image and then attach it to the email. You could try to shoe-horn just the link in, but that will not work due to the XI authentication. (though you may be able to use a ticket_id) Also, the notification script would have to do some url encoding for the hostname/service_description (as they can contain illegal url characters like spaces).
You might be able to pull something like this off with a custom notification handler script (instead of the XI one), but you would have to roll your own.
You might be able to pull something like this off with a custom notification handler script (instead of the XI one), but you would have to roll your own.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Include perf graph in email notification
This is something that we also need to implement at the moment.
Are there currently any plans to provide this directly using the XI Notification handlers?
Are there currently any plans to provide this directly using the XI Notification handlers?
Re: Include perf graph in email notification
Hey,
I'm not sure if this is possible to integrate in email (didn't test it yet) but this might be a solution to embed a Higchart graph in a HTML email as long as the email is read internally. Check out this thread:
https://support.nagios.com/forum/viewto ... highcharts
Grtz
I'm not sure if this is possible to integrate in email (didn't test it yet) but this might be a solution to embed a Higchart graph in a HTML email as long as the email is read internally. Check out this thread:
https://support.nagios.com/forum/viewto ... highcharts
Grtz
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Include perf graph in email notification
Thanks Willem! @IMTECH - let us know if this helps you.
Former Nagios Employee
Re: Include perf graph in email notification
Hi,
I tried to integrate it using iframe but I only get an empty frame.
I fear it could have issues with executing javascript from a different location (https://de.wikipedia.org/wiki/Same-Origin-Policy).
I tried to integrate it using iframe but I only get an empty frame.
Code: Select all
<iframe width=800 src="http://x.x.x.x/nagiosxi/includes/components/graphexplorer/graph.php?host=%host%&service=%service%&width=400&height=300&username=putuserhere&ticket=puttokenhere" />Re: Include perf graph in email notification
This will only work internally, and you'll need to include your username / ticket. If you open that link up in your browser does it return the expected graph? Are you looking at the graph internally?
Former Nagios Employee
Re: Include perf graph in email notification
Yes, its working if I try it in my browser.
The issue is, that it does not generate a simple graphic, but an website with the graph in it.
But also if it would just be a graphic that we can include in the mail using the <img>-tags we would have the issue that its not a snapshot of the time of alert.
What we try to achieve is, to have a graph embed in the alarm mail of the time of alarm like we see this in different monitoring applications.
The issue is, that it does not generate a simple graphic, but an website with the graph in it.
But also if it would just be a graphic that we can include in the mail using the <img>-tags we would have the issue that its not a snapshot of the time of alert.
What we try to achieve is, to have a graph embed in the alarm mail of the time of alarm like we see this in different monitoring applications.
Re: Include perf graph in email notification
Ah, I understand. Just to make sure we're on the same page.
So, what you're looking for, is when the notification is sent, a static image of how the graph looks at that time - rather then a dynamically changing graph (as the iframes currently do).
Is that correct?
So, what you're looking for, is when the notification is sent, a static image of how the graph looks at that time - rather then a dynamically changing graph (as the iframes currently do).
Is that correct?
Former Nagios Employee
Re: Include perf graph in email notification
Sorry for the late answer - it seems I missed the mail notification of the reply ...
Yes, this would be exactly what we are looking for.
Yes, this would be exactly what we are looking for.