[ZBXNEXT-6478] Scheduled PDF report generation service (umbrella task) Created: 2021 Jan 29  Updated: 2024 Sep 05  Resolved: 2021 Aug 25

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: 6.0.0alpha1, 6.0 (plan)

Type: Change Request Priority: Trivial
Reporter: Rostislav Palivoda Assignee: Andrejs Griščenko
Resolution: Fixed Votes: 11
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2021-05-17 at 00.15.41.png     PNG File screenshot-1.png     PDF File test_2021-05-14_11-23.pdf     PDF File ✅ Scheduled PDF report generation v1.1.pdf    
Issue Links:
Causes
causes ZBX-19293 Zabbix user should be able to generat... Closed
causes ZBX-25152 Custom timeout for "Scheduled report ... Needs specification
Duplicate
duplicates ZBXNEXT-247 Built in feature to export reports an... Open
duplicates ZBXNEXT-248 Improved and more advanced reporting ... Closed
Related
related to ZBX-24702 Scheduled reports timeout Closed
Sub-task
Sub-Tasks:
Key
Summary
Type
Status
Assignee
ZBXNEXT-6479 Frontend changes for scheduled PDF re... Specification change (Sub-task) Closed Andrejs Griščenko  
ZBXNEXT-6480 Packages for PDF report generation se... Specification change (Sub-task) Closed Jurijs Klopovskis  
ZBXNEXT-6499 Server side changes for scheduled PDF... Change Request (Sub-task) Closed Andris Zeila  
ZBXNEXT-6519 Golang implementation of web_service ... Specification change (Sub-task) Closed Andris Zeila  
ZBXNEXT-6543 New user and user group icons Specification change (Sub-task) Closed Andrejs Griščenko  
Team: Team A
Sprint: Sprint 72 (Jan 2021), Sprint 73 (Feb 2021), Sprint 74 (Mar 2021), Sprint 75 (Apr 2021), Sprint 76 (May 2021), Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021)
Story Points: 0.1

 Description   

Currently Zabbix does not support scheduled PDF report generation, it is one of the major complains of enterprise users. It is time to fix it by enabling Zabbix to support sending of existing dashboards as PDF reports.

In the future dashboards widgets should be enhanced to support more widgets suitable for reporting purposes.

See ✅ Scheduled PDF report generation v1.1.pdf

 



 Comments   
Comment by Oleksii Zagorskyi [ 2021 Jan 29 ]

Probably duplicates ZBXNEXT-247 and/or ZBXNEXT-248

Comment by Andris Zeila [ 2021 Apr 26 ]

Released ZBXNEXT-6478 in:

  • pre-5.4.0rc1 32fafbd5c4

Documentation updated:

General info

Installation

Server & web service:

Frontend

Comment by Dimitri Bellini [ 2021 Apr 27 ]

For this great function, do you have a plan to add "Download now" button other than schedule an email? 

Thanks so much

Comment by Brian van Baekel [ 2021 Apr 27 ]

Playing around with this, but it seems only the first page of a dashboard will be sent in the report, or am i missing some hidden option?

Comment by Andris Zeila [ 2021 Apr 27 ]

Yes, currently only the first page is captured and sent.

Comment by sbindley [ 2021 May 05 ]

Just downloaded 5.4 beta 3 and the test functionality is not working?
I have installed and configured Web Service, added URL to Zabbix Server conf and updated frontend URL in GUI.
I added a user and configured both email and email(html) for the user.
Configured email and email (html) media types and tested ok.

When trying Test on scheduled report i get "Report generating test failed. No media configured for the report recipients"

Comment by Andris Zeila [ 2021 May 06 ]

When testing the report is sent to the tester.

Comment by sbindley [ 2021 May 06 ]

Sorry I had not found the reports page in the documentation.
I've now configured everything correctly (including installed google-chrome on centos in the beta appliance). Test is working correctly now, however I'm receiving blank pdfs?
When I look a the dashboard I'm testing against there is data (from previous day) present. What can cause this?

Thanks..

Update, I got it to work, the URL param in frontend was incorrect.

Comment by Andris Zeila [ 2021 May 07 ]

If you are getting blank pdfs (and not pdfs with empty graphs or something), it means webservice is working, but exporting empty pdfs. First thing to check is if the frontend URL in administration/general/other. Is it correct and can it be accessed from the system where Zabbix web service is running. Also you can check if chrome print-to-pdf is working from command line: chrome --headless --print-to-pdf=<path> <url>

P.S.
Sorry, the message permissions were wrong.

Comment by Dimitri Bellini [ 2021 May 12 ]

Today i have tested the new 5.4.0rc1 but i still not able to test the PDF Report.

During the test of the PDF Report  and when i push the "test" button i receive a message like "Cannot connect to web service: couldn't connect to server" on the log i can see:

575867:20210512:162104.121 End of zbx_ipc_socket_read():SUCCEED
575867:20210512:162104.121 In rw_begin_report()
575867:20210512:162104.121 In rw_get_report() url:http://10.10.11.106/zabbix.php?action=dashboard.print&dashboardid=2&from=2021-05-11%2000%3A00%3A00&to=2021-05-12%2000%3A00%3A00 width:1920 height:992
575867:20210512:162104.121 End of rw_begin_report():FAIL report_size:0
575867:20210512:162104.121 failed to begin report dispatch: Cannot connect to web service: couldn't connect to server
575867:20210512:162104.121 zbx_setproctitle() title:'report writer #1 [reports started 0, sent 0, finished 0, idle 4862487702.722708 sec during 29.880991 sec]'
575867:20210512:162104.121 In zbx_ipc_socket_read()
575867:20210512:162104.121 End of zbx_ipc_socket_read():SUCCEED
575867:20210512:162104.121 In zbx_ipc_socket_read()
575867:20210512:162104.121 End of zbx_ipc_socket_read():SUCCEED
575867:20210512:162104.121 In rw_send_result() status:-1 error:Cannot connect to web service: couldn't connect to server
575867:20210512:162104.121 In zbx_ipc_socket_write()
575867:20210512:162104.121 End of zbx_ipc_socket_write():SUCCEED
575867:20210512:162104.121 End of rw_send_result()
575867:20210512:162104.122 In zbx_ipc_socket_read()

Someone have the same problem?
Thanks

Comment by Dimitri Bellini [ 2021 May 14 ]

Sorry after some digging and troubleshooting i have found the problem...
To use this new feature i need to install the package called "zabbix-web-service" modify the new file "/etc/zabbix/zabbix_web_service.conf" and finally start the service "zabbix-web-service".
After that i need to install "google-chrome" and now i was able to receive me PDF report on my email address. I have attach an example. test_2021-05-14_11-23.pdf

Comment by Luiz Sales [ 2021 May 17 ]

I am validating the report on the docker, but it returns the following error. all

all code error:

 Report generating test failed.

  • Cannot fetch data: chrome failed to start:
  • Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
  • [0517/031029.650231:FATAL:zygote_host_impl_linux.cc(190)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid).
  • #0 0x55a4f32b1fe9 base::debug::CollectStackTrace()
  • #1 0x55a4f321de56 base::debug::StackTrace::StackTrace()
  • #2 0x55a4f322f95c logging::LogMessage::~LogMessage()
  • #3 0x55a4f3230722 logging::LogMessage::~LogMessage()
  • #4 0x55a4f168704e content::ZygoteHostImpl::LaunchZygote()
  • #5 0x55a4f31ddd93 content::(anonymous namespace)::LaunchZygoteHelper()
  • #6 0x55a4f09cff78 content::ZygoteCommunication::Init()
  • #7 0x55a4f09d06e0 content::CreateGenericZygote()
  • #8 0x55a4f31dfd94 content::ContentMainRunnerImpl::Initialize()
  • #9 0x55a4f31dcbc3 content::RunContentProcess()
  • #10 0x55a4f31dd452 content::ContentMain()
  • #11 0x55a4f32126c6 headless::(anonymous namespace)::RunContentMain()
  • #12 0x55a4f32128c5 headless::HeadlessBrowserMain()
  • #13 0x55a4f32134f7 headless::HeadlessShellMain()
  • #14 0x55a4ef98f2d3 ChromeMain
  • #15 0x7f6723c9a7b3 __libc_start_main
  • #16 0x55a4ef98f15e _start
  • Received signal 6
  • #0 0x55a4f32b1fe9 base::debug::CollectStackTrace()
  • #1 0x55a4f321de56 base::debug::StackTrace::StackTrace()
  • #2 0x55a4f32b198a base::debug::(anonymous namespace)::StackDumpSignalHandler()
  • #3 0x55a4f32b1f7e base::debug::(anonymous namespace)::StackDumpSignalHandler()
  • #4 0x7f672a385b20 (/usr/lib64/libpthread-2.28.so+0x12b1f)
  • #5 0x7f6723cae7ff __GI_raise
  • #6 0x7f6723c98c35 __GI_abort
  • #7 0x55a4f32b1555 base::debug::BreakDebugger()
  • #8 0x55a4f3230195 logging::LogMessage::~LogMessage()
  • #9 0x55a4f3230722 logging::LogMessage::~LogMessage()
  • #10 0x55a4f168704e content::ZygoteHostImpl::LaunchZygote()
  • #11 0x55a4f31ddd93 content::(anonymous namespace)::LaunchZygoteHelper()
  • #12 0x55a4f09cff78 content::ZygoteCommunication::Init()
  • #13 0x55a4f09d06e0 content::CreateGenericZygote()
  • #14 0x55a4f31dfd94 content::ContentMainRunnerImpl::Initialize()
  • #15 0x55a4f31dcbc3 content::RunContentProcess()
  • #16 0x55a4f31dd452 content::ContentMain()
  • #17 0x55a4f32126c6 headless::(anonymous namespace)::RunContentMain()
  • #18 0x55a4f32128c5 headless::HeadlessBrowserMain()
  • #19 0x55a4f32134f7 headless::HeadlessShellMain()
  • #20 0x55a4ef98f2d3 ChromeMain
  • #21 0x7f6723c9a7b3 __libc_start_main
  • #22 0x55a4ef98f15e _start
  • r8: 0000000000000000 r9: 00007fffb6a2bf30 r10: 0000000000000008 r11: 0000000000000246
  • r12: 00007fffb6a2d220 r13: 00007fffb6a2d250 r14: 00007fffb6a2c240 r15: 00007fffb6a2d710
  • di: 0000000000000002 si: 00007fffb6a2bf30 bp: 00007fffb6a2c180 bx: 0000000000000006
  • dx: 0000000000000000 ax: 0000000000000000 cx: ffffffffffffffff sp: 00007fffb6a2bf30
  • ip: 00007f6723cae7ff efl: 0000000000000246 cgf: 0000000000000033 erf: 0000000000000004
  • trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000000
  • [end of stack trace]
  • Calling _exit(1). Core file will not be generated.

my docker-compose.yaml

zabbix-web-service:
image: zabbix/zabbix-web-service:centos-trunk
networks:

  • ZBX
    links:
  • zabbix-server
    restart: always
    ports:
  • '10053:10053'
    environment:
  • ZBX_ALLOWEDIP=zabbix-server
    depends_on:
  • mysql
Generated at Sun Apr 20 21:40:17 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.