scottish

1.0.0 • Public • Published

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"]
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i scottish

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • zenkilies