springparse

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 27 Imported by: 0

README

Configurations

Configurations are set during startup.

Environment Variables

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_SESSION_TOKEN
  • AWS_REGION:
  • AWS_ELASTICSEARCH_URL: URL for the elasticsearch domain. (required)
  • HOST_PORT: The default port the server is hosted on. Default 8080
  • LOG_PREFIX: The log prefix when indexing to elasticsearch. (required)
  • LOG_DIRECTORY: The logs directory the software listens to. (required) If you mount the volumne to /var/log/ it would be /var/log/containers.
  • SERVICE_REGEX: The regex of the log you want springparse to listen to. E.g foo&bar, aaa&bbb means any log file that matches the regex *foo*bar* or *aaa*bbb*. (required)

prometheus metrics

  • springparse_putsuccess: The number of successful puts to elasticsearch index
  • springparse_putfailed: The number of failed puts to elasticsearch index

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client the struct that runs the program

func New

func New() *Client

New creates a client struct with map initialized

func (*Client) Server

func (r *Client) Server() error

Server host a metric server so SRE can grab metrics

func (*Client) ShowConfiguration

func (r *Client) ShowConfiguration()

ShowConfiguration shows the environment variables being set

func (*Client) SpringParse

func (r *Client) SpringParse()

SpringParse This is the main program

func (*Client) ValidateAwsEnv

func (r *Client) ValidateAwsEnv() error

ValidateAwsEnv validates all aws related configration and set defaults from environment variables

func (*Client) ValidateOtherEnv

func (r *Client) ValidateOtherEnv() error

ValidateOtherEnv validates all system info from environment variables.

type Runner

type Runner struct {
	Buffer   *elasticOut
	BufferId string
}

Runner Runner spawn by go routine

Jump to

Keyboard shortcuts

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