Ad Widget

Collapse

Everything you need to get graph images by graphid - PHP

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

    #1

    Everything you need to get graph images by graphid - PHP

    I'm working on a report generation addon for zabbix, and got this working today, I see a lot of people asking how to do this on the forums so I wanted to share this little function so you can get it working as well.

    I will post the report generation addon once it is completed. Uses API or direct MySQL calls and imbeds into screens so should work with ANY 1.8.x and 2.0.

    -- REMOVED CODE -- MOVED TO http://zabbix.org/wiki/Get_Graph_Image_PHP
    Last edited by Axilla; 23-01-2012, 19:00.
  • Axilla
    Senior Member
    • Aug 2010
    • 130

    #2
    I will be fleshing out the function to add more parameters in the coming days, I will update as it gets more interesting

    Comment

    • Axilla
      Senior Member
      • Aug 2010
      • 130

      #3
      Version 1.1
      - Added width and height to GetGraph function
      - Added to zabbix.org Wiki

      Join the friendly and open Zabbix community on our forums and social media platforms.

      Comment

      • cheezus
        Member
        • Nov 2011
        • 35

        #4
        Sweet!

        SWEEEEEETT!!! Thank you! Giving this a go tonight, will let you know how it works out for us!

        Comment

        • cheezus
          Member
          • Nov 2011
          • 35

          #5
          Update:

          We were getting broken images. Everything seemed ok. Turns out for 2.0 you need more to the login params.

          For 2.0 use:
          $z_login_data = "name=" .$z_user ."&password=" .$z_pass ."&enter=Sign in&autologin=1&request=";

          Instead of:
          $z_login_data = "name=" .$z_user ."&password=" .$z_pass ."&enter=Enter";

          Which I found here:

          Comment

          Working...