Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker compose.compose.yml example + add 2nd Prometheus scrape_configs example without Kubernetes - local only #194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,27 @@ scrape_configs:
target_label: __address__
replacement: ${1}:9219
```
Another Prometheus scrape-config example for usage of this "file" prober to check the expiry of local certificate files without Kubernetes:

```yml
scrape_configs:
- job_name: 'ssl-local-file'
scrape_interval: 60s
static_configs:
- targets:
- /etc/easyrsa/pki/*.crt # example for easyrsa .crt files
- /etc/easyrsa/pki/issued/*.crt # example for easyrsa .crt files
metrics_path: /probe
params:
module: [file]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9219 # The exporter's real hostname:port
```

### HTTP File

Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# example docker compose file
services:
exporter:
image: ribbybibby/ssl-exporter:latest # or use specific version e.g. ribbybibby/ssl-exporter:2.4.3
command: --web.listen-address=":9219" --log.level="info"
restart: always
user: 0:0 # UID:GID - attention: user/group need read permissions to SSL-certificate files to be checked
#volumes:
# - /etc/easyrsa/pki/issued:/mnt/ssl-certs:ro
ports:
- 9219:9219
#logging:
#driver: none