Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
/ historymanager Public archive

Let's scrape the Alertmanager history

License

Notifications You must be signed in to change notification settings

nais/historymanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Let's scrape the Alertmanager history

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •