GithubHelp home page GithubHelp logo

isabella232 / fastly-lem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fastly/fastly-lem

0.0 0.0 0.0 62 KB

Automate the deployment of Live Event Monitoring

License: MIT License

Makefile 3.40% Go 49.04% Vim Snippet 47.56%

fastly-lem's Introduction

fastly-lem

fastly-lem is a tool for helping customers automate the configuration steps necessary for setting up conditionally enabled, advanced logging to BigQuery for a Live Event Monitoring customer event.

The Live Event Monitoring logging configuration requires a specific set of steps in order for it to work correctly. Those steps are

  1. Use our standard Advanced Logging format snippets that automate the deployment of advanced logging metrics.
  2. Configure an Edge Dictionary that allows customers to conditionally turn on and off the logging since it is only needed during the event
  3. Automate the setup of BigQuery as a logging provider as the steps can be a bit cumbersome to do manually

Configuration

fastly-lem takes a parameter -configFile that points to the LEM configuration file, a TOML formatted config file. Currently, the only configuration that customers need to change from the included template file (lem.config.tmpl) is the [bigquery] section. The following fields are included in the configuration:

  • Top level [fastly] block. The params here should not be touched or changed by customers. Inside the [fastly] block are
  • dictionary_name the name of the Edge Dictionary used to conditionally turn on and off logging. This value MUST be lem_logging
  • logging_config_name - The name of the bigQuery configuration in the service. This value MUST be LEMBigQuery
  • sample_rate - A configurable string value between 0 and 100 to determine what percentage of traffic we should log. Useful if traffic volumes are very high and you only want to send a sample of traffic.
  • log_all_errors - A configurable string of 0 (false) or 1 (true) to determine if all errors should be logged regardless of sample_rate of logs. 0 is off and 1 is on.
  • [[fastly.snippet]] - An array of snippets required to make the advanced logging work
  • [bigquery] - Customer specific BigQuery configuration

For your own configuration, copy the template lem.config.tmpl to lem.config in a directory of your choice and edit the copy. Remember to not modify anything underneath the [fastly] configuration.

Running

fastly-lem has 4 flags in order to run

Parameter Required Default Description
configFile YES N/A Path to the config file that fastly-lem will use
token YES N/A Fastly API Key use to publish configuration updates
service YES N/A The ID of the service to use
version NO 0 Version of the service to use. If no version is supplied, fastly-lem will attempt to use the latest available Draft service. If the latest version is active, you will need to first clone your active service in the UI.

Example:

fastly-lem -configFile /tmp/lem.config -token MYFASTLYTOKEN -service MYSERVICEID

fastly-lem's People

Contributors

wjwoodson avatar arpitdesai avatar denen99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.