0

I have a cacti graph set up. I'd like to receive daily emails of some graphs. What are my options?

Amandasaurus
  • 31,471
  • 65
  • 192
  • 253

4 Answers4

2

Assuming your using linux or other unix if you use cacti & cron.

How about:

mutt -s "subject" -a image1.jpg -a image2.jpg -a page.html recipient@domain.com < /dev/null

I think as long as you refer to the images within page.html, they should automatically show in most email clients or ask you if you want to show them.

*EDIT: Probably should've noted the difference in the html tag to pick up the embedded image should look something like.

<img src="cid:image1.jpg">

cid indicates to email client to look for embedded rather than locate from some URL*.

Regards M

Michael Henry
  • 577
  • 3
  • 9
2

Cacti has builtin functionality to export graphs (Settings => Graph Export).

I don't believe it has the ability to email the results. Only export to a local path or FTP resource.

You could however tie in the local path export with some Bash scripting to email the results.

Dan Carley
  • 25,617
  • 5
  • 53
  • 70
0

THOLD (Threshold) can do this. It's a Cacti Plugin.

0

Not sure if Cacti has a folder with the graph's already generated, or if generates them as they are requested. If it is the latter, I would recommend scripting something that scrapes the cacti webpage.

If you know a little Perl, there are two options I can think of (I think it would be the best language for this approach). The easiest is to use WWW::Mechanize, because you can use the WWW::Mechanize::Shell to generate the script for you. Here is a little tutorial.

Another Perl option would be to use LWP::UserAgent, HTTP::Response, HTML::TreeBuilder. This is probably the more traditional way to scrape data.

Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448