Skip to main content

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.

Tutorial

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

Installation

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 https://github.com/vhsantos/centreon_report_to_pdf.git
  • Install the dependencies:
cd centreon_report_to_pdf
pip install -r requirements.txt

Usage

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:

python3 centreon_report_to_pdf.py

to generate the PDF report.

Options

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 centreon_report_to_pdf.py -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 centreon_report_to_pdf.py -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 centreon_report_to_pdf.py -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 centreon_report_to_pdf.py -p this_week
    python3 centreon_report_to_pdf.py -p this_year
    
  • -o or --pdf_output /path/to/report.pdf

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

    • Allow your to specific a new email address, for example:
    python3 centreon_report_to_pdf.py --email_to user@gmail.com --email_to boss@office365.com --email_to it@mycompany.com
    

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

centreon_report.pdf

TODO

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

Metadata

Release files for centreon-report-to-pdf 1.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for centreon-report-to-pdf 1.5.4
File Size Uploaded
centreon_report_to_pdf-1.5.4.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for centreon-report-to-pdf 1.5.4
File Interpreter ABI Platform
centreon_report_to_pdf-1.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 39.8 kB

Release files / centreon_report_to_pdf-1.5.4.tar.gz

Download URL centreon_report_to_pdf-1.5.4.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
80c090d007cfb84a90d31e7fc6914ef4f46b6370f0347989c11a67861cc10e94
BLAKE2b-256 checksum
How to use checksums
ae76ff1f457be6aabd84074bb0ef4882a4380a3986a212eee937622b69925a68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / centreon_report_to_pdf-1.5.4-py3-none-any.whl

Download URL centreon_report_to_pdf-1.5.4-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da736a26e6f0e249e9d5f379cb7a0875adf1f264b65d9f3d0e10d508f3f54457
BLAKE2b-256 checksum
How to use checksums
1af5ebf3252a094fd88734f8bcc5111cf84bb1a4edbe423abed886987ef0e8f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

1.5.4 This release

2 release files

1.5.2

2 release files

1.4.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page