## Summary - Adds `inlineScrapeConfig` support to the tenant `VMAgent` resource in `packages/system/monitoring/templates/vm/vmagent.yaml` - Adds commented usage example in both `packages/system/monitoring/values.yaml` and `packages/extra/monitoring/values.yaml` ## Problem The tenant VMAgent resource does not support custom scrape configurations. Using `additionalScrapeConfigs` (which references a Kubernetes Secret) is not viable because tenant users have no access to create or read Secrets — they can only manage resources under `apps.cozystack.io`. Instead, `inlineScrapeConfig` accepts inline YAML directly through Helm values, which is consistent with tenant permissions. Relates to #2194 ## Usage ```yaml vmagent: inlineScrapeConfig: | - job_name: "custom" static_configs: - targets: ["my-service:9090"] ``` ## Test plan - [ ] `helm template` monitoring with `inlineScrapeConfig` set — block rendered - [ ] `helm template` monitoring without it — no `inlineScrapeConfig` in output - [ ] Deploy and verify custom scrape targets are picked up by vmagent ```release-note Add inlineScrapeConfig support to tenant vmagent ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Support for including an inline scrape configuration into VMAgent monitoring when provided. * **Documentation** * Added a commented example showing how to supply an inline scrape job and targets. * Reordered remote-write URL entries in monitoring configuration for clearer ordering. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
86 lines
1.6 KiB
YAML
86 lines
1.6 KiB
YAML
host: ""
|
|
|
|
metricsStorages:
|
|
## Example:
|
|
## metricsStorages:
|
|
## - name: shortterm
|
|
## retentionPeriod: "3d"
|
|
## deduplicationInterval: "15s"
|
|
## storage: 10Gi
|
|
## storageClassName: ""
|
|
## vminsert:
|
|
## minAllowed:
|
|
## cpu: 200m
|
|
## memory: 512Mi
|
|
## maxAllowed:
|
|
## cpu: 1500m
|
|
## memory: 3Gi
|
|
## vmselect:
|
|
## minAllowed:
|
|
## cpu: 300m
|
|
## memory: 1Gi
|
|
## maxAllowed:
|
|
## cpu: 3500m
|
|
## memory: 6Gi
|
|
## vmstorage:
|
|
## minAllowed:
|
|
## cpu: 500m
|
|
## memory: 2Gi
|
|
## maxAllowed:
|
|
## cpu: 4000m
|
|
## memory: 8Gi
|
|
- name: shortterm
|
|
retentionPeriod: "3d"
|
|
deduplicationInterval: "15s"
|
|
storage: 10Gi
|
|
storageClassName: ""
|
|
- name: longterm
|
|
retentionPeriod: "14d"
|
|
deduplicationInterval: "5m"
|
|
storage: 10Gi
|
|
storageClassName: ""
|
|
|
|
logsStorages:
|
|
- name: generic
|
|
retentionPeriod: "1"
|
|
storage: 10Gi
|
|
storageClassName: ""
|
|
alerta:
|
|
storage: 10Gi
|
|
storageClassName: ""
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
alerts:
|
|
telegram:
|
|
token: ""
|
|
chatID: ""
|
|
disabledSeverity: []
|
|
slack:
|
|
url: ""
|
|
disabledSeverity: []
|
|
grafana:
|
|
db:
|
|
size: 10Gi
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
vmagent:
|
|
externalLabels:
|
|
cluster: cozystack
|
|
remoteWrite:
|
|
urls:
|
|
- http://vminsert-shortterm:8480/insert/0/prometheus
|
|
- http://vminsert-longterm:8480/insert/0/prometheus
|
|
## inlineScrapeConfig: |
|
|
## - job_name: "custom"
|
|
## static_configs:
|
|
## - targets: ["my-service:9090"]
|