Ad Widget

Collapse

Zabbix fails to generate graphs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wibbit
    Junior Member
    • Oct 2008
    • 13

    #1

    Zabbix fails to generate graphs

    Good afternoon.

    I've installed Zabbix 1.6.1 svn 6376 from http://repo.ocjtech.us/zabbix/epel/5/i386/ and I am finding that all of the graphs are blank.

    Both graphs that I try to generate from interface statistics, or by going to the "latest data" screen, and click on the graph option for the inbound information.

    Is any one else having this issue?
  • wibbit
    Junior Member
    • Oct 2008
    • 13

    #2
    Here are some screen shots, that hopefully will help.

    They are taking from Latest Data, with the IE browser on Windows.
    Attached Files

    Comment

    • Calimero
      Senior Member
      • Nov 2006
      • 481

      #3
      Did you install GD for PHP (or build PHP with GD support) ?

      On debianish systems, install package php5-gd (or php4-gd).
      On redhatish systems, you're looking for php-gd.

      Comment

      • wibbit
        Junior Member
        • Oct 2008
        • 13

        #4
        Yup, I'd thought that this may have been left out of the build process/dependancy for the RPM's.

        However.

        rpm -qi php-gd
        Name : php-gd Relocations: (not relocatable)
        Version : 5.1.6 Vendor: CentOS
        Release : 20.el5_2.1 Build Date: Thu 17 Jul 2008 12:57:23 AM BST
        Install Date: Wed 05 Nov 2008 12:54:44 PM GMT Build Host: builder16.centos.org
        Group : Development/Languages Source RPM: php-5.1.6-20.el5_2.1.src.rpm
        Size : 331641 License: The PHP License v3.01
        Signature : DSA/SHA1, Thu 17 Jul 2008 02:44:32 AM BST, Key ID a8a447dce8562897
        URL : http://www.php.net/
        Summary : A module for PHP applications for using the gd graphics library
        Description :
        The php-gd package contains a dynamic shared object that will add
        support for using the gd graphics library to PHP.

        Suggests it's all okay.

        The worst part is that I can't seem to find any errors any where, even when upping the zabbix debug to 4, though that could be related to the amount of information, and me missing some thing.

        Comment

        • Calimero
          Senior Member
          • Nov 2006
          • 481

          #5
          You must check you Apache logs, not zabbix_server's logs.

          What if you copy the URL of one of the broken images and display it "directly" (paste in address bar of browser) ?

          Comment

          • wibbit
            Junior Member
            • Oct 2008
            • 13

            #6
            The HTTP logs are giving me no indication of a problem being present.

            I get the following error when trying to view the file directly.

            The image “http://gbgh-svmon-01.sig.ads/zabbix/...&width=1200” cannot be displayed, because it contains errors.

            Comment

            • Calimero
              Senior Member
              • Nov 2006
              • 481

              #7
              What if you try wget or curl on that URL ?

              Comment

              • wibbit
                Junior Member
                • Oct 2008
                • 13

                #8
                wget http://zabbix.sig.ads/chart.php?item...600&width=1200
                [1] 19989
                [2] 19990
                [3] 19991
                [4] 19992
                [2] Done from=0
                [3] Done stime=200812031434
                [4]+ Done period=3600
                [dfurlong@gbgh-dsk-00089 Desktop]$ --2008-12-03 15:39:23-- http://zabbix.sig.ads/chart.php?itemid=22208
                Resolving zabbix.sig.ads... 192.168.200.159
                Connecting to zabbix.sig.ads|192.168.200.159|:80... connected.
                HTTP request sent, awaiting response... 200 OK
                Length: 800 [image/png]
                Saving to: `chart.php?itemid=22208'

                100%[================================================== ================================================== ================================================== =================>] 800 --.-K/s in 0s

                2008-12-03 15:39:23 (107 MB/s) - `chart.php?itemid=22208' saved [800/800]


                [1]+ Done wget http://zabbix.sig.ads/chart.php?itemid=22208

                -----------------------------------

                I've attached the resultant file, according to file, it just see's it as data, checking head output suggests a PNG file, but doesn't appear to be liked by image viewers.

                Comment

                • wibbit
                  Junior Member
                  • Oct 2008
                  • 13

                  #9
                  Re-attaching the file within a zip container.
                  Attached Files

                  Comment

                  • Calimero
                    Senior Member
                    • Nov 2006
                    • 481

                    #10
                    Er... you should use quotes around the URL or the shell with run multiple (non-existent) commands in background.

                    wget "http://my.zabbix.com/graph..."

                    Then just check file content to check for PHP error messages.

                    Comment

                    • wibbit
                      Junior Member
                      • Oct 2008
                      • 13

                      #11
                      /me feels sheepish...

                      That was a fairly silly mistake.

                      I've done it again, escaping the special characters (with quotes), and have looked at the resultant file, and I can see nothing in the file that gives an indication of an error, nor can I see any errors in my web log.

                      192.168.202.95 - - [03/Dec/2008:16:20:59 +0000] "GET /chart.php?itemid=22208&from=0&stime=200812031520&p eriod=3600&width=1200 HTTP/1.1" 200 10792

                      I've attached the new file, incase you can see some thing that I can not.
                      Attached Files

                      Comment

                      • Laca
                        Junior Member
                        Zabbix Certified Specialist
                        • Apr 2008
                        • 3

                        #12
                        Exactly the same symptom

                        Hi!

                        We have exactly the same symptom in the same environment. CentOS, mysql, php-gd, and Zabbix 1.6.1 without graphs and images.

                        It seems like a CentOS specific problem. (We have tested it with Firefox, IE and from command prompt with wget.)

                        We have just migrated it from Ubuntu yesterday, because Ubuntu is not supported by the IBM blade where we tried to install it.

                        Any suggestions?

                        Comment

                        • akatsuki
                          Junior Member
                          • Nov 2008
                          • 10

                          #13
                          hi wibbit,

                          I checked your posted PNG data with binary editor and i found it has wrong PNG header at first of data.
                          Nomary PNG header starts,

                          \x89PNG\x0d\x0a\x1a\x0a

                          , but your one has,

                          \x0a\x89PNG\x0d\x0a\x1a\x0a...

                          I suspect that your /path/to/phpfiles/conf/zabbix.conf.php ends with null line with 0x0a.
                          If so, terminate this conf file with '?>' without linefeeding.


                          By the way, with trimed off head of 0x0A, file shows a graphic which words, "ERROR: No permissons !", are written.

                          Comment

                          • wibbit
                            Junior Member
                            • Oct 2008
                            • 13

                            #14
                            Good morning.

                            That did indeed fix the problem.

                            The configuration file had an additional line at the end which was causing the problem.

                            "dd" in vi, and saving the file resolved the issue, may I suggest that this is an issues that really should be covered programatically.

                            I would have thought the application would at least be able to warn that there are errors in the configuration file, or at least not be as sensitive.

                            Either way, for me it is all working.

                            Comment

                            Working...