项目作者: utilitywarehouse

项目描述 :
Cycles AWS nodes to the current ASG launch configuration
高级语言: Shell
项目地址: git://github.com/utilitywarehouse/kube-aws-updater.git
创建时间: 2018-01-10T14:40:54Z
项目社区:https://github.com/utilitywarehouse/kube-aws-updater

开源协议:MIT License

下载


Pushing logs to Loki

Install

  1. cd /usr/local/bin
  2. curl -O -L "https://github.com/grafana/loki/releases/latest/download/promtail-linux-amd64.zip"
  3. unzip promtail-linux-amd64.zip
  4. rm promtail-linux-amd64.zip
  5. mv promtail-linux-amd64 promtail
  6. sudo chmod a+x promtail

macOS Install

  1. brew install promtail

Usage

To enable pushing logs to loki pass -l arg to the script along with the path
to a valid promtail config file:

  1. ./kube-aws-updater -c exp-1-aws -r master -p uw-dev-system-admin -n 3 -l promtail.conf

This will run promtail as a background process within the context of the script
which will gracefully terminate along with the script.

This will redirect stdout and stderr via tee which route the output both to
console and to a file called kube-updater.log in the current directory.

Promtail is by default configured to monitor, read and push files in the
current directory with a .log suffix.

Promtail will by default push the log line to the prod aws loki deployment
https://loki.prod.aws.uw.systems/api/prom/push,

Promtail will by default track file positions and push progress in
/tmp/positions.yaml

The log lines will currently be annoted with the following:

  • context which is the kube context currently being operated on ie
    exp-merit-1
  • host which is the hostname of the device the script is currently being
    executed on ie jake-desktop