logspout-newrelic

command module
v0.0.0-...-7393a16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 3 Imported by: 0

README

Newrelic LogSpout

A Docker image to stream logs from your containers to Newrelic. Based on LogDNA Logspout.

NOTE: This is not production ready.

How to Use

Environment Variables

The following variables can be used to tune LogSpout for specific use cases.

Log Router Specific
  • FILTER_NAME: Filter by Container Name with Wildcards, Optional
  • FILTER_ID: Filter by Container ID with Wildcards, Optional
  • FILTER_SOURCES: Filter by Comma-Separated List of Sources, Optional
  • FILTER_LABELS: Filter by Comma-Separated List of Labels, Optional

Note: More information can be found here.

Ingestion Specific
  • NEWRELIC_KEY: Newrelic License Key, Required
  • HOSTNAME: Alternative Hostname, Optional
    • Default: System's Hostname
  • NEWRELIC_URL: Specific Endpoint to Stream Log into, Optional
    • Default: log-api.newrelic.com/log/v1

Note: Logging the LogSpout Container is recommended to keep track of HTTP Request Errors or Exceptions.

Limits
  • FLUSH_INTERVAL: How frequently batches of logs are sent (in milliseconds), Optional
    • Default: 250
  • HTTP_CLIENT_TIMEOUT: Time limit (in seconds) for requests made by this HTTP Client, Optional
  • INACTIVITY_TIMEOUT: How long to wait for inactivity before declaring failure in the Docker API and restarting, Optional
    • Default: 1m
    • Note: More information about the possible values can be found here. Also see time.ParseDuration for valid format as recommended here.
  • MAX_BUFFER_SIZE: The maximum size (in mb) of batches to ship to Newrelic, Optional
    • Default: 2
  • MAX_REQUEST_RETRY: The maximum number of retries for sending a line when there are network failures, Optional
    • Default: 5
Docker

Create and run container named logspout from this image using CLI:

sudo docker run --name="logspout-newrelic" --restart=always \
-d -v=/var/run/docker.sock:/var/run/docker.sock \
-e NEWRELIC_KEY="<Newrelic License Key>" \
mgreenw/logspout-newrelic:latest
Docker Cloud

Append the following to your Docker Cloud stackfile:

logspout-newrelic:
  autoredeploy: true
  deployment_strategy: every_node
  environment:
    - NEWRELIC_KEY="<Newrelic License Key Key>"
  image: mgreenw/logspout-newrelic:latest
  restart: always
  volumes:
    - '/var/run/docker.sock:/var/run/docker.sock'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
adapter
Package adapter is the implementation of Newrelic LogSpout Adapter Package adapter is the implementation of Newrelic LogSpout Adapter
Package adapter is the implementation of Newrelic LogSpout Adapter Package adapter is the implementation of Newrelic LogSpout Adapter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL