-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07297e8
commit 62ec3e5
Showing
10 changed files
with
522 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# CrateDB Output Plugin for Telegraf | ||
|
||
This plugin writes to [CrateDB](https://crate.io/) via its [PostgreSQL protocol](https://crate.io/docs/crate/reference/protocols/postgres.html). | ||
|
||
## Table Schema | ||
|
||
The plugin requires a table with the following schema. | ||
|
||
|
||
```sql | ||
CREATE TABLE my_metrics ( | ||
"hash_id" LONG INDEX OFF, | ||
"timestamp" TIMESTAMP, | ||
"name" STRING, | ||
"tags" OBJECT(DYNAMIC), | ||
"fields" OBJECT(DYNAMIC), | ||
PRIMARY KEY ("timestamp", "hash_id","day") | ||
) PARTITIONED BY("day"); | ||
``` | ||
|
||
The plugin can create this table for you automatically via the `table_create` | ||
config option, see below. | ||
|
||
## Configuration | ||
|
||
```toml | ||
# Configuration for CrateDB to send metrics to. | ||
[[outputs.cratedb]] | ||
# A github.com/jackc/pgx connection string. | ||
# See https://godoc.org/github.com/jackc/pgx#ParseDSN | ||
url = "postgres://user:password@localhost/schema?sslmode=disable" | ||
# Timeout for all CrateDB queries. | ||
timeout = "5s" | ||
# Name of the table to store metrics in. | ||
table = "metrics" | ||
# If true, and the metrics table does not exist, create it automatically. | ||
table_create = true | ||
``` |
Oops, something went wrong.