An exporter to get metrics for availability status of GCP services and observe the incident impacts in GCP environments

  • By Shantanu Deshpande
  • Last update: Apr 7, 2022
  • Comments: 0

GCP Status Exporter

An exporter to get metrics for availability status of GCP services and observe the incident impacts in GCP environments.

Note: This is a work in progress. Contributions are welcome.

Approach

Components

  • Opentelemetry library is used for creating metrics.
  • logrus for structured logging.
  • cobra for creating a CLI application.

Metrics

List of metrics created by this exporter is listed here along with the description.

Building the Exporter

$ git clone https://github.com/ishantanu/gcp-status-exporter
$ go build -o gcp-status-exporter
$ ./gcp-status-exporter start -e https://status.cloud.google.com/incidents.json

Running the Exporter

$ go run main.go start -e https://status.cloud.google.com/incidents.json

Visit http://localhost:8888 for metrics.

Adding gcp-status-exporter config to Prometheus

Add the below block to prometheus config to start scraping the metrics

scrape_configs:
    - job_name: 'gcp-status-exporter'

    static_configs:
    - targets: [':8888']

Download

gcp-status-exporter.zip