add s3 monitor
This commit is contained in:
		| @@ -378,6 +378,25 @@ spec: | ||||
|   resyncPeriod: 1h | ||||
|   url: http://gitea-http.gitea:3000/alexlebens/grafana-dashboards/raw/branch/main/dashboards/service/volsync.json | ||||
|  | ||||
| --- | ||||
| apiVersion: grafana.integreatly.org/v1beta1 | ||||
| kind: GrafanaDashboard | ||||
| metadata: | ||||
|   name: grafana-dashboard-digital-ocean-s3 | ||||
|   namespace: {{ .Release.Namespace }} | ||||
|   labels: | ||||
|     app.kubernetes.io/name: grafana-dashboard-digital-ocean-s3 | ||||
|     app.kubernetes.io/instance: {{ .Release.Name }} | ||||
|     app.kubernetes.io/part-of: {{ .Release.Name }} | ||||
| spec: | ||||
|   instanceSelector: | ||||
|     matchLabels: | ||||
|       app: grafana-main | ||||
|   contentCacheDuration: 1h | ||||
|   folderUID: grafana-folder-platform | ||||
|   resyncPeriod: 1h | ||||
|   url: http://gitea-http.gitea:3000/alexlebens/grafana-dashboards/raw/branch/main/dashboards/platform/digital-ocean-s3.json | ||||
|  | ||||
| --- | ||||
| apiVersion: grafana.integreatly.org/v1beta1 | ||||
| kind: GrafanaDashboard | ||||
|   | ||||
							
								
								
									
										22
									
								
								clusters/cl01tl/monitoring/s3-exporter/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								clusters/cl01tl/monitoring/s3-exporter/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| apiVersion: v2 | ||||
| name: s3-exporter | ||||
| version: 1.0.0 | ||||
| description: S3 Exporter | ||||
| keywords: | ||||
|   - s3-exporter | ||||
|   - storage | ||||
|   - monitoring | ||||
|   - metrics | ||||
| home: https://wiki.alexlebens.dev/s/ | ||||
| sources: | ||||
|   - https://github.com/ribbybibby/s3_exporter | ||||
|   - https://hub.docker.com/r/ribbybibby/s3-exporter | ||||
|   - https://github.com/bjw-s/helm-charts/blob/main/charts/other/app-template | ||||
| maintainers: | ||||
|   - name: alexlebens | ||||
| dependencies: | ||||
|   - name: app-template | ||||
|     alias: s3-exporter | ||||
|     repository: https://bjw-s-labs.github.io/helm-charts/ | ||||
|     version: 4.1.2 | ||||
| appVersion: v0.5.0 | ||||
| @@ -0,0 +1,35 @@ | ||||
| apiVersion: external-secrets.io/v1 | ||||
| kind: ExternalSecret | ||||
| metadata: | ||||
|   name: s3-do-home-infra-secret | ||||
|   namespace: {{ .Release.Namespace }} | ||||
|   labels: | ||||
|     app.kubernetes.io/name: s3-do-home-infra-secret | ||||
|     app.kubernetes.io/instance: {{ .Release.Name }} | ||||
|     app.kubernetes.io/part-of: {{ .Release.Name }} | ||||
| spec: | ||||
|   secretStoreRef: | ||||
|     kind: ClusterSecretStore | ||||
|     name: vault | ||||
|   data: | ||||
|     - secretKey: AWS_ACCESS_KEY_ID | ||||
|       remoteRef: | ||||
|         conversionStrategy: Default | ||||
|         decodingStrategy: None | ||||
|         key: /digital-ocean/home-infra/prometheus-exporter | ||||
|         metadataPolicy: None | ||||
|         property: AWS_ACCESS_KEY_ID | ||||
|     - secretKey: AWS_SECRET_ACCESS_KEY | ||||
|       remoteRef: | ||||
|         conversionStrategy: Default | ||||
|         decodingStrategy: None | ||||
|         key: /digital-ocean/home-infra/prometheus-exporter | ||||
|         metadataPolicy: None | ||||
|         property: AWS_SECRET_ACCESS_KEY | ||||
|     - secretKey: AWS_REGION | ||||
|       remoteRef: | ||||
|         conversionStrategy: Default | ||||
|         decodingStrategy: None | ||||
|         key: /digital-ocean/home-infra/prometheus-exporter | ||||
|         metadataPolicy: None | ||||
|         property: AWS_REGION | ||||
| @@ -0,0 +1,16 @@ | ||||
| apiVersion: monitoring.coreos.com/v1alpha1 | ||||
| kind: ScrapeConfig | ||||
| metadata: | ||||
|   name: s3-do-home-infra | ||||
|   namespace: {{ .Release.Namespace }} | ||||
|   labels: | ||||
|     app.kubernetes.io/name: s3-do-home-infra | ||||
|     app.kubernetes.io/instance: {{ .Release.Name }} | ||||
|     app.kubernetes.io/part-of: {{ .Release.Name }} | ||||
| spec: | ||||
|   jobName: s3-do-home-infra | ||||
|   metrics_path: /probe | ||||
|   scrapeInterval: 12h | ||||
|   scrapeTimeout: 120s | ||||
|   httpSDConfigs: | ||||
|     - url: http://s3-exporter.s3-exporter:9340/discovery | ||||
							
								
								
									
										33
									
								
								clusters/cl01tl/monitoring/s3-exporter/values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								clusters/cl01tl/monitoring/s3-exporter/values.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| s3-exporter: | ||||
|   controllers: | ||||
|     main: | ||||
|       type: deployment | ||||
|       replicas: 1 | ||||
|       strategy: Recreate | ||||
|       revisionHistoryLimit: 3 | ||||
|       containers: | ||||
|         main: | ||||
|           image: | ||||
|             repository: ghcr.io/unpoller/unpoller | ||||
|             tag: v2.15.3 | ||||
|             pullPolicy: IfNotPresent | ||||
|           env: | ||||
|             - name: S3_EXPORTER_WEB_LISTEN_ADDRESS | ||||
|               value: 9340 | ||||
|             - name: S3_EXPORTER_S3_ENDPOINT_URL | ||||
|               value: https://nyc3.digitaloceanspaces.com | ||||
|           envFrom: | ||||
|             - secretRef: | ||||
|                 name: s3-do-home-infra-secret | ||||
|           resources: | ||||
|             requests: | ||||
|               cpu: 10m | ||||
|               memory: 64Mi | ||||
|   service: | ||||
|     main: | ||||
|       controller: main | ||||
|       ports: | ||||
|         metrics: | ||||
|           port: 9340 | ||||
|           targetPort: 9340 | ||||
|           protocol: TCP | ||||
		Reference in New Issue
	
	Block a user