Mailreports from Kibana pages via PhantomJS

A lot of people ask for mail reports in but this feature does not exist. At least not in the oss version. As i also had these requirement for an OTRS installation and don’t wanted to use expensive software like Skedler, i decided to create an own solution.

It depends on PhantomJS, which can be found on PhantomJS is a headless WebKit browser scriptable with a JavaScript API. So you’re able to browse (Kibana) websites and save them to JPG. These JPGs can be send via mail easily.

First of all you have to get a PhantomJS binary somewhere. If you want to build it yourself follow instructions of

Now get the mail report scripts from my GitHub page. You can find everything here:

You have to edit the and urls.conf files to get it work. The urls.conf is the file which defines the reports, which are send to the mail adresses you want. Columns are separated by “;;;”. It will loook like:

  •;;;OTRS-Reports;;;1w/w;;;Postmaster*;;;1920*1500px;;;last week

The fields are:

  • Mail address where report is send to
  • Kibana dashboard which should be used
  • Time interval of the report
  • Search string in Kibana dashboard
  • Resolution of JPG
  • Human readable time string for use in the report mail

You can run the script manually to check if everything works. If so just create the following cronjob, which triggers this weekly.

  • @weekly root /opt/kibana-mailreports/ 2>&1 > /var/tmp/kibana-mailreports.log

Thats it. Have fun getting weekly mail reports from Kibana! :-)