Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iam-medvedev/ovh-public-cloud-exporter

Prometheus exporter for OVH Public Cloud with S3 support
https://github.com/iam-medvedev/ovh-public-cloud-exporter

Last synced: 25 days ago
JSON representation

Prometheus exporter for OVH Public Cloud with S3 support

Awesome Lists containing this project

README

        

# `ovh-public-cloud-exporter`

[Prometheus](https://prometheus.io/) exporter for [OVH Public Cloud](https://www.ovhcloud.com/en/public-cloud/) with S3 support.

- [`ovh-public-cloud-exporter`](#ovh-public-cloud-exporter)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Generating OVH API Keys](#generating-ovh-api-keys)
- [Environment Variables](#environment-variables)
- [Docker](#docker)
- [Docker Compose](#docker-compose)
- [Grafana](#grafana)
- [License](#license)

## Getting Started

### Prerequisites

To use this exporter, you'll need to have an OVH account and API keys.

### Generating OVH API Keys

1. Log in to your [OVH API](https://api.ovh.com/).
2. Navigate to "New API Key" in the API console.
3. Fill in the required fields:
- **Application Key**: This is your OVH application key.
- **Application Secret**: This is your OVH application secret.
- **Consumer Key**: This is your OVH consumer key.
- **API Endpoint**: Choose the appropriate endpoint for your region (e.g., `ovh-eu` for Europe).
4. Save your API keys.

P.S. If you have registered in another region, see [this](https://github.com/ovh/node-ovh/?tab=readme-ov-file#1-create-an-application) for more information.

### Environment Variables

Set the following environment variables to configure the exporter:

| Environment Variable | Description | Default Value |
| -------------------- | ------------------------------------------ | --------------- |
| `OVH_ENDPOINT` | The endpoint for the OVH API | - |
| `OVH_APP_KEY` | The application key for OVH API | - |
| `OVH_APP_SECRET` | The application secret for OVH API | - |
| `OVH_CONSUMER_KEY` | The consumer key for OVH API | - |
| `OVH_PROJECT_ID` | The project ID for OVH | - |
| `COLLECTOR_INTERVAL` | Interval for the collector in milliseconds | 600000 (10 min) |
| `HOSTNAME` | The hostname or address to bind to | 0.0.0.0 |
| `PORT` | The port on which the service runs | 9140 |
| `PATHNAME` | The path where metrics are exposed | /metrics |
| `DEBUG` | Use `ovh-exporter` for debug | - |

### Docker

To run the exporter using Docker use this command:

```sh
docker run -d \
-e OVH_ENDPOINT= \
-e OVH_APP_KEY= \
-e OVH_APP_SECRET= \
-e OVH_CONSUMER_KEY= \
-e OVH_PROJECT_ID= \
-e COLLECTOR_INTERVAL=600000 \
-e PORT=9140 \
-e HOSTNAME=0.0.0.0 \
-e PATHNAME=/metrics \
-p 9140:9140 \
ghcr.io/iam-medvedev/ovh-public-cloud-exporter:latest
```

After running the container, the metrics will be available at http://localhost:9140/metrics.

### Docker Compose

You can also use Docker Compose to manage the exporter. Create a `docker-compose.yml` file with the following content:

```yaml
version: "3"

services:
ovh-public-cloud-exporter:
image: ghcr.io/iam-medvedev/ovh-public-cloud-exporter:latest
environment:
- OVH_ENDPOINT=ovh-eu
- OVH_APP_KEY=your_app_key
- OVH_APP_SECRET=your_app_secret
- OVH_CONSUMER_KEY=your_consumer_key
- OVH_PROJECT_ID=your_project_id
- COLLECTOR_INTERVAL=600000
- PORT=9140
- HOSTNAME=0.0.0.0
- PATHNAME=/metrics
ports:
- "9140:9140"
```

## Grafana

To visualize the data, you can use [this](./dashboard.json) dashboard for [Grafana](https://grafana.com/).

See how to import dashboards from JSON [here](https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/import-dashboards/).

## License

`esbuild-plugin-less` is [WTFPL licensed](./LICENSE).