Ad Widget

Collapse

Zabbix Dynamic PDF Report Generation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Axilla
    Senior Member
    • Aug 2010
    • 130

    #16
    in config.inc.php for your z_server url it needs to be the actual IP address or domain name, not localhost.

    The user you are using in that config file as well needs to have API access.

    Comment

    • Axilla
      Senior Member
      • Aug 2010
      • 130

      #17
      # added example report to original post.

      Comment

      • efrain02
        Banned
        • Apr 2011
        • 81

        #18
        Well.. i just put localhost in order to hide my IP. The user now has API access, so now i can see my hosts (which previously can't) but now more code appears, but at the same time I'm getting closer...

        Comment

        • Axilla
          Senior Member
          • Aug 2010
          • 130

          #19
          Originally posted by efrain02
          Well.. i just put localhost in order to hide my IP. The user now has API access, so now i can see my hosts (which previously can't) but now more code appears, but at the same time I'm getting closer...
          Please post what you see so I can look into it and figure it out for you

          Comment

          • Frytrix
            Junior Member
            • Feb 2012
            • 3

            #20
            Hi,

            first of all thanks for your help yesterday.
            CURL and json wasn't installed on the system.

            Now i can select my Hosts and time period.
            By pressing the button "Generate" something happens and i've been forwarded to another page. But i didn't get a pdf.

            the File attached is what i get.
            Attached Files

            Comment

            • Axilla
              Senior Member
              • Aug 2010
              • 130

              #21
              Originally posted by Frytrix
              Hi,

              first of all thanks for your help yesterday.
              CURL and json wasn't installed on the system.

              Now i can select my Hosts and time period.
              By pressing the button "Generate" something happens and i've been forwarded to another page. But i didn't get a pdf.

              the File attached is what i get.
              Yes, that's the generation page, that page will forward you to the pdf, so it looks like you're possibly missing more php modules.. here is a list of everything I have installed.

              bcmath, bz2, calendar, core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, json, libxml, mbstring, mysql, mysqli, openssl, pcre, pdo, phar, Reflection, session, shmop, snmp, sockets, tokeneizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib

              these modules are obviously not all used in this project, but they will help you out, and prevent you going forward from running into these types of issues

              start there, and let me know we'll get it working, several people on irc have gotten it working, so it's just something you're missing... Thanks for sticking with me and giving it a try. The more users the better, because i'll be honest I'm kind of a rookie coder and just bashing my way through and learning as I go.

              you can easily check whats installed by creating a .php page and putting the following code in it

              <? php
              phpinfo();
              ?>
              Last edited by Axilla; 09-02-2012, 15:46.

              Comment

              • Frytrix
                Junior Member
                • Feb 2012
                • 3

                #22
                Hi,

                I had changed the possition of "header(location...)" at the generatereport.php

                when this line is above the

                //fetch graph Data host

                i get a pdf (without graphs). but is the header line below this i didn't get the pdf. I have 2 PCs with 11 Graphs monitored. and 11 pictures are stored in the tmp_images folder.

                Comment

                • Axilla
                  Senior Member
                  • Aug 2010
                  • 130

                  #23
                  Originally posted by Frytrix
                  Hi,

                  I had changed the possition of "header(location...)" at the generatereport.php

                  when this line is above the

                  //fetch graph Data host

                  i get a pdf (without graphs). but is the header line below this i didn't get the pdf. I have 2 PCs with 11 Graphs monitored. and 11 pictures are stored in the tmp_images folder.
                  if you open the images are the graphs you expect them to be or are they blank? If so, open data.txt and make sure you see something in it like

                  1<Introduction>
                  #NP
                  2<graphs>
                  [/path/to/img.png]

                  if you don't make sure permissions on data.txt are correct.. You're almost there

                  Comment

                  • Frytrix
                    Junior Member
                    • Feb 2012
                    • 3

                    #24
                    yes, pictures are OK.

                    data.txt looks also good. Path is OK and if i open the pdf.php directly in my browser i get a pdf with all my graphs.

                    So it looks like the only the redirect to pdf.php didn't work probably because of an error occourd before.

                    Comment

                    • Axilla
                      Senior Member
                      • Aug 2010
                      • 130

                      #25
                      Originally posted by Frytrix
                      yes, pictures are OK.

                      data.txt looks also good. Path is OK and if i open the pdf.php directly in my browser i get a pdf with all my graphs.

                      So it looks like the only the redirect to pdf.php didn't work probably because of an error occourd before.
                      great so it sounds like its just an issue with your config a bit.. if you can PM me a copy of your config.inc.php i will take a look and figure out where its messed up. you probably just have an extra or missiong leading or trailing /

                      just change your password

                      Comment

                      • zabbixflic
                        Member
                        • Jan 2012
                        • 39

                        #26
                        Hi guys,

                        I installed it but maybe I don't understand how to use it.

                        Once I finished follow "how to" instruction, how can I get back pdf report
                        starting from my custom graphs ?

                        Looking to screens I see the first written into procedure, it appears like a pdf with header footer and date but no graphs inside, and second one with no data inside.

                        What is missing ? Where can I find "generate" button ?

                        Many thanks

                        F.

                        Comment

                        • Axilla
                          Senior Member
                          • Aug 2010
                          • 130

                          #27
                          Originally posted by zabbixflic
                          Hi guys,

                          I installed it but maybe I don't understand how to use it.

                          Once I finished follow "how to" instruction, how can I get back pdf report
                          starting from my custom graphs ?

                          Looking to screens I see the first written into procedure, it appears like a pdf with header footer and date but no graphs inside, and second one with no data inside.

                          What is missing ? Where can I find "generate" button ?

                          Many thanks

                          F.

                          you're adding the wrong page to your screen it sounds like.. you should add pdfform.php to your screen.. NOT pdf.php

                          Comment

                          • zabbixflic
                            Member
                            • Jan 2012
                            • 39

                            #28
                            Originally posted by Axilla
                            you're adding the wrong page to your screen it sounds like.. you should add pdfform.php to your screen.. NOT pdf.php
                            Now, loading screen in monitoring or configuration view I see a blank page.



                            Thanks

                            f.
                            Attached Files

                            Comment

                            • Axilla
                              Senior Member
                              • Aug 2010
                              • 130

                              #29
                              Originally posted by zabbixflic
                              Now, loading screen in monitoring or configuration view I see a blank page.



                              Thanks

                              f.
                              does the user in your config.inc.php have proper API access? Turn on error_reporting and see what you see if not. Paste here, we'll get it working.

                              Comment

                              • zabbixflic
                                Member
                                • Jan 2012
                                • 39

                                #30
                                Originally posted by Axilla
                                does the user in your config.inc.php have proper API access? Turn on error_reporting and see what you see if not. Paste here, we'll get it working.
                                ok, tomorrow morning I will check out,
                                now I am out of office

                                many thanks

                                f.

                                Comment

                                Working...