侧边栏壁纸
博主头像
★街角晚灯★博主等级

博观而约取 厚积而薄发

  • 累计撰写 466 篇文章
  • 累计创建 185 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Helm Install Prometheus

WinJay
2024-11-21 / 0 评论 / 0 点赞 / 1 阅读 / 8339 字 / 正在检测是否收录...
温馨提示:
文章发布较早,内容可能过时,阅读注意甄别。。。。

Helm Install Prometheus

  • 参考链接

https://github.com/prometheus-community/helm-charts

https://anshu-anshikasharma114.medium.com/helm-chart-for-prometheus-and-grafana-on-kubernetes-888b91046ce4

image-20241121091722635

Usage

Helm must be installed to use the charts. Please refer to Helm's documentation to get started.

Once Helm is set up properly, add the repo as follows:

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

You can then run helm search repo prometheus-community to see the charts.

image-20220818223230669

image-20220818223257798

image-20220818223414795

image-20220818223444236

NAME: monitoring
LAST DEPLOYED: Thu Aug 18 22:11:43 2022
NAMESPACE: monitoring
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The Prometheus server can be accessed via port 80 on the following DNS name from within your cluster:
monitoring-prometheus-server.monitoring.svc.cluster.local


Get the Prometheus server URL by running these commands in the same shell:
  export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")
  kubectl --namespace monitoring port-forward $POD_NAME 9090


The Prometheus alertmanager can be accessed via port 80 on the following DNS name from within your cluster:
monitoring-prometheus-alertmanager.monitoring.svc.cluster.local


Get the Alertmanager URL by running these commands in the same shell:
  export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=alertmanager" -o jsonpath="{.items[0].metadata.name}")
  kubectl --namespace monitoring port-forward $POD_NAME 9093
#################################################################################
######   WARNING: Pod Security Policy has been moved to a global property.  #####
######            use .Values.podSecurityPolicy.enabled with pod-based      #####
######            annotations                                               #####
######            (e.g. .Values.nodeExporter.podSecurityPolicy.annotations) #####
#################################################################################


The Prometheus PushGateway can be accessed via port 9091 on the following DNS name from within your cluster:
monitoring-prometheus-pushgateway.monitoring.svc.cluster.local


Get the PushGateway URL by running these commands in the same shell:
  export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=pushgateway" -o jsonpath="{.items[0].metadata.name}")
  kubectl --namespace monitoring port-forward $POD_NAME 9091

For more information on running Prometheus, visit:
https://prometheus.io/

MySQL

[root@Master 005.Prometheus]# helm install prometheus-mysql prometheus-community/prometheus-mysql-exporter -n monitoring
NAME: prometheus-mysql
LAST DEPLOYED: Thu Aug 18 23:07:15 2022
NAMESPACE: monitoring
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace monitoring -l "app.kubernetes.io/name=prometheus-mysql-exporter,app.kubernetes.io/instance=prometheus-mysql" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:9104 to use your application"
  kubectl --namespace monitoring port-forward $POD_NAME 9104

Redis

[root@Master 005.Prometheus]# helm install prometheus-redis prometheus-community/prometheus-redis-exporter -n monitoring
W0818 23:09:25.610247   10775 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
W0818 23:09:25.640420   10775 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
NAME: prometheus-redis
LAST DEPLOYED: Thu Aug 18 23:09:25 2022
NAMESPACE: monitoring
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the Redis Exporter URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus-redis-exporter,release=prometheus-redis" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl port-forward $POD_NAME 8080:

RabbitMQ

[root@Master 005.Prometheus]# helm install prometheus-rabbitmq prometheus-community/prometheus-rabbitmq-exporter -n monitoring
NAME: prometheus-rabbitmq
LAST DEPLOYED: Thu Aug 18 23:11:12 2022
NAMESPACE: monitoring
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus-rabbitmq-exporter,release=prometheus-rabbitmq" -o jsonpath="{.items[0].metadata.name}")
  kubectl port-forward $POD_NAME 8080:9419
  echo "Visit http://127.0.0.1:8080 to use your application"

Elasticsearch

[root@Master 005.Prometheus]# helm install prometheus-elasticsearch prometheus-community/prometheus-elasticsearch-exporter -n monitoring
NAME: prometheus-elasticsearch
LAST DEPLOYED: Thu Aug 18 23:13:14 2022
NAMESPACE: monitoring
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus-elasticsearch-prometheus-elasticsearch-exporter" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:9108/metrics to use your application"
  kubectl port-forward $POD_NAME 9108:9108 --namespace monitoring
0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区