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
- GCP incidents older than 30 days are discarded to keep the metrics relevant.
- GCP service status is collected from Google Cloud Status Dashboard's incident history
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']