-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
420 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,8 @@ xoxys | |
Proxmox | ||
VE | ||
TBD | ||
PVE | ||
SELinux | ||
CLI | ||
JSON | ||
toc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
baseURL: https://prometheus-pve-sd.geekdocs.de/ | ||
title: prometheus-pve-sd | ||
theme: hugo-geekdoc | ||
pygmentsUseClasses: true | ||
pygmentsCodeFences: true | ||
|
||
# Geekdoc configuration | ||
disablePathToLower: true | ||
enableGitInfo: true | ||
|
||
# Needed for mermaid/katex shortcodes | ||
markup: | ||
goldmark: | ||
renderer: | ||
unsafe: true | ||
tableOfContents: | ||
startLevel: 1 | ||
|
||
params: | ||
geekdocMenuBundle: true | ||
geekdocToC: 3 | ||
|
||
geekdocRepo: https://github.com/thegeeklab/prometheus-pve-sd | ||
geekdocEditPath: edit/main/docs/content | ||
|
||
geekdocDateFormat: "Jan 2, 2006" | ||
geekdocSearch: true | ||
|
||
geekdocLegalNotice: https://thegeeklab.de/legal-notice/#contact-information | ||
geekdocPrivacyPolicy: https://thegeeklab.de/legal-notice/#privacy-policy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Documentation | ||
--- | ||
|
||
[![Build Status](https://img.shields.io/drone/build/thegeeklab/prometheus-pve-sd?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/prometheus-pve-sd) | ||
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/prometheus-pve-sd) | ||
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/prometheus-pve-sd) | ||
[![Python Version](https://img.shields.io/pypi/pyversions/prometheus-pve-sd.svg)](https://pypi.org/project/prometheus-pve-sd/) | ||
[![PyPI Status](https://img.shields.io/pypi/status/prometheus-pve-sd.svg)](https://pypi.org/project/prometheus-pve-sd/) | ||
[![PyPI Release](https://img.shields.io/pypi/v/prometheus-pve-sd.svg)](https://pypi.org/project/prometheus-pve-sd/) | ||
[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/prometheus-pve-sd)](https://github.com/thegeeklab/prometheus-pve-sd/graphs/contributors) | ||
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/prometheus-pve-sd) | ||
[![License: MIT](https://img.shields.io/github/license/thegeeklab/prometheus-pve-sd)](https://github.com/thegeeklab/prometheus-pve-sd/blob/main/LICENSE) | ||
|
||
This project provides a simple custom service discovery for [Prometheus](https://prometheus.io/). It is using the Proxmox PVE API to fetch Hosts and it's meta information to generate a Prometheus compatible [file based](https://prometheus.io/docs/guides/file-sd/) service discovery. Releases are available as Python Packages on [GitHub](https://github.com/thegeeklab/prometheus-pve-sd/releases) or [PyPI](https://pypi.org/project/prometheus-pve-sd/) and as Docker Image on [Docker Hub](https://hub.docker.com/r/thegeeklab/prometheus-pve-sd). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Configuration | ||
--- | ||
|
||
Changes can be made on different locations which will be processed in the following order (last wins): | ||
|
||
- default configuration (build-in) | ||
- global configuration file (path depends on your operating system) | ||
- user-defined configuration file | ||
- environment variables | ||
- CLI options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: CLI options | ||
--- | ||
|
||
You can get all available CLI options by running `prometheus-pve-sd --help`: | ||
|
||
<!-- prettier-ignore-start --> | ||
<!-- spellchecker-disable --> | ||
{{< highlight Shell "linenos=table" >}} | ||
$ prometheus-pve-sd --help | ||
usage: prometheus-pve-sd [-h] [-c CONFIG_FILE] [-o OUTPUT_FILE] [-d LOOP_DELAY] [--no-service] [-f LOG_FORMAT] [-v] [-q] [--version] | ||
|
||
Prometheus Service Discovery for Proxmox VE | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
-c CONFIG_FILE, --config CONFIG_FILE | ||
location of configuration file | ||
-o OUTPUT_FILE, --output OUTPUT_FILE | ||
output file | ||
-d LOOP_DELAY, --loop-delay LOOP_DELAY | ||
delay between discovery runs | ||
--no-service run discovery only once | ||
-f LOG_FORMAT, --log-format LOG_FORMAT | ||
used log format | ||
-v increase log level | ||
-q decrease log level | ||
--version show program's version number and exit | ||
{{< /highlight >}} | ||
<!-- spellchecker-enable --> | ||
<!-- prettier-ignore-end --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: Default settings | ||
--- | ||
|
||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-disable --> | ||
<!-- spellchecker-disable --> | ||
{{< highlight YAML "linenos=table" >}} | ||
--- | ||
logging: | ||
# supported log levels: debug|info|warning|error|critical | ||
level: warning | ||
# supported log formats: console|json|simple | ||
format: console | ||
|
||
output_file: | ||
loop_delay: 300 | ||
# Run pve sd in a loop and discover hosts every n seconds (as defined in loop_delay). | ||
# Can be disabled to run disovery only once. | ||
service: true | ||
|
||
exclude_state: [] | ||
exclude_vmid: [] | ||
|
||
pve: | ||
server: | ||
user: | ||
password | ||
auth_timeout: 5 | ||
verify_ssl: true | ||
|
||
# Example | ||
# pve: | ||
# server: proxmox.example.com | ||
# user: root | ||
# password: secure | ||
# auth_timeout: 5 | ||
# verify_ssl: true | ||
{{< /highlight >}} | ||
<!-- spellchecker-enable --> | ||
<!-- markdownlint-restore --> | ||
<!-- prettier-ignore-end --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Environment Variables | ||
--- | ||
|
||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-disable --> | ||
<!-- spellchecker-disable --> | ||
{{< highlight Shell "linenos=table" >}} | ||
PROMETHEUS_PVE_SD_CONFIG_FILE= | ||
# supported log levels: debug|info|warning|error|critical | ||
PROMETHEUS_PVE_SD_LOG_LEVEL=warning | ||
# supported log formats: console|json|simple | ||
PROMETHEUS_PVE_SD_LOG_FORMAT=console | ||
PROMETHEUS_PVE_SD_OUTPUT_FILE= | ||
PROMETHEUS_PVE_SD_LOOP_DELAY=300 | ||
# Run pve sd in a loop and discover hosts every n seconds (as defined in PROMETHEUS_PVE_SD_LOOP_DELAY). | ||
# Can be disabled to run disovery only once. | ||
PROMETHEUS_PVE_SD_SERVICE=true | ||
PROMETHEUS_PVE_SD_EXCLUDE_STATE= | ||
PROMETHEUS_PVE_SD_EXCLUDE_VMID= | ||
PROMETHEUS_PVE_SD_PVE_SERVER= | ||
PROMETHEUS_PVE_SD_PVE_USER= | ||
PROMETHEUS_PVE_SD_PVE_PASSWORD= | ||
PROMETHEUS_PVE_SD_PVE_AUTH_TIMEOUT=5 | ||
PROMETHEUS_PVE_SD_PVE_VERIFY_SSL=true | ||
{{< /highlight >}} | ||
<!-- spellchecker-enable --> | ||
<!-- markdownlint-restore --> | ||
<!-- prettier-ignore-end --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Setup | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: Using docker | ||
--- | ||
|
||
<!-- prettier-ignore-start --> | ||
<!-- spellchecker-disable --> | ||
{{< highlight Shell "linenos=table" >}} | ||
docker run \ | ||
-e PROMETHEUS_PVE_SD_LOG_LEVEL=info \ | ||
-e PROMETHEUS_PVE_SD_LOG_FORMAT=console \ | ||
-e PROMETHEUS_PVE_SD_OUTPUT_FILE=/out/pve.json \ | ||
-e PROMETHEUS_PVE_SD_SERVICE=false \ | ||
-e PROMETHEUS_PVE_SD_PVE_SERVER=pve.example.com \ | ||
-e PROMETHEUS_PVE_SD_PVE_USER=root \ | ||
-e PROMETHEUS_PVE_SD_PVE_PASSWORD=secure \ | ||
-e PY_COLORS=1 \ | ||
-v $(pwd):/out \ | ||
thegeeklab/prometheus-pve-sd | ||
{{< /highlight >}} | ||
<!-- spellchecker-enable --> | ||
<!-- prettier-ignore-end --> | ||
|
||
{{< hint info >}} | ||
**Info**\ | ||
Keep in mind, that you have to pass SELinux labels (:Z or :z) to your mount option if you are working on SELinux enabled systems. | ||
{{< /hint >}} |
Oops, something went wrong.