2023-10-22 16:59:09 +02:00
|
|
|
# Prometheus Jellyseer Exporter
|
|
|
|
|
|
|
|
This is an exporter that exposes information gathered from Jellyseer for use by the Prometheus monitoring system.
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Requires Python 3.9 or better.
|
|
|
|
|
|
|
|
## Using docker
|
|
|
|
|
|
|
|
```
|
|
|
|
docker pull git.hipstercat.fr/hipstercat/jellyseer-exporter:main
|
|
|
|
```
|
|
|
|
|
|
|
|
Example: Display usage message:
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run -it --rm git.hipstercat.fr/hipstercat/jellyseer-exporter:main --help
|
|
|
|
```
|
|
|
|
|
|
|
|
Example: Run the image with a mounted configuration file and published port:
|
|
|
|
```
|
2023-10-28 21:49:54 +02:00
|
|
|
docker run --init --name prometheus-jellyseer-exporter -d -p 127.0.0.1:9223:9223 -v /path/to/jellyseer.yml:/etc/jellyseer.yml git.hipstercat.fr/hipstercat/jellyseer-exporter:main
|
2023-10-22 16:59:09 +02:00
|
|
|
```
|
|
|
|
Prometheus Jellyseer Exporter will now be reachable at http://localhost:9223/.
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Visit http://localhost:9223/jellyseer?target=1.2.3.4 where 1.2.3.4
|
|
|
|
is the IP of the Jellyseer server to get metrics from. Specify the `module`
|
|
|
|
request parameter, to choose which module to use from the config file.
|
|
|
|
|
|
|
|
The `target` request parameter defaults to `localhost`. Hence if
|
|
|
|
`jellyseer_exporter` is deployed directly on the jellyseer host, `target`
|
|
|
|
can be omitted.
|
|
|
|
|
|
|
|
## Authentication
|
|
|
|
|
|
|
|
**Using jellyseer.yml config file**
|
|
|
|
|
|
|
|
Example `jellyseer.yml` for token authentication:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
default:
|
|
|
|
api_key: "your token"
|
|
|
|
verify_ssl: true
|
|
|
|
```
|
|
|
|
|
|
|
|
## Prometheus Configuration
|
|
|
|
|
|
|
|
The Jellyseer exporter can be deployed either directly on a Jellyseer server or
|
|
|
|
onto a separate machine.
|
|
|
|
|
|
|
|
Example config for Jellyseer exporter running on Jellyseer server:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
scrape_configs:
|
|
|
|
- job_name: 'jellyseer'
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- 192.168.1.2:9223 # Jellyseer server with Jellyseer exporter.
|
2023-10-28 21:49:54 +02:00
|
|
|
metrics_path: /jellyseer
|
2023-10-22 16:59:09 +02:00
|
|
|
params:
|
|
|
|
module: [default]
|
|
|
|
```
|
|
|
|
|
|
|
|
Example config for Jellyseer exporter running on Prometheus host:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
scrape_configs:
|
|
|
|
- job_name: 'jellyseer'
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- 192.168.1.2 # Jellyseer server.
|
|
|
|
metrics_path: /jellyseer
|
|
|
|
params:
|
|
|
|
module: [default]
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [__address__]
|
|
|
|
target_label: __param_target
|
|
|
|
- source_labels: [__param_target]
|
|
|
|
target_label: instance
|
|
|
|
- target_label: __address__
|
|
|
|
replacement: 127.0.0.1:9223 # Jellyseer exporter.
|
|
|
|
```
|