Ad Widget

Collapse

Zabbix Dynamic PDF Report Generation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • selvakumaran
    Junior Member
    • Dec 2014
    • 22

    #301
    Zabbix Dynamic PDF Report Generation

    unable to understand the HOW TO steps. Kindly give proper step by step. especially point 4

    got below error

    Unable to login: Array ( [code] => -32602 [message] => Invalid params. [data] => Incorrect method "user.authenticate". )
    Last edited by selvakumaran; 28-03-2016, 13:02.

    Comment

    • suxxoi
      Junior Member
      • Mar 2016
      • 14

      #302
      Originally posted by selvakumaran
      unable to understand the HOW TO steps. Kindly give proper step by step. especially point 4

      got below error

      Unable to login: Array ( [code] => -32602 [message] => Invalid params. [data] => Incorrect method "user.authenticate". )
      change the file - ZabbixAPI.class.php

      Below is a link to the code

      http://pastebin.com/tweZ8mwT

      Comment

      • mickwu
        Junior Member
        • Jun 2016
        • 1

        #303
        Problem

        Hello All
        I am trying to create pdf reports with version 0.9.
        Zabbix version is:
        Zabbix 3.0.0 (16 February 2016)
        Red Hat 7.2
        I'm also having trouble. Below the Apache log.

        [Tue Jun 21 05:33:28.895903 2016] [:error] [pid 1671] [client 118.163.103.18:30470] PHP Warning: Creating default object from empty value in /var/www/html/report/inc/ZabbixAPI.class.php on line 122, referer: http://52.24.235.66/report/chooser.php
        [Tue Jun 21 05:33:29.386421 2016] [:error] [pid 1671] [client 118.163.103.18:30470] PHP Warning: fwrite(): 23 is not a valid stream resource in /var/www/html/report/inc/createpdf.functions.php on line 170, referer: http://52.24.235.66/report/chooser.php
        [Tue Jun 21 05:33:29.386447 2016] [:error] [pid 1671] [client 118.163.103.18:30470] PHP Warning: fwrite(): 23 is not a valid stream resource in /var/www/html/report/inc/createpdf.functions.php on line 173, referer: http://52.24.235.66/report/chooser.php
        [Tue Jun 21 05:33:29.386452 2016] [:error] [pid 1671] [client 118.163.103.18:30470] PHP Warning: fclose(): 23 is not a valid stream resource in /var/www/html/report/inc/createpdf.functions.php on line 174, referer: http://52.24.235.66/report/chooser.php


        [Tue Jun 21 06:17:42.938392 2016] [:error] [pid 1791] [client 10.0.2.10:48828] script '/var/www/html/zabbixindex.php' not found or unable to stat
        [Tue Jun 21 06:17:42.938593 2016] [:error] [pid 1791] [client 10.0.2.10:48828] script '/var/www/html/zabbixchart2.php' not found or unable to stat

        Below is the information from config.inc.php

        $user_login=0; // If $user_login is 0, use credentials below and don't prompt for login.
        $allow_localhost=1; // If a request is made from 127.0.0.1, use credentials below in createpdf.php

        $version = '0.9';

        // What items would you like to see in the report? Things that do not match are excluded automatically.
        $items = array('system information'=>'string','uptime'=>'seconds', 'boot time'=>'datetime', 'available memory'=>'number', 'version of zabbix_agent'=>'string', 'services'=>'string', 'update'=>'number','certificate'=>'string','advanc ed ntp'=>'string');

        # zabbix server info(user must have API access)
        $z_server = 'http://XXXX/zabbix';
        $z_user = 'Admin';
        $z_pass = 'Admin';
        # Temporary directory for storing pdf data and graphs - must exist
        $z_tmp_path = './tmp';
        # Directory for storing PDF reports
        $pdf_report_dir = './reports';
        # Root URL to reports
        #$pdf_report_url = $z_server ."report/reports";
        $pdf_report_url = "/report/reports";
        # paper settings
        $paper_format = 'A4'; // formats supported: 4A0, 2A0, A0 -> A10, B0 -> B10, C0 -> C10, RA0 -> RA4, SRA0 -> SRA4, LETTER, LEGAL, EXECUTIVE, FOLIO
        $paper_orientation = 'portrait'; // formats supported: portrait / landscape
        # time zone - see http://php.net/manual/en/timezones.php
        $timezone = 'Asia/Taipei';
        # Logo used in PDF - may be empty
        # TODO: Specify image size!
        $pdf_logo = './images/general/zabbix.png';
        $company_name = 'company';

        //DO NOT CHANGE BELOW THIS LINE
        $z_tmp_cookies = "/tmp/";
        $z_url_index = $z_server ."index.php";
        $z_url_graph = $z_server ."chart2.php";
        $z_url_api = $z_server ."api_jsonrpc.php";
        $z_login_data = "name=" .$z_user ."&password=" .$z_pass ."&autologin=1&enter=Sign+in";

        please Can help me ?
        Thank you

        Comment

        • rsamorim
          Junior Member
          • Aug 2016
          • 1

          #304
          Unable to login: Array ( [code] => -32602 [message] => Invalid params. [data] => Inc

          Originally posted by suxxoi
          change the file - ZabbixAPI.class.php

          Below is a link to the code

          http://pastebin.com/tweZ8mwT
          I'm still having the same issue after changing ZabbixAPI.class.php.

          Any thoughts what is generating this issue?

          Comment

          • selvakumaran
            Junior Member
            • Dec 2014
            • 22

            #305
            Zabbix Dynamic PDF Report Generation

            Hi,
            i have attached the file. Please use it. this file is working fine. i am using zabbix 3.0.4

            Regards,
            Selvakumaran
            Attached Files

            Comment

            • varunmanik
              Junior Member
              • Aug 2016
              • 8

              #306
              Hi Guys,

              I am using Zabbix 3.0.
              Do you have any idea about pdf generator for this version.
              Looking forward to hear from you.
              Thanks in advance.

              Thanks
              Varun Manik

              Comment

              • varunmanik
                Junior Member
                • Aug 2016
                • 8

                #307
                Hi
                As I am very new to zabbix, and I am using zabbox 3.0 for my production and all graph are collecting data from AWS cloudwatch (Low Level Discovery) without installing agent.
                Now I need to genrate pdf report, I used your code but it is not working with Zabbix 3.0.

                Please help
                Thanks in Advance


                Thanks
                Varun Manik

                Comment

                • system.schraube
                  Junior Member
                  • Aug 2016
                  • 24

                  #308
                  I think we need a new package for Zabbix 3. I also don't know which version with whitch patch works at the moment.

                  Comment

                  • sancho
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Mar 2015
                    • 295

                    #309
                    Originally posted by system.schraube
                    I think we need a new package for Zabbix 3. I also don't know which version with whitch patch works at the moment.
                    Hi, I'm with the "Monitoring Dynamic Report v0.9" version, zabbix 3.0.4 and works well.
                    Last edited by sancho; 26-08-2016, 20:29.

                    Comment

                    • sancho
                      Senior Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Mar 2015
                      • 295

                      #310
                      Originally posted by sancho
                      Hi, I'm with the "Monitoring Dynamic Report v0.9" version, zabbix 3.0.4 and works well.
                      Sorry, I was wrong, it works for me because I have the frontend of the previous version.

                      Comment

                      • martinm_76
                        Member
                        • Mar 2015
                        • 57

                        #311
                        Missing slash

                        Originally posted by mickwu
                        Hello All
                        I am trying to create pdf reports with version 0.9.
                        Zabbix version is:
                        Zabbix 3.0.0 (16 February 2016)
                        Red Hat 7.2
                        I'm also having trouble. Below the Apache log.




                        Below is the information from config.inc.php




                        please Can help me ?
                        Thank you
                        Hi there.

                        You are missing the trailing slash in $z_server, which makes your paths invalid later on. It may not be enough, but it should get your further.

                        I am able to generate reports without graphs at least. I'll try one with graphs and see what happens.

                        /MMO

                        Comment

                        • martinm_76
                          Member
                          • Mar 2015
                          • 57

                          #312
                          PDF report, Zabbix 3.0 and graphs - no issue?

                          Hi everyone.

                          I have tried to generate a report for 1 day with all options checked, and I get a report with graphs and all, so those of you that have issues, could you please look in config.inc.php and make sure you have an ending slash (/) in $z_server and necessary rights om the tmp folder set in config.inc.php?

                          If that is the case and you still have issues, what is the end result for you, what does the log say?

                          /MMO

                          Comment

                          • byak
                            Junior Member
                            • Sep 2016
                            • 15

                            #313
                            Hi everyone,

                            I got everything working with the PDF generation.

                            However i was wondering if it is possible to select only one specific graph to be displayed in the PDF ?

                            Thank you

                            Comment

                            • martinm_76
                              Member
                              • Mar 2015
                              • 57

                              #314
                              Originally posted by byak
                              Hi everyone,

                              I got everything working with the PDF generation.

                              However i was wondering if it is possible to select only one specific graph to be displayed in the PDF ?

                              Thank you
                              Hi byak.

                              I have just updated the report with trends and rudimentary graph-selector (regex match in config.inc.php). For now that is the best I can do.

                              Download version 0.9.4 and give it a whirl.

                              Comment

                              • byak
                                Junior Member
                                • Sep 2016
                                • 15

                                #315
                                Originally posted by martinm_76
                                Hi byak.

                                I have just updated the report with trends and rudimentary graph-selector (regex match in config.inc.php). For now that is the best I can do.

                                Download version 0.9.4 and give it a whirl.
                                Hello martinm !

                                Thank you for your answer. I might seem a bit lost here, but where can i download your report ?

                                Comment

                                Working...