prometheusalert
by ygqygq2
Chart for PrometheusAlert
About this chart
prometheusalert
prometheusalert PrometheusAlert 是开源的运维告警中心消息转发系统,支持主流的监控系统 Prometheus、Zabbix,日志系统 Graylog2,Graylog3、数据可视化系统 Grafana、SonarQube。阿里云-云监控,以及所有支持 WebHook 接口的系统发出的预警消息,支持将收到的这些消息发送到钉钉,微信,email,飞书,腾讯短信,腾讯电话,阿里云短信,阿里云电话,华为短信,百度云短信,容联云电话,七陌短信,七陌语音,TeleGram,百度 Hi(如流),Kafka 等。
TL;DR
$ helm repo add ygqygq2 https://ygqygq2.github.io/charts/
$ helm install my-release ygqygq2/prometheusalert
Introduction
This chart bootstraps a prometheusalert Open Source deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.23+
- Helm 3.8.0+
Installing the Chart
To install the chart with the release name my-release:
$ helm repo add ygqygq2 https://ygqygq2.github.io/charts/
$ helm install my-release ygqygq2/prometheusalert
These commands deploy prometheusalert Open Source on the Kubernetes cluster in the default configuration.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm uninstall my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
nameOverride | String to partially override nginx.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override nginx.fullname template | "" |
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
clusterDomain | Kubernetes Cluster Domain | cluster.local |
extraDeploy | Extra objects to deploy (value evaluated as a template) | [] |
commonLabels | Add labels to all the deployed resources | {} |
commonAnnotations | Add annotations to all the deployed resources | {} |
prometheusalert parameters
| Name | Description | Value |
|---|---|---|
image.registry | prometheusalert image registry | docker.io |
image.repository | prometheusalert image repository | feiyu563/prometheus-alert |
image.tag | prometheusalert image tag (immutable tags are recommended) | v4.9.1 |
image.digest | Image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | "" |
image.pullPolicy | prometheusalert image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] |
image.debug | Set to true if you would like to see extra information on logs | false |
hostAliases | Deployment pod host aliases | [] |
command | Override default container command (useful when using custom images) | [] |
args | Override default container args (useful when using custom images) | [] |
extraEnvVars | Extra environment variables to be set on prometheusalert containers | [] |
extraEnvVarsCM | Name of existing ConfigMap containing extra environment variables | "" |
extraEnvVarsSecret | Name of existing Secret containing extra environment variables | "" |
prometheusalert deployment parameters
| Name | Description | Value |
|---|---|---|
replicaCount | Number of prometheusalert replicas to deploy | 1 |
podLabels | Additional labels for prometheusalert pods | {} |
podAnnotations | Annotations for prometheusalert pods | {} |
podAffinityPreset | Pod affinity preset. Ignored if affinity is set. Allowed values: soft or hard | "" |
podAntiAffinityPreset | Pod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hard | soft |
nodeAffinityPreset.type | Node affinity preset type. Ignored if affinity is set. Allowed values: soft or hard | "" |
nodeAffinityPreset.key | Node label key to match. Ignored if affinity is set. | "" |
nodeAffinityPreset.values | Node label values to match. Ignored if affinity is set. | [] |
affinity | Affinity for pod assignment | {} |
hostNetwork | Specify if host network should be enabled for NGINX pod | false |
hostIPC | Specify if host IPC should be enabled for NGINX pod | false |
nodeSelector | Node labels for pod assignment. Evaluated as a template. | {} |
tolerations | Tolerations for pod assignment. Evaluated as a template. | {} |
priorityClassName | Priority class name | "" |
podSecurityContext.enabled | Enabled prometheusalert pods' Security Context | false |
podSecurityContext.fsGroup | Set prometheusalert pod's Security Context fsGroup | 1001 |
podSecurityContext.sysctls | sysctl settings of the prometheusalert pods | [] |
containerSecurityContext.enabled | Enabled prometheusalert containers' Security Context | false |
containerSecurityContext.runAsUser | Set prometheusalert container's Security Context runAsUser | 1001 |
containerSecurityContext.runAsNonRoot | Set prometheusalert container's Security Context runAsNonRoot | false |
containerPorts.http | Sets http port inside prometheusalert container | 8080 |
containerPorts.https | Sets https port inside prometheusalert container | "" |
resources.limits | The resources limits for the prometheusalert container | {} |
resources.requests | The requested resources for the prometheusalert container | {} |
customLivenessProbe | Override default liveness probe | {} |
customReadinessProbe | Override default readiness probe | {} |
healthCheck | 简化的健康检测,支持 tcp、http,具体查看 values.yaml | |
autoscaling.enabled | Enable autoscaling for prometheusalert deployment | false |
autoscaling.minReplicas | Minimum number of replicas to scale back | "" |
autoscaling.maxReplicas | Maximum number of replicas to scale out | "" |
autoscaling.targetCPU | Target CPU utilization percentage | "" |
autoscaling.targetMemory | Target Memory utilization percentage | "" |
extraVolumes | Array to add extra volumes | [] |
extraVolumeMounts | Array to add extra mount | [] |
serviceAccount.create | Enable creation of ServiceAccount for nginx pod | false |
serviceAccount.name | The name of the ServiceAccount to use. | "" |
serviceAccount.annotations | Annotations for service account. Evaluated as a template. | {} |
serviceAccount.autoMount | Auto-mount the service account token in the pod | false |
sidecars | Sidecar parameters | [] |
sidecarSingleProcessNamespace | Enable sharing the process namespace with sidecars | false |
initContainers | Extra init containers | [] |
pdb.create | Created a PodDisruptionBudget | false |
pdb.minAvailable | Min number of pods that must still be available after the eviction | 1 |
pdb.maxUnavailable | Max number of pods that can be unavailable after the eviction | 0 |
Traffic Exposure parameters
| Name | Description | Value |
|---|---|---|
service.type | Service type | ClusterIP |
service.ports | Service ports | see values.yaml |
service.loadBalancerIP | LoadBalancer service IP address | "" |
service.sessionAffinity | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | None |
service.sessionAffinityConfig | Additional settings for the sessionAffinity | {} |
service.annotations | Service annotations | {} |
service.externalTrafficPolicy | Enable client source IP preservation | Cluster |
ingress.enabled | Set to true to enable ingress record generation |
Deploy prometheusalert with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has prometheusalert on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartprometheusalert is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply