Skip to content

Commit

Permalink
Add flag for required searchdomains, and alertrule for missing requir…
Browse files Browse the repository at this point in the history
…ed searchdomain (#123)
  • Loading branch information
Stian Haugland committed Mar 31, 2021
1 parent 05a77ed commit a42b4d3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions node-dns-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.2.0
version: 1.3.0

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "main-ced69cea"
appVersion: "main-6fb66400"
8 changes: 8 additions & 0 deletions node-dns-exporter/templates/alert-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ spec:
for: {{ .Values.alertFor | default "3m" }}
labels:
serverity: warning
- alert: MissingSearchDomainWarning
annotations:
message: |-
{{`Searchdomain: {{$labels.host}} is not available for node: {{$labels.node}}`}}
expr: 'node_dns_searchdomain==0'
for: {{ .Values.alertFor | default "3m" }}
labels:
serverity: warning
{{- if .Values.customAlertRules }}
{{ toYaml .Values.customAlertRules | indent 4 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions node-dns-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
args:
- "--listen-address={{ .Values.nodeDns.listenAddress | default "0.0.0.0:8080" }}"
- "--test-hosts={{ .Values.nodeDns.testHosts }}"
- "--req-searchdomains={{ .Values.nodeDns.requiredSearchdomains }}"
- "--test-interval-seconds={{ .Values.nodeDns.testInterval | default 120 }}"
- "--node-name={{ .Values.nodeDns.nodeName | default "$(NODE_NAME)" }}"
env:
Expand Down
2 changes: 1 addition & 1 deletion node-dns-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ metrics:

nodeDns:
testHosts: "" #"example.com, youtube.com"

requiredSearchdomains: "" #"localhost, mysearchdomain.com"
#listenAddress: 0.0.0.0:8080
#testInterval: 120

Expand Down

0 comments on commit a42b4d3

Please sign in to comment.