bitnamicharts/prometheusPrometheus is an open source monitoring and alerting system. It enables sysadmins to monitor their infrastructures by collecting metrics from configured targets at given intervals.
Overview of Prometheus
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
consolehelm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/prometheus
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository.
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
This chart bootstraps a Prometheus Deployment in a Kubernetes cluster using the Helm package manager.
To install the chart with the release name my-release:
consolehelm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/prometheus
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
The command deploys Prometheus on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
This section describes credentials, configuration, and other installation options.
This chart provides support for exposing Prometheus components using the Gateway API and its HTTPRoute resource. If you have a Gateway controller installed on your cluster, such as APISIX, Contour, Envoy Gateway, NGINX Gateway Fabric or Kong Ingress Controller you can utilize the Gateway controller to serve your application. To enable Gateway API integration, set XXX.httpRoute.enabled to true (where XXX is server, or alertmanager depending on which component you want to expose).
The Gateway to be used can be customized by setting the XXX.httpRoute.parentRefs parameter. By default, it will reference a Gateway named gateway in the same namespace as the release.
You can specify the list of hostnames to be mapped to the deployment using the XXX.httpRoute.hostnames parameter. Additionally, you can customize the rules used to route the traffic to the service by modifying the XXX.httpRoute.matches and XXX.httpRoute.filters parameters or adding new rules using the XXX.httpRoute.extraRules parameter.
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the resourcesPreset values, which automatically sets the resources section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
There are cases where you may want to deploy extra objects, such a ConfigMap containing your app's configuration or some extra deployment with a micro service used by your app. For covering this case, the chart allows adding the full specification of other objects using the extraDeploy parameter.
The FIPS parameters only have effect if you are using images from the Bitnami Secure Images catalog.
For more information on this new support, please refer to the FIPS Compliance section.
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.
This chart allows you to set your custom affinity using the XXX.affinity parameter(s). Find more information about Pod's affinity in the kubernetes documentation.
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the bitnami/common chart. To do so, set the XXX.podAffinityPreset, XXX.podAntiAffinityPreset, or XXX.nodeAffinityPreset parameters.
You can integrate Prometheus & Alertmanager with Thanos using this chart and the Bitnami Thanos chart following the steps below:
Note: in this example we will use MinIO® (subchart) as the Objstore. Every component will be deployed in the "monitoring" namespace.
yamlobjstoreConfig: |- type: s3 config: bucket: thanos endpoint: {{ include "thanos.minio.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9000 access_key: minio secret_key: minio123 insecure: true query: dnsDiscovery: sidecarsService: prometheus-thanos sidecarsNamespace: monitoring bucketweb: enabled: true compactor: enabled: true storegateway: enabled: true ruler: enabled: true alertmanagers: - [***] config: |- groups: - name: "metamonitoring" rules: - alert: "PrometheusDown" expr: absent(up{prometheus="monitoring/prometheus"}) metrics: enabled: true serviceMonitor: enabled: true minio: enabled: true auth: rootPassword: minio123 rootUser: minio monitoringBuckets: thanos accessKey: password: minio secretKey: password: minio123
For Helm 3:
consolekubectl create namespace monitoring helm install prometheus \ --set prometheus.thanos.create=true \ --namespace monitoring \ oci://REGISTRY_NAME/REPOSITORY_NAME/prometheus helm install thanos \ --values values.yaml \ --namespace monitoring \ oci://REGISTRY_NAME/REPOSITORY_NAME/thanos
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
That's all! Now you have Thanos fully integrated with Prometheus and Alertmanager.
You can integrate Prometheus with Grafana Mimir using this chart and the Bitnami Grafana Mimir chart adding a remoteWrite entry:
yamlserver: remoteWrite: - url: [***] headers: X-Scope-OrgID: demo
For Helm 3:
consolekubectl create namespace monitoring helm install prometheus \ --values values.yaml \ --namespace monitoring \ oci://REGISTRY_NAME/REPOSITORY_NAME/prometheus helm install grafana-mimir \ oci://REGISTRY_NAME/REPOSITORY_NAME/grafana-mimir
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
That's all! Now you have Prometheus integrated with Grafana Mimir.
You can integrate Prometheus with Grafana Dashboard using this chart and the Bitnami Grafana chart just adding the prometheus datasources:
yamldatasources: secretDefinition: apiVersion: 1 datasources: - name: Prometheus type: prometheus access: proxy orgId: 1 url: [***] version: 1 editable: true isDefault: true - name: Alertmanager uid: alertmanager type: alertmanager access: proxy orgId: 1 url: [***] version: 1 editable: true
For Helm 3:
consolekubectl create namespace monitoring helm install prometheus \ --namespace monitoring \ oci://REGISTRY_NAME/REPOSITORY_NAME/prometheus helm install grafana \ --values values.yaml \ --namespace monitoring \ oci://REGISTRY_NAME/REPOSITORY_NAME/grafana
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
By default this helm chart will monitor its own targets: prometheus and alertmanager. Additional ones can be added setting a list with the scrape_configs in the value server.extraScrapeConfigs. Here there is a simple example for wordpress (deployed in the default namespace):
yamlserver: extraScrapeConfigs: - job_name: wordpress kubernetes_sd_configs: - role: endpoints namespaces: names: - default metrics_path: /metrics relabel_configs: - source_labels: - job target_label: __tmp_wordpress_job_name - action: keep source_labels: - __meta_kubernetes_service_label_app_kubernetes_io_instance - __meta_kubernetes_service_labelpresent_app_kubernetes_io_instance regex: (wordpress);true - action: keep source_labels: - __meta_kubernetes_service_label_app_kubernetes_io_name - __meta_kubernetes_service_labelpresent_app_kubernetes_io_name regex: (wordpress);true - action: keep source_labels: - __meta_kubernetes_endpoint_port_name regex: metrics - source_labels: - __meta_kubernetes_endpoint_address_target_kind - __meta_kubernetes_endpoint_address_target_name separator: ; regex: Node;(.*) replacement: ${1} target_label: node - source_labels: - __meta_kubernetes_endpoint_address_target_kind - __meta_kubernetes_endpoint_address_target_name separator: ; regex: Pod;(.*) replacement: ${1} target_label: pod - source_labels: - __meta_kubernetes_namespace target_label: namespace - source_labels: - __meta_kubernetes_service_name target_label: service - source_labels: - __meta_kubernetes_pod_name target_label: pod - source_labels: - __meta_kubernetes_pod_container_name target_label: container - action: drop source_labels: - __meta_kubernetes_pod_phase regex: (Failed|Succeeded) - source_labels: - __meta_kubernetes_service_name target_label: job replacement: ${1} - target_label: endpoint replacement: metrics - source_labels: - __address__ target_label: __tmp_hash modulus: 1 action: hashmod - source_labels: - __tmp_hash regex: 0 action: keep
The following subsections list global, common, and component-specific parameters.
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.defaultStorageClass | Global default StorageClass for Persistent Volume(s) | "" |
global.storageClass | DEPRECATED: use global.defaultStorageClass instead | "" |
global.defaultFips | Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overridden by the 'fips' object | restricted |
global.security.allowInsecureImages | Allows skipping image verification | false |
global.compatibility.openshift.adaptSecurityContext | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | auto |
| Name | Description | Value |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
nameOverride | String to partially override common.names.name | "" |
fullnameOverride | String to fully override common.names.fullname | "" |
namespaceOverride | String to fully override common.names.namespace | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
clusterDomain | Kubernetes cluster domain name | cluster.local |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
ingress.apiVersion | Force Ingress API version (automatically detected if not set) | "" |
| Name | Description | Value |
|---|---|---|
alertmanager.enabled | Alertmanager enabled | true |
alertmanager.image.registry | Alertmanager image registry | REGISTRY_NAME |
alertmanager.image.repository | Alertmanager image repository | REPOSITORY_NAME/alertmanager |
alertmanager.image.digest | Alertmanager image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | "" |
alertmanager.image.pullPolicy | Alertmanager image pull policy | IfNotPresent |
alertmanager.image.pullSecrets | Alertmanager image pull secrets | [] |
alertmanager.configuration | Alertmanager configuration. This content will be stored in the the alertmanager.yaml file and the content can be a template. | "" |
alertmanager.replicaCount | Number of Alertmanager replicas to deploy | 1 |
alertmanager.containerPorts.http | Alertmanager HTTP container port | 9093 |
alertmanager.containerPorts.cluster | Alertmanager Cluster HA port |
_Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at [***]
manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务