This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployment: siembol-monitoring (#675)
- Loading branch information
Showing
10 changed files
with
194 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
deployment/helm-k8s/templates/siembol_monitoring/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- if (has "siembol_monitoring" .Values.enabled_apps) -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: {{ include "siembol.siembol_monitoring.fullname" $ }} | ||
name: {{ include "siembol.siembol_monitoring.fullname" $ }} | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ include "siembol.siembol_monitoring.fullname" $ }} | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 0 | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ include "siembol.siembol_monitoring.fullname" $ }} | ||
name: {{ include "siembol.siembol_monitoring.fullname" $ }} | ||
spec: | ||
containers: | ||
- image: {{ .Values.siembol_monitoring.image.repository }}:{{ .Values.siembol_monitoring.image.tag }} | ||
imagePullPolicy: {{ .Values.siembol_monitoring.image.pullPolicy }} | ||
name: {{ include "siembol.siembol_monitoring.fullname" $ }} | ||
resources: | ||
requests: | ||
memory: {{ .Values.siembol_monitoring.resources.requests.memory }} | ||
cpu: {{ .Values.siembol_monitoring.resources.requests.cpu }} | ||
limits: | ||
memory: {{ .Values.siembol_monitoring.resources.limits.memory }} | ||
cpu: {{ .Values.siembol_monitoring.resources.limits.cpu }} | ||
securityContext: | ||
runAsUser: 101 | ||
readinessProbe: | ||
httpGet: | ||
path: /health | ||
port: {{ .Values.siembol_monitoring.service.port }} | ||
scheme: HTTP | ||
initialDelaySeconds: {{ .Values.siembol_monitoring.readinessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.siembol_monitoring.readinessProbe.periodSeconds }} | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: {{ .Values.siembol_monitoring.service.port }} | ||
scheme: HTTP | ||
volumeMounts: | ||
- name: cacerts | ||
mountPath: /etc/ssl/certs/java/cacerts | ||
subPath: cacerts | ||
readOnly: true | ||
restartPolicy: Always | ||
volumes: | ||
- name: cacerts | ||
secret: | ||
secretName: cacerts | ||
terminationGracePeriodSeconds: 300 | ||
{{- end -}} |
16 changes: 16 additions & 0 deletions
16
deployment/helm-k8s/templates/siembol_monitoring/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- if (has "siembol_monitoring" .Values.enabled_apps) -}} | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ include "siembol.siembol_monitoring.fullname" $ }} | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
metrics: "true" | ||
spec: | ||
selector: | ||
app: {{ include "siembol.siembol_monitoring.fullname" $ }} | ||
ports: | ||
- protocol: TCP | ||
port: {{ .Values.siembol_monitoring.service.port }} | ||
name: web | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
docs/deployment/how-tos/how_to_setup_siembol_monitoring.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# How to set up Siembol monitoring | ||
Siembol monitoring is currently composed of one component: Siembol heartbeat. | ||
|
||
## Siembol Heartbeat | ||
Siembol heartbeat is a springboot application with two main components: kafka producers and a kafka consumer. The kafka producers send heartbeat messages to kafka at an interval of time. The kafka consumer reads the messages after they have been processed by various Siembol services and calculate total latency and latency between Siembol services. | ||
|
||
The properties of the heartbeat are defined in its `application.properties` file. | ||
|
||
### General properties | ||
- the interval in seconds the producers will send heartbeat messages, the default is 60 seconds | ||
```properties | ||
siembol-monitoring.heartbeat-properties.heartbeat-interval-seconds=60 | ||
``` | ||
- any optional additional fields to add to the heartbeat message | ||
```properties | ||
siembol-monitoring.heartbeat-properties.message.key1=value1 | ||
siembol-monitoring.heartbeat-properties.message.key2=value2 | ||
``` | ||
|
||
### Producer properties | ||
One or multiple producers can be defined in the properties to monitor data from different kafka clusters, for example | ||
|
||
```properties | ||
siembol-monitoring.heartbeat-properties.heartbeat-producers.local-kafka-cluster.output-topic=siembol.heartbeat | ||
siembol-monitoring.heartbeat-properties.heartbeat-producers.local-kafka-cluster.kafka-properties.[bootstrap.servers]=kafka-0.kafka-headless.siembol.svc.cluster.local:9092 | ||
siembol-monitoring.heartbeat-properties.heartbeat-producers.local-kafka-cluster.kafka-properties.[security.protocol]=PLAINTEXT | ||
``` | ||
Any arbitrary additional kafka producer properties can be added (https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html). | ||
|
||
### Consumer properties | ||
```properties | ||
siembol-monitoring.heartbeat-properties.heartbeat-consumer.kafka-properties.[bootstrap.servers]=kafka-0.kafka-headless.siembol.svc.cluster.local:9092 | ||
siembol-monitoring.heartbeat-properties.heartbeat-consumer.kafka-properties.[application.id]=siembol.heartbeat.reader | ||
siembol-monitoring.heartbeat-properties.heartbeat-consumer.kafka-properties.[auto.offset.reset]=earliest | ||
siembol-monitoring.heartbeat-properties.heartbeat-consumer.kafka-properties.[security.protocol]=PLAINTEXT | ||
siembol-monitoring.heartbeat-properties.heartbeat-consumer.enabled-services=parsingapp,enrichment,response | ||
``` | ||
Any arbitrary additional kafka streams properties can be added (https://kafka.apache.org/10/documentation/streams/developer-guide/config-streams.html). | ||
The `enabled-services` property is to specify between which Siembol services latency should be computed. | ||
|
||
|