[ZBXNEXT-2176] Send data to graphite Created: 2014 Feb 27  Updated: 2023 Sep 08

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), Proxy (P)
Affects Version/s: None
Fix Version/s: None

Type: New Feature Request Priority: Trivial
Reporter: Vadym Kalsin Assignee: Unassigned
Resolution: Unresolved Votes: 17
Labels: agent, graphs, storage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Zabbix is a great tool for monitoring but visualization and graphing options are quite poor. For example, we can place many items on the one graph, but we can't scale them relative to each other. I know that we can use second Y axis, but this is not always helps.
Graphite is the tool that can help us! Graphite is a highly scalable real-time graphing system. Official site - http://graphite.wikidot.com/
It can:

We store historycal data for some items in graphite and only save last recent data in zabbix (for the triggers). Now we feed our graphite by calling a script which uses zabbix API. Every 30 seconds it scans all hosts, finds items with prefix "-graphite" and sands the lastvalue and lastclock to graphite. This script loads our zabbix-server and database very well. So it would be better to send data directly from zabbix-agent (or zabbix-proxy).

Is it difficult to implement?



 Comments   
Comment by richlv [ 2014 Mar 16 ]

i'm tempted to say that this is a dupe of ZBXNEXT-714 - the best would be for server to be able to push data to graphite, i guess

Comment by Shane McEwan [ 2014 May 08 ]

I'm wondering if it would be possible to expose the Zabbix API or Zabbix database as a Graphite storage finder/backend (http://graphite.readthedocs.org/en/latest/storage-backends.html). That way you don't double up your data storage. Zabbix can continue to gather the data and generate alerts and Graphite can do what it does best . . . draw pretty graphs.

If I have some spare time (hah!) I might have a go.

Comment by Marc [ 2014 Oct 03 ]

richlv, I always considered this request different from ZBXNEXT-714, because the description is about storing data additionally in a different storage backend. So Zabbix continues to work like before but something 3rd party got the data as well.

Now I admittedly share your opinion. A proper implementation of ZBXNEXT-714 would of course not only allow to store the data somehow somewhere else, it would also provide the interface for Zabbix accessing the data. In this case by querying the Graphite backend.

Comment by Nathan Dornqaust [ 2014 Nov 25 ]

@Shane McEwan Did you ever pursue this? The biggest problem I have with Graphite is the single whisper db files.. Currently over 200,000 active files.. It's very high I/O. I'd love to use Zabbix with the ability to add graphite graphs - really would be the icing on the cake.

Comment by Shane McEwan [ 2014 Nov 25 ]

As a proof of concept I wrote a little wrapper script in Perl that mimicked the Graphite API but spoke to the Zabbix API in the background. I then installed a few different Graphite compatible frontends and pointed them at my wrapper. Some of them partially worked but a lot were expecting more advanced Graphite API calls that I hadn't implemented. I realised that if I pursued this course I'd end up having to implement the entire Graphite API functionality which I didn't want to do so I abandoned it.

My next step is to try to write a functional Graphite storage backend that talks to the Zabbix API but my Python-fu is poor and the Graphite documentation assumes Python knowledge that I lack. But from my Perl wrapper tests and everything else I've read I don't see why a Graphite storage backend using the Zabbix API wouldn't work. It probably won't be fast, direct MySQL/PostgreSQL would be faster but more prone to breaking with Zabbix DB schema changes, but should be functional for small numbers of items and date ranges.

If there's any Python experts out there willing to help I'd be happy to stick what I've done so far (not much) onto Github and we can collaborate.

Comment by Bryce Walter [ 2014 Dec 20 ]

Shane McEwan,
Could you start a repo with what you've done so far? I as well as others on my team would love to get this going.
We've been able to use the pyzabbixapi to pull data into graphite with a custom python script, but its just creating duplicate storage due to the creation of the Whisper files.
We are using Grafana as our Graphite frontend, so we want to build a wrapper or data source for Zabbix that can be added to Grafana, this way it uses the Zabbix MySQL db for its data vs whisper.
I'll be more than happy to contribute on condition that the proper Apache v2 License be attached to your source.

Comment by Marc [ 2016 Jul 31 ]

ZBXNEXT-3353 asks for "module support for sending history data".

Generated at Fri Apr 19 02:01:19 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.