Ad Widget

Collapse

Zabbix Dynamic PDF Report Generation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kofeyh
    Junior Member
    • Jun 2010
    • 17

    #46
    Is it possible to update the list of hosts to include host groups?

    Right now we can select 1 device for the form, or ALL devices. Being able to select a specific host group would be very welcome.

    Comment

    • Axilla
      Senior Member
      • Aug 2010
      • 130

      #47
      sure, I will work on this when I have free time. I can't promise when, but I'll get to it.

      Comment

      • Axilla
        Senior Member
        • Aug 2010
        • 130

        #48
        maybe I will try and get the code on a version control like svn or git so that others can also work on this easier.

        Comment

        • ArcAngel
          Junior Member
          • Mar 2012
          • 3

          #49
          Unable to login

          I use zabbix 1.8.5 on https, when the screen is created (and proper login values in config.inc.php) i get "Unable to login"

          Is this because of https?

          Comment

          • Axilla
            Senior Member
            • Aug 2010
            • 130

            #50
            Originally posted by ArcAngel
            I use zabbix 1.8.5 on https, when the screen is created (and proper login values in config.inc.php) i get "Unable to login"

            Is this because of https?
            I use https as well, but i changed the config.inc.php to use HTTP since the majority of people use it.. change any instance of http to https and try again

            Comment

            • ArcAngel
              Junior Member
              • Mar 2012
              • 3

              #51
              Unable to login

              Originally posted by Axilla
              I use https as well, but i changed the config.inc.php to use HTTP since the majority of people use it.. change any instance of http to https and try again
              Hi Axilla,

              I changed it to https and still get Unable to login.

              When i use same login details directly, it works.

              Comment

              • Axilla
                Senior Member
                • Aug 2010
                • 130

                #52
                Originally posted by ArcAngel
                Hi Axilla,

                I changed it to https and still get Unable to login.
                Does the user you're trying to use have API access?

                Comment

                • ArcAngel
                  Junior Member
                  • Mar 2012
                  • 3

                  #53
                  Originally posted by Axilla
                  Does the user you're trying to use have API access?
                  I enabled that now and still get the same

                  is there some way to debug this via php or zabbix?

                  I got debug info now,

                  CURL URL: https://secret.url/zabbix/api_jsonrpc.php
                  CURL Options: Array ( [19913] => 1 [13] => 30 [78] => 5 [81] => [64] => [52] => 1 [74] => 1 [10023] => Array ( [0] => Content-Type: application/json-rpc [1] => User-Agent: ZabbixAPI v1.0 - http://andrewfarley.com/zabbix_php_api ) [10036] => POST [10015] => {"auth":null,"method":"user.authenticate","id":1," params":{"password":"*VERYSECRET*","user":"admin"} ,"jsonrpc":"2.0"} [10102] => gzip ) Got response from API: () Response decoded: ( __login() Got response from API: () Unable to login:

                  But it does not show anything going wrong really.
                  Last edited by ArcAngel; 26-03-2012, 14:44.

                  Comment

                  • tiagosoares
                    Member
                    Zabbix Certified Specialist
                    • Jul 2010
                    • 35

                    #54
                    Hey guys!


                    Some times when I access the screen I got this error: Unable to login:

                    But I just do a refresh (F5) and some times I was able to select the host and time period, but when I generate the pdf o got:

                    Host: CDTS-Afrodite
                    Time Period: Hour

                    Unable to login:


                    My user have API access...

                    Any help?

                    Comment

                    • kofeyh
                      Junior Member
                      • Jun 2010
                      • 17

                      #55
                      If you use HTTP based authentication, such as SQL or LDAP, the reports will fail to log into the API; you can test if that's the problem by opening the URI for the reports page directly.

                      In the install I look after, we have HTTP auth set, using LDAP, so it will always fail to log in unless accessing the report page directly, first.

                      This scenario may need to be considered by the developer.

                      Comment

                      • vlam
                        Senior Member
                        Zabbix Certified Specialist
                        • Jun 2009
                        • 166

                        #56
                        Help

                        My User have API access , in php.ini = Display_errors = OFF , and I can see all of my hosts but when I run a report it comes back as follow (extract only, IP, User, Password has been changed):

                        Host: ZABBDB02
                        Time Period: Week

                        CURL URL: http://zabbix.url/zabbix/api_jsonrpc.php
                        CURL Options: Array ( [19913] => 1 [13] => 30 [78] => 5 [81] => [64] => [52] => 1 [74] => 1 [10023] => Array ( [0] => Content-Type: application/json-rpc [1] => User-Agent: ZabbixAPI v1.0 - http://andrewfarley.com/zabbix_php_api ) [10036] => POST [10015] => {"auth":null,"method":"user.authenticate","id":1," params":{"password":"password","user":"user"},"jso nrpc":"2.0"} [10102] => gzip ) Got response from API: ({"jsonrpc":"2.0","result":"0a36dc4451319cc7300237 61fa23acad","id":1}) Response decoded: (Array ( [jsonrpc] => 2.0 [result] => 0a36dc4451319cc730023761fa23acad [id] => 1 ) __login() Got response from API: (0a36dc4451319cc730023761fa23acad) CURL URL: http://10.31.13.23/zabbix/api_jsonrpc.php
                        CURL Options: Array ( [19913] => 1 [13] => 30 [78] => 5 [81] => [64] => [52] => 1 [74] => 1 [10023] => Array ( [0] => Content-Type: application/json-rpc [1] => User-Agent: ZabbixAPI v1.0 - http://andrewfarley.com/zabbix_php_api ) [10036] => POST [10015] => {"auth":"0a36dc4451319cc730023761fa23acad","method ":"host.get","id":1,"params":{"extendoutput":"shor ten","select_graphs":"shorten","filter":{"host":"Z ABBDB02"}},"jsonrpc":"2.0"} [10102] => gzip ) Got response from API: ({"jsonrpc":"2.0","result":[{"graphs":[{"graphid":"100100000000003","name":"CPU Utilization","width":"900","height":"200","yaxismi n":"0.0000","yaxismax":"100.0000","templateid":"0" ,"show_work_period":"1","show_triggers":"1","graph type":"1","show_legend":"0","show_3d":"0","percent _left":"0.0000","percent_right":"0.0000","ymin_typ e":"0","ymax_type":"0","ymin_itemid":"0","ymax_ite mid":"0"},{"graphid":"100100000000004","name":"Net work utilization","width":"900","height":"200","yaxismi n":"0.0000","yaxismax":"100.0000","templateid":"0" ,"show_work_period":"1","show_triggers":"1","graph type":"0","show_legend":"0","show_3d":"0","percent _left":"0.0000","percent_right":"0.0000","ymin_typ e":"0","ymax_type":"0","ymin_itemid":"0","ymax_ite mid":"0"},{"graphid":"100100000000002","name":"CP U


                        please can someone help me
                        4 Zabbix Frontend Servers (Load balanced)
                        2 Zabbix App Servers (HA)
                        2 Zabbix Database Servers (HA)
                        18 Zabbix Proxy Servers (HA)
                        3897 Deployed Zabbix Agents
                        6161 Values per second
                        X-Layer Integration
                        Jaspersoft report Servers (HA)

                        Comment

                        • trta
                          Junior Member
                          • Jul 2010
                          • 18

                          #57
                          how modify part of data.txt?

                          Hello, I'm experimenting with those pdf reports, but i dont know what are those lines from data.txt and how to modify for my own:
                          [/usr/local/share/zabbix/custom_pages/zabbix_report_generation/tmp_images/NVOC_-_Nebraska_Verifications_Center_434.png]
                          [/usr/local/share/zabbix/custom_pages/zabbix_report_generation/tmp_images/NVOC_-_Nebraska_Verifications_Center_433.png]
                          [/usr/local/share/zabbix/custom_pages/zabbix_report_generation/tmp_images/NVOC_-_Nebraska_Verifications_Center_435.png]

                          thank for help :-)

                          Comment

                          • scoopex
                            Junior Member
                            • Sep 2010
                            • 5

                            #58
                            Hi,

                            this looks promising - is there a sourcecode repository available (i.e. github) for your tool?

                            Regards
                            Marc

                            Comment

                            • doughall
                              Junior Member
                              • Feb 2010
                              • 5

                              #59
                              All set up ok, but the SELECT SITE still only says ALL, and doesn't select the hosts with graphs!

                              Zabbix 2.0.0

                              Comment

                              • doughall
                                Junior Member
                                • Feb 2010
                                • 5

                                #60
                                Originally posted by doughall
                                All set up ok, but the SELECT SITE still only says ALL, and doesn't select the hosts with graphs!

                                Zabbix 2.0.0
                                I added an ECHO to the pdfform.php to see the contents of the array, and it spat out all the hostids..

                                Comment

                                Working...