Skip to main content

Generate a PDF from Centreon Dashboard and optional sent it by email

Project description

Centreon Report to PDF

centreon_report_to_pdf is a software to generate PDF files from centreon dashboard Hosts and Services Group.

Basically, it connect to centreon server using an autologin link or a username/password to download the HostGroup/ServiceGroup CSV file from a specifc period of time. After this, it process the CSV file and generate the PDF with charts, resume and details table. Optional, you can add a Cover Page and sent the PDF Report by email too.


Eric Coquard wrote a great tutorial (in French) showing how to configure and use centreon_report_to_pdf here. Thanks man !!! :-D


centreon_report_to_pdf have been test on Debian and Ubuntu (lasted versions), but it should work in any environment with python v3.5+ and some dependencies.

  • Clone this repository:
git clone
  • Install the dependencies:
cd centreon_report_to_pdf
pip install -r requirements.txt


You will need a 'config.ini' file before use this software. On the repository exists a "config_example.ini" that you can copy/rename to use.

After edit your 'config.ini' file, you only need to run:


to generate the PDF report.


Some options are allowed at the command line to overrirde the default options on configuration file:

  • -c or --config filename

    • Allow your specific an alternative config file name. For example:
    python3 -c client1_config.ini
  • -H or --hostgroup NUMBER

    • Allow your to specific the hostgroup number. You can repeat this option to group two or more hosts groups on the report, for example:
    python3 -H 2 -H 12 -H 20
  • -S or --servicegroup NUMBER

    • Allow your to specific the servicegroup number. You can repeat this option to group two or more services groups on the report, for example:
    python3 -S 1 -S 14 -S 15
  • -p or --period PERIOD

    • Allow your to specific the time period to your report. Valid values to periods are:
      • yesterday
      • this_week
      • last_week
      • this_month
      • last_month
      • this_year
      • last_year
    python3 -p this_week
    python3 -p this_year
  • -o or --pdf_output /path/to/report.pdf

    • Allow your specific the path to pdf report.
    python3 -H 1 -S 14 -S 15 -o /tmp/my_report.pdf
  • --email_to

    • Allow your to specific a new email address, for example:
    python3 --email_to --email_to --email_to

Host and Service Group IDs

To obtain the list of Hosts and Services Groups from centreon, you can use the clapi command line. Some examples:

/usr/share/centreon/bin/centreon -u USERNAME -p PASSWORD -o HG -a show
/usr/share/centreon/bin/centreon -u USERNAME -p PASSWORD -o SG -a show

Cover Page

You can add a Cover Page to your reports with a logo/image and some titles/texts. Please, check the configuration file to enable it and see all parameters.

Sent PDF Report by email

You can change the configuration file to sent the PDF report by email. Actually, you can:

  • Use a local SMTP server or an external (gmail, office465, etc) with/out authentication.
  • Sent the PDF Report to one or more recipients.
  • Use a text file like email body template.

Report Example



  • Add more arguments options
  • Add some PDF report to repository

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

centreon_report_to_pdf-1.5.4.tar.gz (19.3 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page