Skip to content

Commit

Permalink
rename smart rule to smartmon_disk_health, add doc on how to test rul…
Browse files Browse the repository at this point in the history
…e locally
  • Loading branch information
iminfinity committed Nov 14, 2024
1 parent 9288b25 commit 6d369af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions argocd-helm-charts/prometheus-linuxaid/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ mysql: https://github.com/percona/grafana-dashboards/blob/main/dashboards/MySQL/
* promtool rule validate
* grafana pvc is not supported https://github.com/grafana/grafana-operator/issues/296
* grafana resource as well, the crd seems to be little broken when grafana guys migrated from v4 to v5


## How to test new rule
```sh
cd argocd-helm-charts/prometheus-linuxaid

docker run -ti --rm -v $(pwd):/etc/prometheus/:ro --entrypoint /bin/promtool prom/prometheus test rules /etc/prometheus/tests/${NEW_RULE}.yaml
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
name: smart-rules
namespace: monitoring-{{ .Values.customerid }}
spec:
{{- $.Files.Get "rules/smart.yaml" | nindent 4 }}
{{- $.Files.Get "rules/smartmon_disk_health.yaml" | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
evaluation_interval: 1m

rule_files:
- ../rules/smart.yaml
- ../rules/smartmon_disk_health.yaml

tests:
- interval: 1m
Expand Down
2 changes: 1 addition & 1 deletion argocd-helm-charts/prometheus-linuxaid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ prometheusRule:
service_sssd: true
service_omsagent: true
services: true
smart: true
smartmon_disk_health: true
ssacli: true
zfsExporter: true
smartmon_sata: true
Expand Down

0 comments on commit 6d369af

Please sign in to comment.