mirror of
				https://github.com/Telecominfraproject/wlan-toolsmith.git
				synced 2025-11-01 03:18:01 +00:00 
			
		
		
		
	Merge pull request #212 from Telecominfraproject/feature/wifi-9824--es-exporter
[WIFI-9824] Add: elasticsearch exporter + example alert
This commit is contained in:
		| @@ -0,0 +1,17 @@ | |||||||
|  | apiVersion: monitoring.coreos.com/v1 | ||||||
|  | kind: ServiceMonitor | ||||||
|  | metadata: | ||||||
|  |   annotations: | ||||||
|  |     meta.helm.sh/release-name: prometheus-operator | ||||||
|  |   labels: | ||||||
|  |     app: prometheus-es-exporter | ||||||
|  |     app.kubernetes.io/managed-by: Helm | ||||||
|  |     release: prometheus-operator | ||||||
|  |   name: elasticsearch-exporter-prometheus-es-exporter | ||||||
|  | spec: | ||||||
|  |   endpoints: | ||||||
|  |   - path: / | ||||||
|  |     port: prometheus | ||||||
|  |   selector: | ||||||
|  |     matchLabels: | ||||||
|  |       app: prometheus-es-exporter | ||||||
| @@ -45,8 +45,11 @@ dependencies: | |||||||
| - name: metrics-server | - name: metrics-server | ||||||
|   repository: https://charts.bitnami.com/bitnami |   repository: https://charts.bitnami.com/bitnami | ||||||
|   version: 5.10.13 |   version: 5.10.13 | ||||||
|  | - name: prometheus-es-exporter | ||||||
|  |   repository: https://braedon.github.io/helm | ||||||
|  |   version: 0.2.0 | ||||||
| - name: tigera-operator | - name: tigera-operator | ||||||
|   repository: https://projectcalico.docs.tigera.io/charts |   repository: https://projectcalico.docs.tigera.io/charts | ||||||
|   version: v3.22.2 |   version: v3.22.2 | ||||||
| digest: sha256:289fecc40f3cfb7c7ef4d458d313295cce9d950559391d51b973775333f4f07f | digest: sha256:d5e93771fd4dba01fcb0d0d88d32ab7bc06aa2807bdc326a4eaaddb0d5a27c62 | ||||||
| generated: "2022-06-23T14:05:20.599854754+03:00" | generated: "2022-07-14T11:08:05.177261511+03:00" | ||||||
|   | |||||||
| @@ -25,6 +25,8 @@ repositories: | |||||||
|   url: https://prometheus-community.github.io/helm-charts |   url: https://prometheus-community.github.io/helm-charts | ||||||
| - name: projectcalico | - name: projectcalico | ||||||
|   url: https://projectcalico.docs.tigera.io/charts |   url: https://projectcalico.docs.tigera.io/charts | ||||||
|  | - name: braedon | ||||||
|  |   url: https://braedon.github.io/helm | ||||||
|  |  | ||||||
| environments: | environments: | ||||||
|   azure: |   azure: | ||||||
| @@ -289,6 +291,16 @@ releases: | |||||||
|             annotations: |             annotations: | ||||||
|               title: PVC *{{`{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }}`}}* has less than 20% free storage |               title: PVC *{{`{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }}`}}* has less than 20% free storage | ||||||
|               description: "The PVC *{{`{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }}`}}* only has {{`{{ $value }}`}}% capacity left. Please increase its size or clean it up." |               description: "The PVC *{{`{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }}`}}* only has {{`{{ $value }}`}}% capacity left. Please increase its size or clean it up." | ||||||
|  |           - alert: ElasticSearch new assert_violation errors found | ||||||
|  |             expr: rate(assert_violation_errors_hits[1m]) > 0 | ||||||
|  |             labels: | ||||||
|  |               severity: warning | ||||||
|  |               area: testbed | ||||||
|  |               service: elasticsearch | ||||||
|  |               namespace: "{{`{{ $labels.namespace }}`}}" | ||||||
|  |             annotations: | ||||||
|  |               title: New ElasticSearch logs found with Assertion violation (WIFI-9824) | ||||||
|  |               description: New ElasticSearch logs found with Assertion violation (WIFI-9824) | ||||||
|  |  | ||||||
|   - grafana: |   - grafana: | ||||||
|       grafana.ini: |       grafana.ini: | ||||||
| @@ -992,3 +1004,62 @@ releases: | |||||||
|     app: github-actions-network-policies |     app: github-actions-network-policies | ||||||
|     sub1: calico |     sub1: calico | ||||||
|     sub2: actions-runner-controller-addon |     sub2: actions-runner-controller-addon | ||||||
|  |  | ||||||
|  | - name: elasticsearch-exporter | ||||||
|  |   condition: elastic.enabled | ||||||
|  |   namespace: {{ .Environment.Values.monitoring.namespace }} | ||||||
|  |   chart: braedon/prometheus-es-exporter | ||||||
|  |   version: 0.2.0 | ||||||
|  |   labels: | ||||||
|  |     group: monitoring | ||||||
|  |     app: elasticsearch-exporter | ||||||
|  |   values: | ||||||
|  |     - image: | ||||||
|  |         tag: 0.14.1 | ||||||
|  |     - elasticsearch: | ||||||
|  |         cluster: elasticsearch-client.{{ .Environment.Values.monitoring.namespace }}.svc.cluster.local:9200 | ||||||
|  |         queries: |- | ||||||
|  |           [DEFAULT] | ||||||
|  |           QueryIntervalSecs = 15 | ||||||
|  |           QueryTimeoutSecs = 10 | ||||||
|  |           QueryIndices = _all | ||||||
|  |           QueryOnError = drop | ||||||
|  |           QueryOnMissing = drop | ||||||
|  |           [query_assert_violation_errors] | ||||||
|  |           QueryOnError = preserve | ||||||
|  |           QueryOnMissing = zero | ||||||
|  |           QueryJson = { | ||||||
|  |               "query": { | ||||||
|  |                 "bool": { | ||||||
|  |                   "filter": { | ||||||
|  |                     "bool": { | ||||||
|  |                       "must": [ | ||||||
|  |                         { | ||||||
|  |                           "match": { | ||||||
|  |                             "kubernetes.namespace_name.keyword": "openwifi-qa01" | ||||||
|  |                           } | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                           "match": { | ||||||
|  |                             "kubernetes.container_name.keyword": "owgw" | ||||||
|  |                           } | ||||||
|  |                         } | ||||||
|  |                       ] | ||||||
|  |                     } | ||||||
|  |                   }, | ||||||
|  |                   "must": { | ||||||
|  |                     "match": { | ||||||
|  |                       "message": "Assertion violation: !_pStream" | ||||||
|  |                     } | ||||||
|  |                   } | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               "aggs": { | ||||||
|  |                 "agg_terms_kubernetes.container_name.keyword": { | ||||||
|  |                   "terms": { | ||||||
|  |                     "field": "kubernetes.container_name.keyword" | ||||||
|  |                   } | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dmitry Dunaev
					Dmitry Dunaev