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

https://github.com/hansmi/prometheus-ai-on-the-edge-device-exporter

Prometheus metrics for AI-on-the-edge devices
https://github.com/hansmi/prometheus-ai-on-the-edge-device-exporter

ai-on-edge esp32 esp32-cam prometheus-exporter

Last synced: 3 months ago
JSON representation

Prometheus metrics for AI-on-the-edge devices

Awesome Lists containing this project

README

        

# Prometheus metrics for AI-on-the-edge devices

[![Latest release](https://img.shields.io/github/v/release/hansmi/prometheus-ai-on-the-edge-device-exporter)][releases]
[![CI workflow](https://github.com/hansmi/prometheus-ai-on-the-edge-device-exporter/actions/workflows/ci.yaml/badge.svg)](https://github.com/hansmi/prometheus-ai-on-the-edge-device-exporter/actions/workflows/ci.yaml)
[![Go reference](https://pkg.go.dev/badge/github.com/hansmi/prometheus-ai-on-the-edge-device-exporter.svg)](https://pkg.go.dev/github.com/hansmi/prometheus-ai-on-the-edge-device-exporter)

A [Prometheus metrics][prometheus] exporter for [AI-on-the-edge
devices][aiontheedge], an artificial intelligence-based system to digitize
analog measurements by meters (water, gas, power, etc.) running on ESP32
microcontrollers.

## Usage

```shell
docker run --rm -p 8081:8081 ghcr.io/hansmi/prometheus-ai-on-the-edge-device-exporter:latest
```

The exporter expects probe requests on the `/probe` endpoint. A single URL
query parameter named `target` specifies the target URL.

```shell
$ curl http://localhost:8081/probe?target=http://water

ai_on_the_edge_device_cpu_temperature_celsius 46
ai_on_the_edge_device_flow_value{name="main"} 12.345

```

## Scrape config

Example configuration for Prometheus:

```yaml
scrape_configs:

# Metrics of exporter itself
- job_name: ai-on-the-edge-device-exporter
static_configs:
- targets: ["exporter:8081"]

- job_name: ai-on-the-edge-device
metrics_path: /probe
static_configs:
- targets:
- http://water
- http://gas
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: "exporter:8081"
```

## Installation

[Pre-built binaries][releases]:

* Binary archives (`.tar.gz`)
* Debian/Ubuntu (`.deb`)
* RHEL/Fedora (`.rpm`)
* Microsoft Windows (`.zip`)

Docker images via GitHub's container registry:

```shell
docker pull ghcr.io/hansmi/prometheus-ai-on-the-edge-device-exporter
```

With the source being available it's also possible to produce custom builds
directly using [Go][golang] or [GoReleaser][goreleaser].

[aiontheedge]: https://github.com/jomjol/AI-on-the-edge-device
[golang]: https://golang.org/
[goreleaser]: https://goreleaser.com/
[prometheus]: https://prometheus.io/
[releases]: https://github.com/hansmi/prometheus-ai-on-the-edge-device-exporter/releases/latest