Collects InfluxDB internal monitoring metrics
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
examples
influxdb
scripts
.gitignore
.pluginsync.yml
.sync.yml
.travis.yml
CONTRIBUTING.md
LICENSE
METRICS.md
Makefile
README.md
glide.lock
glide.yaml
main.go
main_small_test.go

README.md

DISCONTINUATION OF PROJECT

This project will no longer be maintained by Intel. Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.

Snap collector plugin - influxdb

This plugin collects statistical and diagnostic information about each InfluxDB node. This information can be very useful to assist with troubleshooting and performance analysis of the database itself.

This plugin has ability to gather InfluxDB internal system monitoring information in response to the following commands: SHOW STATS and SHOW DIAGNOSTICS.

The plugin is used in the Snap framework.

  1. Getting Started
  2. Documentation
  3. Community Support
  4. Contributing
  5. License
  6. Acknowledgements

Getting Started

System Requirements

  • Linux 64bit system
  • InfluxDB (version 0.9 or higher)

Operating systems

All OSs currently supported by Snap:

  • Linux/amd64

Installation

Download the plugin binary:

You can get the pre-built binaries for your OS and architecture from the plugin's GitHub Releases page. Download the plugin from the latest release and load it into snapteld (/opt/snap/plugins is the default location for Snap packages).

To build the plugin binary:

Fork https://github.com/intelsdi-x/snap-plugin-collector-influxdb
Clone repo into $GOPATH/src/github.com/intelsdi-x/:

$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-influxdb.git

Build the Snap influxdb plugin by running make within the cloned repo:

$ make

This builds the plugin in ./build/

Configuration and Usage

Documentation

To learn more about influxDB System Monitoring, visit:

Global Config

Global configuration file is described in Snap's documentation. For this plugin section "influxdb" in "collector" specifing the following options needs to be added (see an exemplary config file):

Name Data Type Description
"host" string hostname of InfluxDB http API
"port" int port of InfluxDB http API (by default 8086)
"user" string user name
"password" string user password

Collected Metrics

List of collected metrics is described in METRICS.md.

Examples

Example of running Snap influxdb collector and writing data to file. Download an example of Snap global config file.

$ curl -sfLO https://raw.githubusercontent.com/intelsdi-x/snap-plugin-collector-influxdb/master/examples/configs/snap-config-sample.json

Ensure Snap daemon is running with provided configuration file:

  • command line: snapteld -l 1 -t 0 --config snap-config-sample.json&

Download and load Snap plugins:

$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-influxdb/latest/linux/x86_64/snap-plugin-collector-influxdb
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/linux/x86_64/snap-plugin-publisher-file
$ chmod 755 snap-plugin-*
$ snaptel plugin load snap-plugin-collector-influxdb
$ snaptel plugin load snap-plugin-publisher-file

See all available metrics:

$ snaptel metric list

NAMESPACE                                                VERSIONS
/intel/influxdb/diagn/build/Branch                       2
/intel/influxdb/diagn/build/Commit                       2
/intel/influxdb/diagn/build/Version                      2
/intel/influxdb/diagn/network/hostname                   2
/intel/influxdb/diagn/runtime/GOARCH                     2
/intel/influxdb/diagn/runtime/GOMAXPROCS                 2
/intel/influxdb/diagn/runtime/GOOS                       2
/intel/influxdb/diagn/runtime/version                    2
/intel/influxdb/diagn/system/PID                         2
/intel/influxdb/diagn/system/currentTime                 2
/intel/influxdb/diagn/system/started                     2
/intel/influxdb/diagn/system/uptime                      2
/intel/influxdb/stat/engine/1/blks_write                 2
/intel/influxdb/stat/engine/1/blks_write_bytes           2
/intel/influxdb/stat/engine/1/blks_write_bytes_c         2
/intel/influxdb/stat/engine/1/points_write               2
/intel/influxdb/stat/engine/1/points_write_dedupe        2
/intel/influxdb/stat/engine/2/blks_write                 2
/intel/influxdb/stat/engine/2/blks_write_bytes           2
/intel/influxdb/stat/engine/2/blks_write_bytes_c         2
/intel/influxdb/stat/engine/2/points_write               2
/intel/influxdb/stat/engine/2/points_write_dedupe        2
/intel/influxdb/stat/httpd/auth_fail                     2
/intel/influxdb/stat/httpd/ping_req                      2
/intel/influxdb/stat/httpd/points_written_ok             2
/intel/influxdb/stat/httpd/query_req                     2
/intel/influxdb/stat/httpd/query_resp_bytes              2
/intel/influxdb/stat/httpd/req                           2
/intel/influxdb/stat/httpd/write_req                     2
/intel/influxdb/stat/httpd/write_req_bytes               2
/intel/influxdb/stat/runtime/Alloc                       2
/intel/influxdb/stat/runtime/Frees                       2
/intel/influxdb/stat/runtime/HeapAlloc                   2
/intel/influxdb/stat/runtime/HeapIdle                    2
/intel/influxdb/stat/runtime/HeapInUse                   2
/intel/influxdb/stat/runtime/HeapObjects                 2
/intel/influxdb/stat/runtime/HeapReleased                2
/intel/influxdb/stat/runtime/HeapSys                     2
/intel/influxdb/stat/runtime/Lookups                     2
/intel/influxdb/stat/runtime/Mallocs                     2
/intel/influxdb/stat/runtime/NumGC                       2
/intel/influxdb/stat/runtime/NumGoroutine                2
/intel/influxdb/stat/runtime/PauseTotalNs                2
/intel/influxdb/stat/runtime/Sys                         2
/intel/influxdb/stat/runtime/TotalAlloc                  2
/intel/influxdb/stat/shard/1/fields_create               2
/intel/influxdb/stat/shard/1/series_create               2
/intel/influxdb/stat/shard/1/write_points_ok             2
/intel/influxdb/stat/shard/1/write_req                   2
/intel/influxdb/stat/shard/2/fields_create               2
/intel/influxdb/stat/shard/2/series_create               2
/intel/influxdb/stat/shard/2/write_points_ok             2
/intel/influxdb/stat/shard/2/write_req                   2
/intel/influxdb/stat/write/point_req                     2
/intel/influxdb/stat/write/point_req_local               2
/intel/influxdb/stat/write/req                           2
/intel/influxdb/stat/write/write_ok                      2

Download an exemplary task manifest and load it:

$ curl -sfLO https://raw.githubusercontent.com/intelsdi-x/snap-plugin-collector-influxdb/master/examples/tasks/influxdb-file.json
$ snaptel task create -t influxdb-file.json
Using task manifest to create task
Task created
ID: 02dd7ff4-8106-47e9-8b86-70067cd0a850
Name: Task-02dd7ff4-8106-47e9-8b86-70067cd0a850
State: Running

See realtime output from snaptel task watch <task_id> (CTRL+C to exit)

$ snaptel task watch 02dd7ff4-8106-47e9-8b86-70067cd0a850
Watching Task (02dd7ff4-8106-47e9-8b86-70067cd0a850):
NAMESPACE                                        DATA                    TIMESTAMP                                       SOURCE
/intel/influxdb/diagn/system/PID                 16191                   2016-02-26 09:25:47.353886681 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/httpd/auth_fail             63                      2016-02-26 09:25:47.354068464 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/httpd/ping_req              14                      2016-02-26 09:25:47.354073486 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/httpd/points_written_ok     6.69802551e+08          2016-02-26 09:25:47.354137322 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/httpd/query_req             2310                    2016-02-26 09:25:47.354132981 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/httpd/query_resp_bytes      2.0678075e+07           2016-02-26 09:25:47.354113672 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/httpd/req                   6.824003e+06            2016-02-26 09:25:47.354028193 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/httpd/write_req             6.821614e+06            2016-02-26 09:25:47.354095848 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/httpd/write_req_bytes       7.1455502846e+10        2016-02-26 09:25:47.354105454 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/runtime/Alloc               1.07946848e+08          2016-02-26 09:25:47.354209458 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/runtime/Frees               1.5858776371e+10        2016-02-26 09:25:47.354412092 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/write/point_req             6.82720753e+08          2016-02-26 09:25:47.354579209 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/write/point_req_local       6.82720753e+08          2016-02-26 09:25:47.354619612 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/write/req                   7.000631e+06            2016-02-26 09:25:47.354624219 +0000 UTC         node-25.domain.tld
/intel/influxdb/stat/write/write_ok              7.000823e+06            2016-02-26 09:25:47.354609029 +0000 UTC         node-25.domain.tld

This data is published to a file /tmp/published_influxdb_internal_monitoring per task specification

Stop task:

$ snaptel task stop 02dd7ff4-8106-47e9-8b86-70067cd0a850
Task stopped:
ID: 02dd7ff4-8106-47e9-8b86-70067cd0a850

Roadmap

There isn't a current roadmap for this plugin, but it is in active development. As we launch this plugin, we do not have any outstanding requirements for the next release.

If you have a feature request, please add it as an issue and/or submit a pull request.

Community Support

This repository is one of many plugins in Snap, a powerful telemetry framework. See the full project at http://github.com/intelsdi-x/snap.

To reach out to other users, head to the main framework or visit Slack.

Contributing

We love contributions!

There's more than one way to give back, from examples to blogs to code updates. See our recommended process in CONTRIBUTING.md.

License

Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.

Acknowledgements