Ad Widget

Collapse

Zabbix Dynamic PDF Report Generation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mohitvermaji51
    Junior Member
    • Jan 2021
    • 1

    #436
    Reports generation is the process of using a tool for creating reports primarily for business users. To generate a report, you need to create a report definition, including what data to retrieve, where to get it, and how to display it. mybk-experience.onl mc-d.uno
    Last edited by Mohitvermaji51; 13-01-2021, 14:10.

    Comment

    • sajid4uu2c
      Junior Member
      • Oct 2020
      • 24

      #437
      Hi, I have used this script and it works perfectly.

      I would like to know where I can increase the timeout value in the script. I have infra of about 200 servers in one hostgroup.
      When I try to generate the report it is throwing me gateway timeout error. So I am splitting my hosts into smaller groups then generating as a work around. Could you please let me know how to increase timeout I tried to increase max_execution and memory size in php.ini but it did not help

      Comment


      • martinm_76
        martinm_76 commented
        Editing a comment
        Could you try running it with debugging enabled so there's actually some traffic while the report is being generated? You will need to then fetch the actual report (if it completes) from the link at the end of the debug information, though.
        You would simply add '&debug=on' to the end of the URL. You could also try and add these:
        php_value[max_execution_time] = 3000
        php_value[memory_limit] = 2G

        In /etc/php-fpm.d/www.conf, is your setup equals mine. I'm not sure which pool the report would be in.

      • sajid4uu2c
        sajid4uu2c commented
        Editing a comment
        Hi martinm_76 , I have enabled the debug mode and the reporting this time for the same set of servers for duration of one week was faster. From the end of the debug report, when I clicked on the PDF report path it was fully generated with all the metrics.

        The php settings used were
        php_value[max_execution_time] = 3000
        php_value[memory_limit] = 2G

        Thanks a lot

      • martinm_76
        martinm_76 commented
        Editing a comment
        Glad it worked out :-)
    • Evgeniy_91
      Junior Member
      • Jan 2021
      • 1

      #438
      Hello,
      thanks for this PDF creation tool.
      Will this work with zabbix 5.2?

      Comment


      • martinm_76
        martinm_76 commented
        Editing a comment
        I expect so, but I have not yet tried. Unless they have made large changes to the API, it should work.

      • martinm_76
        martinm_76 commented
        Editing a comment
        Scratch that. I am actually on 5.2 in my test environment and it works fine for me
    • rizkysyahrian
      Junior Member
      • Jan 2021
      • 6

      #439
      my friend already fixed this.
      but the graph and pdf cannot generate

      Attached Files

      Comment


      • martinm_76
        martinm_76 commented
        Editing a comment
        I am missing some context here. Are you sure the reports and tmp directories are writable? Hav you run ./fixrights.sh?

      • rizkysyahrian
        rizkysyahrian commented
        Editing a comment
        i've tried rerun it.
        but still no content were made.

      • martinm_76
        martinm_76 commented
        Editing a comment
        It the webinterface working fine, only the report part is not producing a repport?

        What distribution are you running? What version?
        Which webserver are you running? What version?
        Are the PHP-modules mentioned in the README installed?
        Have you checked the error log? For Apache, usually /var/log/httpd/error.log or something close to that.
        Have you tried to enable debugging?

        Output of:
        lsb_release -a
        ls -lZ <your zabbix-pdf-report directory>
    • rizkysyahrian
      Junior Member
      • Jan 2021
      • 6

      #440
      when trying with other browser
      Attached Files

      Comment


      • martinm_76
        martinm_76 commented
        Editing a comment
        Okay, clearly there's a configuration problem somewhere. 500 is Internal Server Error and probably either a spelling mistake/syntax error or missing component. Look in the error log.

      • martinm_76
        martinm_76 commented
        Editing a comment
        Okay, clearly there's a configuration problem somewhere. 500 is Internal Server Error and probably either a spelling mistake/syntax error or missing component. Look in the error log.
    • rizkysyahrian
      Junior Member
      • Jan 2021
      • 6

      #441
      When Checking the log i found
      Code:
       PHP Fatal error: Uncaught Error: Call to undefined function iconv() in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php:1263\nStack trace:\n#0 /usr/share/zabbix/zabbix-pdf-report/createpdf.php(258): Cezpdf->ezText('PT. SSE Zabbix ...', 33, Array)\n#1 {main}\n thrown in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1263, referer: http://192.168.1.2/zabbix-pdf-report/chooser.php

      Comment


      • martinm_76
        martinm_76 commented
        Editing a comment
        Okay, so your distribution does not have Iconv in the base PHP package and you need to install it. Likely something like 'yum install php-iconv' or 'apt-get install php-iconv' - a version could be included. Check your current packages.

      • tainguyen
        tainguyen commented
        Editing a comment
        Hi @martinm_76,
        Please help me fix this error.
        PHP Fatal error: Uncaught Error: Call to undefined function get_magic_quote_quotes_runtime() in /usr/share/zabbix/zabbix-pdf-report/inc/class.pdf.php:2640\nStack trace:\n#0 /usr/share/zabbix/zabbix-pdf-report/createpdf.php(282): Cpdf->addf->addPngFromFile()\n#1 {main}\n thrown in /usr/share/zabbix/zabbix-pdf-report/inc/class.pdf.php on line 2640, referer: http://192.168.9.111/zabbix/zabbix-p...rt/chooser.php
    • Aslmafarook
      Junior Member
      • Feb 2019
      • 5

      #442
      Hi Team,

      I am also facing the same issue like https://www.zabbix.com/forum/zabbix-...237#post416237

      after selecting host i am facing this curl page.

      I am using new code only from https://github.com/martinm76/zabbix-pdf-report.
      martinm_76 please help me on this

      Click image for larger version

Name:	zabbix-reports-.png
Views:	2090
Size:	717.5 KB
ID:	418390
      Attached Files

      Comment


      • martinm_76
        martinm_76 commented
        Editing a comment
        Update config.inc.php and set version to 5.0. I think something changed even in the 4.4 series some time before 4.4.10, so even if still om 4.x, try saying 5.0
    • rizkysyahrian
      Junior Member
      • Jan 2021
      • 6

      #443
      martinm_76 thanks a lot.. now it show pdf output.

      but seems like the graph not showing, well its okat..

      but i want to ask something. it possible to print just the data in inventory?

      Comment

    • Aslmafarook
      Junior Member
      • Feb 2019
      • 5

      #444
      martinm_76 thank you for your response issue fixed

      Comment

      • zeeshany
        Junior Member
        • Jul 2020
        • 7

        #445
        Hello,

        Firstly, thanks very much for this amazing tool!! and appreciate @Pavlik for putting the step wise instructions.

        I have a query, if we want to get the Availability Report in the pdf how can we do that? I tried putting Availability between # but it doesn't get the pdf of that. Has anyone tried it and got it successful?

        Thanks

        Comment

        • zeeshany
          Junior Member
          • Jul 2020
          • 7

          #446
          Hello,

          sorry if this has been asked before, I tried going through past pages and couldn't find related answer.
          Is it possible to include specific item of choice under trend and metrics?

          Thanks
          Regards

          Comment

          • rizkysyahrian
            Junior Member
            • Jan 2021
            • 6

            #447
            seems like i got some isue again.

            Click image for larger version

Name:	sda.jpg
Views:	1887
Size:	103.2 KB
ID:	420198

            But when i check log i didnot find anny error.

            Comment

            • dmitryIT42
              Junior Member
              • Mar 2021
              • 29

              #448
              Hi.
              Does not show all groups, and does not display. Zabbix 5.2 ubuntu 20.04.
              pdf forms

              Comment

              • gofree
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2017
                • 400

                #449
                watch closely zabbix 5.4



                Comment

                • dex742
                  Junior Member
                  • Nov 2020
                  • 1

                  #450
                  one more time: need F1 with zabbix pdf report tool
                  environment: centOS 8, zabbix 5.0.3, php 7.2.24
                  In /var/log/php-fpm/www-error.log I have:
                  Code:
                  PHP Notice: getimagesize(): Read error! in /usr/share/zabbix-pdf-report/inc/class.ezpdf.php on line 1320
                  PHP modules:
                  Code:
                  [root@zabbix php-fpm]# php-fpm -m
                  [PHP Modules]
                  bcmath
                  bz2
                  calendar
                  cgi-fcgi
                  Core
                  ctype
                  curl
                  date
                  dom
                  exif
                  fileinfo
                  filter
                  ftp
                  gd
                  gettext
                  hash
                  iconv
                  json
                  ldap
                  libxml
                  mbstring
                  openssl
                  pcre
                  PDO
                  pdo_pgsql
                  pdo_sqlite
                  pgsql
                  Phar
                  Reflection
                  session
                  SimpleXML
                  sockets
                  SPL
                  sqlite3
                  standard
                  tokenizer
                  wddx
                  xml
                  xmlreader
                  xmlwriter
                  xsl
                  zlib
                  
                  [Zend Modules]
                  Pdf file generated, available for download, but no graphs in it.
                  Last edited by dex742; 22-04-2021, 22:28.

                  Comment

                  Working...