Skip to content
ashie edited this page Oct 30, 2014 · 26 revisions

Graph

  • Holizontal: Time range (Variable)
  • Vertical: Value (CPU load, memory usage, etc)
  • UI to change time range (+/- icon?)
  • Should we create a drawing framework with low-layer components such as canvas tag.
    • I want to do so to understand the technologies well and have a room for flexibility.

Required functions for drawing graph

  • Fetch values with a specified time rage.
    • Parameters to query data
      • Host Name (or ID)
      • Time rage
      • Item ID
    • Binning in Hatohol server is needed.
  • Fetch Logs with a specified time range.
  • Fetch units
    • Although they are included in "Item" of Zabbix, Hatohol doesn't store them.
    • How about Nagios?
  • Physical host machine and Hypervisor that run the target (virtual) machine.

Research

Graph Libraries

Requirements

  • Compatible with GPLv2 or later
  • Don't depend on external sites (Don't need internet access)

JavaScript

Although there are many libraries for JavaScript, probably only a few libraries match with requirements.

Fetching history data

Zabbix

  • frontends/php/include/classes/class.cchart.php: selectData() (Zabbix 2.0)
  • frontends/php/include/classes/graphdraw/CLineGraphDraw.php: selectData() (Zabbix 2.2)

According to the above code, Zabbix uses "trend" data or aggregation functions of SQL to reduce history data to fetch. But Zabbix API doesn't provide both methods. How should we reduce it?

Related Zabbix API:

Probably there are only 3 ways for us:

  • Fetch all history data in the time range
  • Add such API to Zabbix
  • Fetch from Zabbix's DB (MySQL, PostgreSQL, Oracle...) directly