scottish
v1.0.0
Published
Just another tool to transfer the log from file to InfluxDB.
Readme
Terrier
Just another tool to transfer the log from file to InfluxDB.
Usage
Example "default.conf.json" file:
{
"instance1": {
"input": {
"kind": "regexp",
"parserFormat": "(.*) - - \\[(.*)\\] \"(.*) (.*) (.*)\" (.*) (.*) \"(.*)\" \"(.*)\"",
"parserField": ["clientIp", "timestamp", "method", "path", "protocol", "statusCode", "contentLength", "hostname", "client"],
"filePath": "/var/log/item.sendo.vn-access.log"
},
"output": {
"host": "influx.bmc.sendo.vn",
"port": 80,
"database": "example",
"measurement": "item-sendo-vn-access",
"outputTags": ["clientIp", "method", "statusCode"],
"outputFields": ["path", "protocol", "client"]
}
},
"instance2": {
"input": {
"kind": "json",
"filePath": "./example.json.log"
},
"output": {
"host": "influx.bmc.sendo.vn",
"port": 80,
"database": "example",
"measurement": "item-sendo-vn-access-json",
"outputTags": ["tag1", "tag2"],
"outputFields": ["field1", "field2"]
}
}
}