forked from influxdata/telegraf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add plugin development framework (influxdata#4324)
- Loading branch information
1 parent
2ee374c
commit 9fe90d7
Showing
9 changed files
with
174 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3' | ||
|
||
services: | ||
telegraf: | ||
image: glinton/scratch | ||
volumes: | ||
- ./telegraf.conf:/telegraf.conf | ||
- ../../../../telegraf:/telegraf | ||
- ./test.log:/var/log/test.log | ||
entrypoint: | ||
- /telegraf | ||
- --config | ||
- /telegraf.conf |
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,12 @@ | ||
[agent] | ||
interval="1s" | ||
flush_interval="1s" | ||
|
||
[[inputs.logparser]] | ||
files = ["/var/log/test.log"] | ||
from_beginning = true | ||
[inputs.logparser.grok] | ||
patterns = [ "%{COMBINED_LOG_FORMAT}", "%{CLIENT:client_ip} %{NOTSPACE:ident} %{NOTSPACE:auth} \\[%{TIMESTAMP_ISO8601:timestamp}\\] \"(?:%{WORD:verb:tag} %{NOTSPACE:request}(?: HTTP/%{NUMBER:http_version:float})?|%{DATA})\" %{NUMBER:resp_code:tag} (?:%{NUMBER:resp_bytes:int}|-) %{QS:referrer} %{QS:agent}"] | ||
|
||
[[outputs.file]] | ||
files = ["stdout"] |
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,2 @@ | ||
127.0.0.1 ident auth [10/Oct/2000:13:55:36 -0700] "GET /anything HTTP/1.0" 200 2326 "http://localhost:8083/" "Chrome/51.0.2704.84" | ||
127.0.0.1 ident auth [2018-02-21 13:10:34,555] "GET /peter HTTP/1.0" 200 2326 "http://localhost:8083/" "Chrome/51.0.2704.84" |
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,16 @@ | ||
version: '3' | ||
services: | ||
mongodb: | ||
image: mongo | ||
|
||
telegraf: | ||
image: glinton/scratch | ||
volumes: | ||
- ./telegraf.conf:/telegraf.conf | ||
- ../../../../telegraf:/telegraf | ||
depends_on: | ||
- mongodb | ||
entrypoint: | ||
- /telegraf | ||
- --config | ||
- /telegraf.conf |
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,9 @@ | ||
[agent] | ||
interval="1s" | ||
flush_interval="3s" | ||
|
||
[[inputs.mongodb]] | ||
servers = ["mongodb://mongodb:27017"] | ||
|
||
[[outputs.file]] | ||
files = ["stdout"] |
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,42 @@ | ||
version: '3' | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: telegraf | ||
MYSQL_DATABASE: telegraf | ||
MYSQL_USER: telegraf | ||
MYSQL_PASSWORD: telegraf | ||
maria: | ||
image: mariadb | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: telegraf | ||
MYSQL_DATABASE: telegraf | ||
MYSQL_USER: telegraf | ||
MYSQL_PASSWORD: telegraf | ||
command: mysqld --userstat=1 | ||
percona: | ||
image: percona | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: telegraf | ||
MYSQL_DATABASE: telegraf | ||
MYSQL_USER: telegraf | ||
MYSQL_PASSWORD: telegraf | ||
|
||
telegraf: | ||
image: glinton/scratch | ||
depends_on: | ||
- mysql | ||
- maria | ||
- percona | ||
volumes: | ||
- ./telegraf.conf:/telegraf.conf | ||
- ../../../../telegraf:/telegraf | ||
entrypoint: | ||
- /telegraf | ||
- --config | ||
- /telegraf.conf |
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,61 @@ | ||
# Uncomment each input as needed to test plugin | ||
|
||
## mysql | ||
#[[inputs.mysql]] | ||
# servers = ["root:telegraf@tcp(mysql:3306)/"] | ||
# gather_table_schema = true | ||
# gather_process_list = true | ||
# gather_user_statistics = true | ||
# gather_info_schema_auto_inc = true | ||
# gather_innodb_metrics = true | ||
# gather_slave_status = true | ||
# gather_binary_logs = false | ||
# gather_table_io_waits = true | ||
# gather_table_lock_waits = true | ||
# gather_index_io_waits = true | ||
# gather_event_waits = true | ||
# gather_file_events_stats = true | ||
# gather_perf_events_statements = true | ||
# interval_slow = "30m" | ||
# table_schema_databases = [] | ||
# | ||
## mariadb | ||
#[[inputs.mysql]] | ||
# servers = ["root:telegraf@tcp(maria:3306)/"] | ||
# gather_table_schema = true | ||
# gather_process_list = true | ||
# gather_user_statistics = true | ||
# gather_info_schema_auto_inc = true | ||
# gather_innodb_metrics = true | ||
# gather_slave_status = true | ||
# gather_binary_logs = false | ||
# gather_table_io_waits = true | ||
# gather_table_lock_waits = true | ||
# gather_index_io_waits = true | ||
# gather_event_waits = true | ||
# gather_file_events_stats = true | ||
# gather_perf_events_statements = true | ||
# interval_slow = "30m" | ||
# table_schema_databases = [] | ||
|
||
# percona | ||
[[inputs.mysql]] | ||
servers = ["root:telegraf@tcp(percona:3306)/"] | ||
gather_table_schema = true | ||
gather_process_list = true | ||
gather_user_statistics = true | ||
gather_info_schema_auto_inc = true | ||
gather_innodb_metrics = true | ||
gather_slave_status = true | ||
gather_binary_logs = false | ||
gather_table_io_waits = true | ||
gather_table_lock_waits = true | ||
gather_index_io_waits = true | ||
gather_event_waits = true | ||
gather_file_events_stats = true | ||
gather_perf_events_statements = true | ||
interval_slow = "30m" | ||
table_schema_databases = [] | ||
|
||
[[outputs.file]] | ||
files = ["stdout"] |