* Add sink directly using libganglia.so * Remove unneeded confuse header * add submodule init to build action * add submodule init to runonce action * add installation og ganglia to runonce * add installation of ganglia to runonce * add installation of ganglia to runonce * libconfuse not required * Remove ganglia submodule * Remove ganglia.h * Add Makefile to help creating the libganglia.so link * Fix cgo header * Rename new Ganglia sink to 'libgangliaSink' * Add documentation for libgangliaSink * Extend make buildsystem with find&symlink helper for libgangliaSink * Add metric renaming function * Add build tag 'ganglia' and create corresponding files
2.2 KiB
libganglia
sink
The libganglia
sink interacts directly with the library of the Ganglia Monitoring System to submit the metrics. Consequently, it needs to be installed on all nodes. But this is commonly the case if you want to use Ganglia, because it requires at least a node daemon (gmond
or ganglia-monitor
) to work.
The libganglia
sink has probably less overhead compared to the ganglia
sink because it does not require any process generation but initializes the environment and UDP connections only once.
Configuration structure
{
"<name>": {
"type": "libganglia",
"gmetric_config" : "/path/to/gmetric/config",
"cluster_name": "MyCluster",
"add_ganglia_group" : true,
"add_type_to_name": true,
"add_units" : true
}
}
type
: makes the sink anlibganglia
sinkmeta_as_tags
: print all meta information as tags in the output (optional)gmond_config
: Path to the Ganglia configuration filegmond.conf
(default:/etc/ganglia/gmond.conf
)cluster_name
: Set a cluster name for the metric. If not set, it is taken fromgmond_config
add_ganglia_group
: Add a Ganglia metric group based on meta information. Some old versions ofgmetric
do not support the--group
optionadd_type_to_name
: Ganglia commonly uses only node-level metrics but with cc-metric-collector, there are metrics for cpus, memory domains, CPU sockets and the whole node. In order to get eeng, this option prefixes the metric name with<type><type-id>_
ordevice_
depending on the metric tags and meta information. For metrics of the whole nodetype=node
, no prefix is addedadd_units
: Add metric value unit if there is aunit
entry in the metric tags or meta information
Ganglia Installation
My development system is Ubuntu 20.04. To install the required libraries with apt
:
$ sudo apt install libganglia1
The libganglia.so
gets installed in /usr/lib
. The Ganglia headers libganglia1-dev
are not required.
I added a Makefile
in the sinks
subfolder that searches for the library in /usr
and creates a symlink (sinks/libganglia.so
) for running/building the cc-metric-collector. So just type make
before running/building in the main folder or the sinks
subfolder.