Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue #67 to support logtail plug-in config CRUD
- add test cases / API reference as well
- Loading branch information
Showing
11 changed files
with
417 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"configName": "docker-stdout-config", | ||
"inputDetail": { | ||
"plugin": { | ||
"inputs": [ | ||
{ | ||
"detail": { | ||
"ExcludeLabel": {}, | ||
"IncludeLabel": {} | ||
}, | ||
"type": "service_docker_stdout" | ||
} | ||
] | ||
} | ||
}, | ||
"inputType": "plugin", | ||
"outputDetail": { | ||
"logstoreName": "logstore" | ||
} | ||
} |
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,49 @@ | ||
{ | ||
"configName": "json_4_docker", | ||
"inputDetail": { | ||
"dockerExcludeLabel": { | ||
"k2": "v2" | ||
}, | ||
"dockerFile": true, | ||
"dockerIncludeLabel": { | ||
"k1": "v1" | ||
}, | ||
|
||
"logType": "json_log", | ||
"filePattern": "test.log", | ||
"logPath": "/json_1", | ||
"timeFormat": "%Y-%M-%D", | ||
"timeKey": "my_key_time", | ||
|
||
"localStorage": false, | ||
"enableRawLog": true, | ||
"topicFormat": "(file_reg_for_topic).*", | ||
"fileEncoding": "gbk", | ||
"maxDepth": 200, | ||
"preserve": false, | ||
"preserveDepth": 3, | ||
"filterKey": [ | ||
"filter_reg1", | ||
"filter_reg2" | ||
], | ||
"filterRegex": [ | ||
"`12[];',./~!@#$%^&*(){}:\"<>?", | ||
"`12[];',./~!@#$%^&*(){}:\"<>?" | ||
], | ||
|
||
"adjustTimezone": false, | ||
"delayAlarmBytes": 0, | ||
"discardNonUtf8": false, | ||
"discardUnmatch": true, | ||
"enableTag": false, | ||
"maxSendRate": -1, | ||
"mergeType": "topic", | ||
"shardHashKey": [], | ||
"tailExisted": false | ||
|
||
}, | ||
"inputType": "file", | ||
"outputDetail": { | ||
"logstoreName": "logstore" | ||
} | ||
} |
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,29 @@ | ||
{ | ||
"configName": "mysql-binlog-config", | ||
"inputDetail": { | ||
"plugin": { | ||
"inputs": [ | ||
{ | ||
"detail": { | ||
"ExcludeTables": [ | ||
"mysql\\..*" | ||
], | ||
"Host": "************.mysql.rds.aliyuncs.com", | ||
"IncludeTables": [ | ||
".*\\..*" | ||
], | ||
"Password": "*******", | ||
"ServerID": 32355, | ||
"TextToString": true, | ||
"User": "********" | ||
}, | ||
"type": "service_canal" | ||
} | ||
] | ||
} | ||
}, | ||
"inputType": "plugin", | ||
"outputDetail": { | ||
"logstoreName": "logstore" | ||
} | ||
} |
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,31 @@ | ||
{ | ||
"configName": "mysql-rawsql-config", | ||
"inputDetail": { | ||
"plugin": { | ||
"inputs": [ | ||
{ | ||
"detail": { | ||
"Address": "************.mysql.rds.aliyuncs.com", | ||
"CheckPoint": true, | ||
"CheckPointColumn": "time", | ||
"CheckPointColumnType": "time", | ||
"CheckPointSavePerPage": true, | ||
"CheckPointStart": "2018-01-01 00:00:00", | ||
"DataBase": "****", | ||
"IntervalMs": 60000, | ||
"Limit": true, | ||
"PageSize": 100, | ||
"Password": "*******", | ||
"StateMent": "select * from db.VersionOs where time > ?", | ||
"User": "****" | ||
}, | ||
"type": "service_mysql" | ||
} | ||
] | ||
} | ||
}, | ||
"inputType": "plugin", | ||
"outputDetail": { | ||
"logstoreName": "logstore" | ||
} | ||
} |
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,45 @@ | ||
{ | ||
"configName": "nginx-status-config", | ||
"inputDetail": { | ||
"plugin": { | ||
"inputs": [ | ||
{ | ||
"detail": { | ||
"Addresses": [ | ||
"http://**********/****" | ||
], | ||
"IncludeBody": true, | ||
"IntervalMs": 10000 | ||
}, | ||
"type": "metric_http" | ||
} | ||
], | ||
"processors": [ | ||
{ | ||
"detail": { | ||
"FullMatch": true, | ||
"KeepSource": false, | ||
"Keys": [ | ||
"connection", | ||
"accepts", | ||
"handled", | ||
"requests", | ||
"reading", | ||
"writing", | ||
"waiting" | ||
], | ||
"NoKeyError": true, | ||
"NoMatchError": true, | ||
"Regex": "Active connections: (\\d+)\\s+server accepts handled requests\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+Reading: (\\d+) Writing: (\\d+) Waiting: (\\d+)[\\s\\S]*", | ||
"SourceKey": "content" | ||
}, | ||
"type": "processor_regex" | ||
} | ||
] | ||
} | ||
}, | ||
"inputType": "plugin", | ||
"outputDetail": { | ||
"logstoreName": "logstore" | ||
} | ||
} |
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,49 @@ | ||
{ | ||
"configName": "reg_4_docker", | ||
"inputDetail": { | ||
"dockerExcludeLabel": { | ||
"k2": "v2" | ||
}, | ||
"dockerFile": true, | ||
"dockerIncludeLabel": { | ||
"k1": "v1" | ||
}, | ||
|
||
"logType": "json_log", | ||
"filePattern": "test.log", | ||
"logPath": "/json_1", | ||
"timeFormat": "%Y-%M-%D", | ||
"timeKey": "my_key_time", | ||
|
||
"localStorage": false, | ||
"enableRawLog": true, | ||
"topicFormat": "(file_reg_for_topic).*", | ||
"fileEncoding": "gbk", | ||
"maxDepth": 200, | ||
"preserve": false, | ||
"preserveDepth": 3, | ||
"filterKey": [ | ||
"filter_reg1", | ||
"filter_reg2" | ||
], | ||
"filterRegex": [ | ||
"`12[];',./~!@#$%^&*(){}:\"<>?", | ||
"`12[];',./~!@#$%^&*(){}:\"<>?" | ||
], | ||
|
||
"adjustTimezone": false, | ||
"delayAlarmBytes": 0, | ||
"discardNonUtf8": false, | ||
"discardUnmatch": true, | ||
"enableTag": false, | ||
"maxSendRate": -1, | ||
"mergeType": "topic", | ||
"shardHashKey": [], | ||
"tailExisted": false | ||
|
||
}, | ||
"inputType": "file", | ||
"outputDetail": { | ||
"logstoreName": "logstore" | ||
} | ||
} |
Oops, something went wrong.