Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


v0.3.0 · public · Published over 3 years ago

README
Asset Definition
Release Notes
Release Assets

Sensu TimescaleDB Handler

TravisCI: TravisCI Build Status

The Sensu TimescaleDB Handler is a Sensu Event Handler that sends metrics to
the time series database TimescaleDB. Sensu can collect metrics using
check output metric extraction or the StatsD listener. Those collected metrics
pass through the event pipeline, allowing Sensu to deliver the metrics to the
configured metric event handlers. This TimescaleDB handler will allow you to
store, instrument, and visualize the metric data from Sensu.

Installation

Download the latest version of the sensu-timescaledb-handler from releases,
or create an executable script from this source.

Compiling

From the local path of the sensu-timescaledb-handler repository:

go build -o /usr/local/bin/sensu-timescaldb-handler main.go

Configuration

Example Sensu Go handler definition:

{
    "api_version": "core/v2",
    "type": "Handler",
    "metadata": {
        "namespace": "default",
        "name": "timescaledb"
    },
    "spec": {
        "type": "pipe",
        "command": "sensu-timescaledb-handler -d postgresql://127.0.0.1:5432/sensu",
        "timeout": 10,
        "filters": [
            "has_metrics"
        ]
    }
}

Usage Examples

Help:

Usage:
  sensu-timescaledb-handler [flags]

Flags:
  -d, --dsn string     the DSN of the TimescaleDB database, should be in DSN (Data Source Name) format (e.g. postgresql://localhost:5432/sensu) (default "postgres://localhost:5432/sensu")
  -h, --help           help for sensu-timescaledb-handler
  -t, --table string   the PostgreSQL table to store metrics in (default "metrics")

Example Database

CREATE database sensu;
CREATE TABLE metrics (
    time    TIMESTAMPTZ         NOT NULL,
    name    TEXT                NOT NULL,
    value   DOUBLE PRECISION    NULL,
    source  TEXT                NOT NULL,
    tags    JSONB
);

Contributing

See https://github.com/sensu/sensu-go/blob/master/CONTRIBUTING.md

Are you sure you want to report this asset?

Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.

×

You must be signed in to report this asset.

Sign In with Github

Download

×

Either download the source code:

Download Source

Or download the asset definition: