Ad Widget

Collapse

Custom graph

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shukalo83
    Junior Member
    • Apr 2011
    • 14

    #1

    Custom graph

    Hello

    I'am using zabbix in monitoring industrial environment. (Temperatures of furnace in brick production).

    I would like to know what would be the easiest way to have custom graph with data from zabbix database. I want to make so called "furnace diagram" with meters (longitude of furnace) on x-axes and and average temperatures (zabbix items I do monitor already) on y-axes.

    I have good overall knowledge of linux and postgres and have some proficiency with python. I was thinking of separate simple webapp in python and cherrypy with zabbix database as a backend. I can deal with it for sure but I would like to know is it simpler to change zabbix code.

    Please a have a look at the diagram I made here: http://dl.dropbox.com/u/7886102/graph_custom.jpg
  • shukalo83
    Junior Member
    • Apr 2011
    • 14

    #2
    Sorry for bumping but this one is important to me.

    Any suggestions are welcome.

    Thank You.

    Comment

    • shukalo83
      Junior Member
      • Apr 2011
      • 14

      #3
      I've just learn about this.

      Various scripts. Contribute to gescheit/scripts development by creating an account on GitHub.


      Maybe I could use it for creating graphics I need. Python matplot lib comes to mind.

      Comment

      • Davidus
        Senior Member
        • Dec 2010
        • 281

        #4
        take a look at this one


        hope it helps

        Comment

        • shukalo83
          Junior Member
          • Apr 2011
          • 14

          #5
          Thank You Davidus.

          Not so sure about reporting tool you used because I need custom x-axes, so to say and I do not know whether is it possible. I'm going to check more on that. I should have said that I run on PostgreSQL but I presume that ODBC and java can handle that.

          However, this code I found on your link sure does help.

          Thank You once more.

          Code:
          SELECT
          hour(from_unixtime(trends.`clock`)) AS trends_clock,
          date_format(from_unixtime(trends.clock), '%Y-%m-%d') AS report_date,
          100 - trends.`value_avg` AS cpu_value_avg
                  FROM  items, hosts, trends
          WHERE items.itemid = trends.itemid AND
          items.hostid=hosts.hostid AND
          hosts.host='hostname' AND
          items.key_='system.cpu.util[,idle,avg1]' AND
          date(from_unixtime(trends.`clock`)) =
          date_sub(curdate(),interval 1 day)
          ORDER BY FROM_UNIXTIME(trends.`clock`) ASC;
          Last edited by shukalo83; 10-11-2011, 09:55.

          Comment

          Working...