-
Notifications
You must be signed in to change notification setti 8000 ngs - Fork 1.2k
Collection 4
Florian Forster edited this page Nov 26, 2023
·
1 revision
Collection 4 (abbreviated as c4) is a web-based front-end to data collected by collectd. It is written as a FastCGI application in C.
The two main goals of c4 are performance and versatility: The application has been implemented in a way that handles installations with more than 85,000 files in an efficient manner. The data and appearance of each graph can be configured in a config file in a very flexible manner. Not all output options support this configuration yet, though.
- Data-set-aware graphs
- Sending a
FLUSH
command to the daemon using libcollectdclient is mandatory. - Currently the code base is cluttered with functions trying to figure out the arguments required for
rrdtool graph
(rrdgraph(1)). These functions will be moved to a separate place or removed entirely. RRDtool doesn't allow to separate the fetch and create graph phases and therefore doesn't fit the design of c4. - Much work has been spent on internal design and optimizations. The HTML printed by the program is very crude and basically a proof of concept. While this will hopefully improve over time, the goal is to make it possible to create nice front-ends on top of c4 using the data is exports as JSON.
- Make it possible for an ident to match multiple value-lists. One way to do this is to use regular expressions in the selectors of the graph and the def.
- Make it possible to specify a "fallback" def – a def which is used when no other def matches a given file / data-source.
- …
You can think of actions a little applications sitting on top of a library that makes up c4. Th 10000 ey provide functionality that is available using this interface. Currently, the following actions are available:
-
graph
Prints a graph instance as a PNG image using the librrd. This action will possibly be removed or changed. -
graph_def_json
Exports a graph definition as JSON. -
instance_data_json
Exports the data required to draw a graph instance as JSON. -
list_graphs
Prints a list of graphs as an HTML page. You can optionally request dynamic graphs to be included, too. -
list_hosts
Prints a list of hosts as an HTML page. -
search
Provides a search interface to the graphs provided by c4 using HTML. -
search_json
Provides search facilities and returns data encoded as JSON, so it can be used from JavaScript. -
show_graph
Prints an HTML page listing all the graph instances belonging to a graph. -
show_graph_json
Returns a list of graph instances belonging to a graph as JSON. -
show_instance
Prints an HTML page containing one graph instance, i.e. an actual image. By default the graph image is rendered using JavaScript, but an RRDtool-generated graph can be requested, too, which uses thegraph
action. -
usage
Prints a list of available actions.
- Web-server with FastCGI support
- C libraries
- libfcgi (http://www.fastcgi.com/)
- librrd_th (http://oss.oetiker.ch/rrdtool/)
- libyajl (http://lloyd.github.com/yajl/)
- Project homepage
- Git repository (web interface)
- Collection-3 (predecessor)
- Announcement on the mailing-list.