https://github.com/ishantanu/gcp-status-exporter
A Prometheus Exporter for generating metrics for GCP Service Status and Incidents :rocket:
https://github.com/ishantanu/gcp-status-exporter
gcp opentelemetry prometheus-exporter sre
Last synced: 9 months ago
JSON representation
A Prometheus Exporter for generating metrics for GCP Service Status and Incidents :rocket:
- Host: GitHub
- URL: https://github.com/ishantanu/gcp-status-exporter
- Owner: ishantanu
- License: apache-2.0
- Created: 2022-04-07T13:21:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-17T08:57:19.000Z (over 3 years ago)
- Last Synced: 2024-06-20T21:02:36.779Z (almost 2 years ago)
- Topics: gcp, opentelemetry, prometheus-exporter, sre
- Language: Go
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://status.cloud.google.com/incidents.json)
## Components
* [Opentelemetry](https://github.com/open-telemetry/opentelemetry-go) library is used for creating metrics.
* [logrus](https://github.com/sirupsen/logrus) for structured logging.
* [cobra](https://github.com/spf13/cobra) for creating a CLI application.
## Metrics
List of metrics created by this exporter is listed [here](./metrics.md) along with the description.
## Building the Exporter
```bash
$ 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
```bash
$ 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
```yaml
scrape_configs:
- job_name: 'gcp-status-exporter'
static_configs:
- targets: [':8888']
```