Package: centreon-report-to-pdf
Centreon Report to PDFcentreon_report_to_pdfis a software to generate PDF files fromcentreondashboard Hosts and Services Group.Basically, it connect tocentreonserver 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.TutorialEric Coquardwrote a great tutorial (in French) showing how to configure and use centreon_report_to_pdfhere. Thanks man !!! :-DInstallationcentreon_report_to_pdfhave been test on Debian and Ubuntu (lasted versions), but it should work in any environment withpythonv3.5+ and some dependencies.Clone this repository:git clone https://github.com/vhsantos/centreon_report_to_pdf.gitInstall the dependencies:cd centreon_report_to_pdf
pip install -r requirements.txtUsageYou 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.pyto generate the PDF report.OptionsSome options are allowed at the command line to overrirde the default options on configuration file:-c or --config filenameAllow your specific an alternative config file name. For example:python3 centreon_report_to_pdf.py -c client1_config.ini-H or --hostgroup NUMBERAllow 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 NUMBERAllow 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 PERIODAllow your to specific the time period to your report. Valid values to periods are:yesterdaythis_weeklast_weekthis_monthlast_monththis_yearlast_yearpython3 centreon_report_to_pdf.py -p this_week
python3 centreon_report_to_pdf.py -p this_year-o or --pdf_output /path/to/report.pdfAllow 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_toAllow 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.comHost and Service Group IDsTo obtain the list of Hosts and Services Groups from centreon, you can use theclapicommand line. Some examples:To get all theHosts Groups IDs/usr/share/centreon/bin/centreon -u USERNAME -p PASSWORD -o HG -a showTo get all theServices Groups IDs/usr/share/centreon/bin/centreon -u USERNAME -p PASSWORD -o SG -a showCover PageYou 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 emailYou 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 Examplecentreon_report.pdfTODOAdd more arguments optionsAdd some PDF report to repository