Ad Widget

Collapse

Zabbix Dynamic PDF Report Generation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 5song
    Junior Member
    • Apr 2021
    • 1

    #451
    martinm_76 Is the PDF generation supposed to work under docker container zabbix-web-nginx-mysql with nginx not Apache? If yes, could you please advise setup procedure? Is there any difference with setup for no container environment? My setup is Ubuntu 20.04, Zabbix 5.0.2. Thanks.

    Comment


    • martinm_76
      martinm_76 commented
      Editing a comment
      I can't really say, I have not tried. My only experience thus far is with Apache. It should work with other webservers, but might require extra configuration. If other PHP stuff works fine, I would expect it to be a matter of having the proper modules available in php and possibly some tweaks to the default php config.
  • Hans.zhang
    Junior Member
    • May 2021
    • 1

    #452
    Hello,

    My setup is centos7.2.1511,nginx/1.16.1,PHP 5.6.32

    Pdf file generated, available for download, but no graphs in it.

    This is the error message:
    [error] 4990#0: *7299 FastCGI sent in stderr: "PHP message: PHP Warning: Creating default object from empty value in /usr/share/zabbix-pdf-report/inc/ZabbixAPI.class.php on line 123" while reading response header from upstream, client: x.x.x.x, server: mnt.1cloudtech.com, request: "POST / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxx.com:8200", referrer: "http://xxx.com:8200/"

    [error] 4990#0: *7390 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 0 in /usr/share/zabbix/include/classes/api/services/CTrend.php on line 145" while reading response header from upstream, client: x.x.x.x, server: xxx.com, request: "POST /api_jsonrpc.php HTTP/1.1", upstream: "fastcgi://unix:/var/opt/rh/rh-php72/run/php-fpm/zabbix.sock:", host: "xxx.com"

    Thanks

    Comment


    • martinm_76
      martinm_76 commented
      Editing a comment
      I don't know if there are issues with using nginx instead of Apache, but if so, I would expect them to be minor. I see some people mention having the host listed in /etc/hosts could be helpful. Normally it should be anyway, but sometimes you might call it with a different name that the actual host or similar... If that doesn't fix it, maybe create a bug on github so we can try to trace it.
  • gopkris2000
    Junior Member
    • Feb 2020
    • 15

    #453
    I have the same Unable to login: issue. I did the same steps mentioned in the document but getting the errors.

    Can you please give some suggestions to fix it?

    [root@zabbix-engops httpd]# php -v
    PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

    Zabbix Version : Zabbix 5.0.1. © 2001–2020, Zabbix SIA




    Comment


    • Larcen
      Larcen commented
      Editing a comment
      Hi,

      For those with the "Unable to login" issue, in my case it was only the server can not resolve the DNS name of the Apache's Virtualhost Servername. I included the name in /etc/hosts file and the problem was gone.

      Best regads,
  • Larcen
    Junior Member
    • Sep 2021
    • 1

    #454
    Hi everybody,

    Thank you very much for this plugin. It is very useful as a reporting tool. Great work and thanks for sharing. I got it working (v1.2.4) with Zabbix 4.0.4 LTS on a Debian 10.

    One question: is there a way to change the Zabbix image logo in the report? I can obviously enable/disable it, but I tried to change the image with no success. Even replacing the original image for another one with exact same size (pixels), the image on the report simply dissapears. Any restrictions with the size of the image (Kb)?

    Thank you very much and best regards.

    Comment

    • Amit1606
      Junior Member
      • Oct 2021
      • 1

      #455
      Hello Everyone,

      I have installed zabbix 5.4 with zabbix webservice on centos 8 and no doubt it is working fine.

      I want to generate report in PDF format so that I have configure the zabbix dynamic pdf generator. It creates the report but I found that there is no data in generated graph.

      I am trying to find out that what's the problem behind it? How can I resolve that issue?

      Any help will be appreciated.Click image for larger version

Name:	graph.PNG
Views:	2536
Size:	51.6 KB
ID:	432910

      Comment


      • martinm_76
        martinm_76 commented
        Editing a comment
        When you ask for the exact same data in Zabbix, is there a graph? As far as I can tell, for most things, Zabbix only keeps 7 days of history by default and once those are gone, all that is left is trends. Was this within the last 7 days? Basically, Zabbix is creating the graph and if data is shown in Zabbix it should also be in the report, if all required modules and stuff are available. If you enable debug is there any further information?
    • lptarik
      Member
      • Oct 2021
      • 33

      #456
      Originally posted by Amit1606
      Hello Everyone,

      I have installed zabbix 5.4 with zabbix webservice on centos 8 and no doubt it is working fine.

      I want to generate report in PDF format so that I have configure the zabbix dynamic pdf generator. It creates the report but I found that there is no data in generated graph.

      I am trying to find out that what's the problem behind it? How can I resolve that issue?

      Any help will be appreciated.Click image for larger version

Name:	graph.PNG
Views:	2536
Size:	51.6 KB
ID:	432910
      Same issue here. Graphs are empty

      Comment

      • LupusFlex
        Junior Member
        • Dec 2021
        • 2

        #457
        Hi, I have Zaxxix 6.0 Alpha and it doesn't seem to work - whatever credentials I use, report generator always says 'unable to login'. Probably a Zabbix version issue?

        Comment


        • gofree
          gofree commented
          Editing a comment
          alpha is alpha, could be highly unstable
      • cojeda
        Junior Member
        • Apr 2022
        • 2

        #458
        chcon: can't apply partial context to unlabeled file ‘zabbix-server.pdf’ solution please

        Comment

        • cojeda
          Junior Member
          • Apr 2022
          • 2

          #459
          no graphics solutions please

          Comment

          • soumya
            Junior Member
            • Nov 2013
            • 21

            #460
            inzabbix v6.0, groups are not reflecting in search though access has already been there for user & is visible on zabbix console

            Comment


            • Jobin Joseph
              Jobin Joseph commented
              Editing a comment
              The API validation was added to Zabbix 6.0 and above in /usr/share/zabbix/include/classes/api/services/CHostGroup.php
              so kindly remove the following parameter in /usr/share/zabbix/zabbix-pdf-report-master/chooser.php

              please remove the two parameter 'real_hosts'=>'1','with_graphs'=>'1'

              $host_groups = ZabbixAPI::fetch_array('hostgroup','get', array('output'=>array('groupid','name'),'real_host s'=>'1','with_graphs'=>'1','sortfield'=>'name') )
              or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));

              please remove the two parameter 'real_hosts'=>'1','with_graphs'=>'1'

              $host_groups = ZabbixAPI::fetch_array('hostgroup','get', array('output'=>array('groupid','name'),'sortfield '=>'name') )
              or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));

              otherwise commend the validation line in /usr/share/zabbix/include/classes/api/services/CHostGroup.php
              /*

              self::exception(ZBX_API_ERROR_PARAMETERS, $error);


              */
          • soumya
            Junior Member
            • Nov 2013
            • 21

            #461
            this issue seems because of graph available on the host groups... fixed the same.

            Comment

            • bab
              Senior Member
              • Aug 2020
              • 176

              #462
              Is that possible use this method on zabbix6 to generate pdf report ?

              Comment

              • bab
                Senior Member
                • Aug 2020
                • 176

                #463
                I did all steps on zabbix6 finally when login I could not login with succeed

                Comment

                • Bhupender
                  Junior Member
                  • Jun 2022
                  • 1

                  #464
                  Hi All,


                  I am using Zabbix 6.2 in RHEL 8.6.
                  I am trying to generate a monthly average CPU Utilization report from Zabbix. I have followed this post: https://www.zabbix.com/forum/zabbix-...7177#post40717. but when I try to generate a report
                  but it shows blanks
                  , So please assist me how can I generate a monthly average CPU Utilization report. Although, it did not shows any HOST GROUP.



                  I really appreciate any help you can provide.

                  Comment


                  • Jobin Joseph
                    Jobin Joseph commented
                    Editing a comment
                    The API validation was added to Zabbix 6.0 and above in /usr/share/zabbix/include/classes/api/services/CHostGroup.php
                    so kindly remove the following parameter in /usr/share/zabbix/zabbix-pdf-report-master/chooser.php



                    $host_groups = ZabbixAPI::fetch_array('hostgroup','get', array('output'=>array('groupid','name'),'real_host s'=>'1','with_graphs'=>'1','sortfield'=>'name') )
                    or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));

                    please remove the two parameter 'real_hosts'=>'1','with_graphs'=>'1'

                    $host_groups = ZabbixAPI::fetch_array('hostgroup','get', array('output'=>array('groupid','name'),'sortfield '=>'name') )
                    or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));

                    otherwise commend the validation line in /usr/share/zabbix/include/classes/api/services/CHostGroup.php
                    /*

                    self::exception(ZBX_API_ERROR_PARAMETERS, $error);


                    */
                • bab
                  Senior Member
                  • Aug 2020
                  • 176

                  #465
                  Did anyone use this for zabbix 6 ? which instruction is correct for install on zabbix6?

                  Comment

                  Working...