mirror of
https://github.com/h44z/wg-portal
synced 2025-02-26 05:49:14 +00:00
chart: update monitoring resources (#329)
### Monitoring settings: * Disabled rendering of Prometheus resources by default. * Added a new relabeling configuration to replace the `instance` label based on the `app_kubernetes_io_name` label. Instance will be displayed as Helm release name instead of pod IP address. ### Grafana dashboard configuration: * Changed the `interval` field for several metrics queries from `"$__rate_interval"` to `"$interval"`. * Updated the `refresh` interval from `30s` to `1m`. * Added a new variable for `Step Interval` with default value `2m`. ### Chart version update: * Updated the chart version from `0.4.0` to `0.5.0`. Signed-off-by: Dmytro Bondar <git@bonddim.com>
This commit is contained in:
parent
ca6070689e
commit
0f27443ffc
@ -16,7 +16,7 @@ annotations:
|
|||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.4.0
|
version: 0.5.0
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# wg-portal
|
# wg-portal
|
||||||
|
|
||||||
  
|
  
|
||||||
|
|
||||||
WireGuard Configuration Portal with LDAP, OAuth, OIDC authentication
|
WireGuard Configuration Portal with LDAP, OAuth, OIDC authentication
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ The [Values](#values) section lists the parameters that can be configured during
|
|||||||
| serviceAccount.annotations | object | `{}` | Service account annotations |
|
| serviceAccount.annotations | object | `{}` | Service account annotations |
|
||||||
| serviceAccount.automount | bool | `false` | Automatically mount a ServiceAccount's API credentials |
|
| serviceAccount.automount | bool | `false` | Automatically mount a ServiceAccount's API credentials |
|
||||||
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
|
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
|
||||||
| monitoring.enabled | bool | `true` | Enable Prometheus monitoring. |
|
| monitoring.enabled | bool | `false` | Enable Prometheus monitoring. |
|
||||||
| monitoring.apiVersion | string | `"monitoring.coreos.com/v1"` | API version of the Prometheus resource. Use `azmonitoring.coreos.com/v1` for Azure Managed Prometheus. |
|
| monitoring.apiVersion | string | `"monitoring.coreos.com/v1"` | API version of the Prometheus resource. Use `azmonitoring.coreos.com/v1` for Azure Managed Prometheus. |
|
||||||
| monitoring.kind | string | `"PodMonitor"` | Kind of the Prometheus resource. Could be `PodMonitor` or `ServiceMonitor`. |
|
| monitoring.kind | string | `"PodMonitor"` | Kind of the Prometheus resource. Could be `PodMonitor` or `ServiceMonitor`. |
|
||||||
| monitoring.labels | object | `{}` | Resource labels. |
|
| monitoring.labels | object | `{}` | Resource labels. |
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
"expr": "sum by (instance, interface) (rate(wireguard_interface_received_bytes_total{instance=\"$instance\", interface=~\"$interface\"}[$__rate_interval]))",
|
"expr": "sum by (instance, interface) (rate(wireguard_interface_received_bytes_total{instance=\"$instance\", interface=~\"$interface\"}[$__rate_interval]))",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": false,
|
"instant": false,
|
||||||
"interval": "$__rate_interval",
|
"interval": "",
|
||||||
"legendFormat": "Received {{interface}}",
|
"legendFormat": "Received {{interface}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -233,7 +233,7 @@
|
|||||||
"expr": "sum by (instance, interface) (rate(wireguard_interface_sent_bytes_total{instance=\"$instance\", interface=~\"$interface\"}[$__rate_interval]))",
|
"expr": "sum by (instance, interface) (rate(wireguard_interface_sent_bytes_total{instance=\"$instance\", interface=~\"$interface\"}[$__rate_interval]))",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": false,
|
"instant": false,
|
||||||
"interval": "$__rate_interval",
|
"interval": "",
|
||||||
"legendFormat": "Sent {{interface}}",
|
"legendFormat": "Sent {{interface}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "B"
|
"refId": "B"
|
||||||
@ -337,7 +337,7 @@
|
|||||||
"expr": "sum by (name, instance, interface) (rate(wireguard_peer_received_bytes_total{instance=\"$instance\", interface=~\"$interface\"}[$__rate_interval]))",
|
"expr": "sum by (name, instance, interface) (rate(wireguard_peer_received_bytes_total{instance=\"$instance\", interface=~\"$interface\"}[$__rate_interval]))",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": false,
|
"instant": false,
|
||||||
"interval": "$__rate_interval",
|
"interval": "$interval",
|
||||||
"legendFormat": "{{name}}",
|
"legendFormat": "{{name}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -441,7 +441,7 @@
|
|||||||
"expr": "sum by (instance, interface, name) (rate(wireguard_peer_sent_bytes_total{instance=\"$instance\", interface=~\"$interface\"}[$__rate_interval]))",
|
"expr": "sum by (instance, interface, name) (rate(wireguard_peer_sent_bytes_total{instance=\"$instance\", interface=~\"$interface\"}[$__rate_interval]))",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": false,
|
"instant": false,
|
||||||
"interval": "$__rate_interval",
|
"interval": "$interval",
|
||||||
"legendFormat": "{{name}}",
|
"legendFormat": "{{name}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -519,9 +519,9 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"exemplar": false,
|
"exemplar": false,
|
||||||
"expr": "sum(wireguard_peer_up{instance=\"$instance\", interface=~\"$interface\"}) by (id, instance, interface, name,)",
|
"expr": "sum by(name) (wireguard_peer_up{instance=\"$instance\", interface=~\"$interface\"})",
|
||||||
"instant": false,
|
"instant": false,
|
||||||
"interval": "$__rate_interval",
|
"interval": "$interval",
|
||||||
"legendFormat": "{{name}}",
|
"legendFormat": "{{name}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -662,7 +662,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pluginVersion": "11.2.0",
|
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@ -797,7 +796,7 @@
|
|||||||
"type": "table"
|
"type": "table"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"refresh": "30s",
|
"refresh": "1m",
|
||||||
"tags": [
|
"tags": [
|
||||||
"wireguard",
|
"wireguard",
|
||||||
"vpn"
|
"vpn"
|
||||||
@ -865,6 +864,44 @@
|
|||||||
"skipUrlSync": false,
|
"skipUrlSync": false,
|
||||||
"sort": 0,
|
"sort": 0,
|
||||||
"type": "query"
|
"type": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"current": {
|
||||||
|
"text": "2m",
|
||||||
|
"value": "2m"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"label": "Step Interval",
|
||||||
|
"name": "interval",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"selected": false,
|
||||||
|
"text": "30s",
|
||||||
|
"value": "30s"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"selected": false,
|
||||||
|
"text": "1m",
|
||||||
|
"value": "1m"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"selected": true,
|
||||||
|
"text": "2m",
|
||||||
|
"value": "2m"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"selected": false,
|
||||||
|
"text": "5m",
|
||||||
|
"value": "5m"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"selected": false,
|
||||||
|
"text": "10m",
|
||||||
|
"value": "10m"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"query": "30s,1m,2m,5m,10m",
|
||||||
|
"type": "custom"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -23,8 +23,13 @@ spec:
|
|||||||
{{- with .metricRelabelings }}
|
{{- with .metricRelabelings }}
|
||||||
metricRelabelings: {{- toYaml . | nindent 8 }}
|
metricRelabelings: {{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
relabelings:
|
||||||
|
- action: replace
|
||||||
|
sourceLabels:
|
||||||
|
- __meta_kubernetes_pod_label_app_kubernetes_io_name
|
||||||
|
targetLabel: instance
|
||||||
{{- with .relabelings }}
|
{{- with .relabelings }}
|
||||||
relabelings: {{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .scrapeTimeout }}
|
{{- with .scrapeTimeout }}
|
||||||
scrapeTimeout: {{ . }}
|
scrapeTimeout: {{ . }}
|
||||||
|
@ -207,7 +207,7 @@ serviceAccount:
|
|||||||
|
|
||||||
monitoring:
|
monitoring:
|
||||||
# -- Enable Prometheus monitoring.
|
# -- Enable Prometheus monitoring.
|
||||||
enabled: true
|
enabled: false
|
||||||
# -- API version of the Prometheus resource.
|
# -- API version of the Prometheus resource.
|
||||||
# Use `azmonitoring.coreos.com/v1` for Azure Managed Prometheus.
|
# Use `azmonitoring.coreos.com/v1` for Azure Managed Prometheus.
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
Loading…
Reference in New Issue
Block a user