historymanager

command module
v0.0.0-...-2790e15 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 10 Imported by: 0

README

historymanager

Let's scrape the Alertmanager history

Prerequisites

Tools needed: gcloud, og bq

export PROJECT_ID=aura-prod-d7e3
export EMAIL=alert-history
export DATASET=alert_history
export TABLE=alerts
gcloud iam --project "$PROJECT_ID" \
  service-accounts create "$EMAIL" \
  --description="Manually created service-account for $EMAIL"

bq mk --project_id "$PROJECT_ID" --location europe-north1 "$DATASET"

bq mk --table "$PROJECT_ID:$DATASET.$TABLE" schema.json

bq add-iam-policy-binding \
  --member="serviceAccount:$EMAIL@$PROJECT_ID.iam.gserviceaccount.com" \
  --role=roles/bigquery.dataEditor \
  "$PROJECT_ID:$DATASET.$TABLE"

gcloud iam service-accounts keys create sa.json \
    --iam-account=$EMAIL@$PROJECT_ID.iam.gserviceaccount.com

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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