A very simple server monitoring solution
GraphIT is client/server based, uses SQLite as database backend and HTTP as transport protocol. It use REST (Representational State Transfer) principle to exchange data between agents and server, and server and frontend. All data are formated in JSON format.
Agent is a simple HTTP client that support POST request. A Python library is provided to facilitate agents creation in Python.
The installation is really simple, you just have to type that command (after installing setuptools package on your distro):
Configuration is exclusively made with help of graphitd command parameters. Type graphitd --help to have a list of available parameters.
Rely on provided index.html to understand how GraphITize work (it's so simple !!).
You can host GraphITize on other server than GraphIT, and even run it on your desktop, without web server.
GraphIT implement JSONP and OPTIONS http method for Ajax Cross domain. JSONP is used by default because OPTIONS http method is only implemented on recent Firefox and Webkit versions. To use this latter, remove the "callback" parameter in your URL when you call graphitize().
Watchers are prefabricated agents for GraphIT. They are distributed with GraphIT.
Watchers needs to be run regulary, you can use a crontask to do that, and you just have to choose an interval (which depend on the need of accuracy on the data).
Some watchers need a specific execution interval. For exemple graphit-vnstat is used to get network trafic speed on a specified interface. If you make a "snapshot" of speed every five minutes, you will have data that will be not representative of average speed of the last five minutes, but just during watcher's execution.
To prevent this problem, vnstat is executed for a time specified by user (60 seconds by default), and returns trafic speed average for this time.
In this case, you CAN'T execute watcher more than one time by time specified, or many watcher instance will be executed at the same time.
Watchers binaries starts with "graphit-" prefix, and are installed at the same location as graphid binary.
Agent Python library is installed with server package (see Setup/Installation). To use it, you have to import GraphItAgent in graphit.client :
>>> from graphit.client import GraphItAgent
Then, you have just to instanciate it :
>>> agent = GraphItAgent('http://my-graphit-server/', login='graphit', passwd='secret')
Finally, to submit monitoring data use add_value method :
>>> agent.add_value(set='df', feed='sda', value=42, unit='%')
It's that easy!
In a hurry? Add it to your Download Basket!
What's New in This Release:
- ADD: New watchers: graphit-vnstat and graphit-disk.
- FIX: graphit-mem free information now converted in Mb
- Code cleanup