https://github.com/kakwa/collectd-opentsdb
Alternative TSDB writer with inclusion of tag logic and http API support
https://github.com/kakwa/collectd-opentsdb
c collectd collectd-plugin opentsdb
Last synced: 7 months ago
JSON representation
Alternative TSDB writer with inclusion of tag logic and http API support
- Host: GitHub
- URL: https://github.com/kakwa/collectd-opentsdb
- Owner: kakwa
- License: gpl-2.0
- Created: 2017-06-30T09:21:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-01T20:38:58.000Z (about 8 years ago)
- Last Synced: 2025-01-30T19:50:01.561Z (9 months ago)
- Topics: c, collectd, collectd-plugin, opentsdb
- Language: C
- Homepage:
- Size: 56.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# collectd-opentsdb
[](https://travis-ci.org/kakwa/collectd-opentsdb)
## Description
This plugin is a fork of the write_tsdb plugin.
It adds a few improvement over the stock write_tsdb plugin:
* inclusion of [write_tsdb plugin: Export metadata](https://github.com/collectd/collectd/pull/1655/files) PR for tag setup.
* implementation of the [http "/api/put" API](http://opentsdb.net/docs/build/html/api_http/put.html) of OpenTSDB instead of the "telnet protocol".
* support of ssl/tls with optional client side certificates for authentication.
* support for settings tags through json data in Hostname.## Documentation
The full plugin documentation is available here:
* [docs/collectd-opentsdb.pod](https://github.com/kakwa/collectd-tsdb2/blob/master/docs/collectd-opentsdb.pod)
Alternatively, once installed:
```bash
man collectd-opentsdb
```## Dependencies
* [collectd](https://collectd.org/) (version >= 5.6 is strongly recommended)
* [libcurl](https://curl.haxx.se/)
* [libjson-c](https://github.com/json-c/json-c)## Building
```bash
# change your install prefix according to your collect installation
cmake . -DCMAKE_INSTALL_PREFIX=/usr/# compilation
make# install
make install
```## Configuration
Here is a configuration example for this plugin
```xml
# Hostname used to set some static tags
Hostname "{\"fqdn\": \"http.node1.example.org\", \"env\": \"prod\", \"role\": \"http\"}"# Plugin configuration
LoadPlugin write_opentsdb
URL "http://localhost:5000"
JsonHostTag true
AutoFqdnFallback false
StoreRates false
AlwaysAppendDS false
# Metric rewrite/tag handling
LoadPlugin match_regex
LoadPlugin target_set
Plugin "^cpu$"
MetaData "tsdb_tag_pluginInstance" "cpu"
MetaData "tsdb_tag_type" ""
MetaData "tsdb_prefix" "sys."
Plugin "^df$"
MetaData "tsdb_tag_pluginInstance" "mount"
MetaData "tsdb_tag_type" ""
MetaData "tsdb_prefix" "sys."
Plugin "^disk$"
MetaData "tsdb_tag_pluginInstance" "disk"
MetaData "tsdb_prefix" "sys."
Plugin "^interface$"
MetaData "tsdb_tag_pluginInstance" "iface"
MetaData "tsdb_prefix" "sys."
Plugin "^loac$"
MetaData "tsdb_tag_type" ""
MetaData "tsdb_prefix" "sys."
Plugin "^swap$"
MetaData "tsdb_prefix" "sys."
```
## Changelogs
### 0.0.6
* fix various memleaks
### 0.0.5
* Documentation fixes
### 0.0.4
* Documentation fixes
### 0.0.3
* fix typo in AutoFqdnFallback option name (previously: AutoFqdnFailback)
* better man page### 0.0.2
* capping error logs to two every 30 seconds if http POST of metrics fails (avoid spamming syslog with error logs)
* fix error handling in metric treatment
* add man page installation
* clean man page### 0.0.1
* first version