pino-influx

Influxdb transport for pino logger

Usage no npm install needed!

<script type="module">
  import pinoInflux from 'https://cdn.skypack.dev/pino-influx';
</script>

README

pino-infuxdb

Influxdb transport for pino logger

How to install

Install globally by running:

$ npm i -g pino-influxdb

How to use

Usage is done by piping. You pipe your process output to pino-influxdb like so:

$ node your-program-that-outputs-pino-json | pino-influxdb --host http://somehost:8086 --database logs --measurement log

Command Line options

  --help           Show help                                           [boolean]                                                                                                               
  --version        Show version number                                 [boolean]                                                                                                               
  --echo           Echo the logs                       [boolean] [default: true]                                                                                                               
  --measurement    The measurement name                         [default: "log"]                                                                                                               
  --database       The database name. Will be created if missing.                                                                                                                              
                                                               [default: "logs"]                                                                                                               
  --host           Influx db host url.                                                                                                                                            
                                     [string] [default: "http://localhost:8086"]                                                                                                               
  --tags           List of tags    [array] [default: ["pid","hostname","level"]] 

License

This package is licensed under MIT license