Compare commits
2 Commits
alloy-upda
...
forgejo
| Author | SHA1 | Date | |
|---|---|---|---|
|
bf8af312eb
|
|||
|
a2f1636ed4
|
@ -88,3 +88,9 @@ SECRET_BASIC_AUTH_VERSION=v1
|
||||
#ALERT_BACKUP_NOT_SUCCESSFULL_ENABLED=true
|
||||
#ALERT_NODE_DISK_SPACE_ENABLED=true
|
||||
#ALERT_NODE_MEMORY_USAGE_ENABLED=true
|
||||
|
||||
# Forgejo metrics
|
||||
# SECRET_FORGEJO_METRICS_TOKEN_VERSION=v1
|
||||
# FORGEJO_METRICS_HOSTNAME=
|
||||
# FORGEJO_INSECURE_SKIP_VERIFY=false
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.forgejo.yml"
|
||||
|
||||
10
compose.forgejo.yml
Normal file
10
compose.forgejo.yml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
secrets:
|
||||
- forgejo_token
|
||||
secrets:
|
||||
forgejo_token:
|
||||
external: true
|
||||
name: ${STACK_NAME}_forgejo_token_${SECRET_FORGEJO_METRICS_TOKEN_VERSION}
|
||||
@ -29,6 +29,22 @@ prometheus.scrape "default" {
|
||||
forward_to = [prometheus.remote_write.prometheus.receiver]
|
||||
}
|
||||
|
||||
{{ if ne (env "FORGEJO_METRICS_HOSTNAME") "" }}
|
||||
prometheus.scrape "forgejo" {
|
||||
bearer_token = "{{ secret "forgejo_token" }}"
|
||||
job_name = "forgejo"
|
||||
scheme = "https"
|
||||
|
||||
targets = [{ __address__ = "{{ env "FORGEJO_METRICS_HOSTNAME" }}" }]
|
||||
forward_to = [prometheus.remote_write.prometheus.receiver]
|
||||
|
||||
tls_config {
|
||||
insecure_skip_verify = {{ env "FORGEJO_INSECURE_SKIP_VERIFY" }}
|
||||
server_name = "{{ env "FORGEJO_METRICS_HOSTNAME" }}"
|
||||
}
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
prometheus.remote_write "prometheus" {
|
||||
endpoint {
|
||||
url = "{{ env "PROMETHEUS_REMOTE_WRITE_URL" }}"
|
||||
|
||||
Reference in New Issue
Block a user