Tag: 普罗米修斯

使用普罗米修斯的容器度量

我在我的集​​群以及cAdvisor和Grafana上部署了Prometheus。 它运作非常好。 我在Grafana的用户界面上获得了所有需要的数据。 我开始使用Prometheus Java API来使用这些数据。 例如,获取CPU使用情况,如果它有一定的价值将做一些事情。 Grafana上显示的是每个容器的容器CPU使用情况。 现在我想尽可能用Java API来获取这些信息(或者如果没有的话)。 但是,当然,PromQL查询不能从Java程序中使用(从我的尝试,但我可能是错的)。 我想到了几种方法: 克隆cAdvisor项目,直接执行我想在Go中执行的操作 使用docker stat命令创build一个bash脚本,它将使我得到与容器和CPU使用率相关的信息 或者也许实际上有一种方法来发送PromQL查询。 例如,我们通过Java或Prometheus接口获取其名称: 例如: node_cpu会给我一些数据。 但是如果我想要更精确的东西,我需要发送一个请求,例如通过Java无法实现的irate(node_cpu{job="prometheus"}[5m]) 。 有没有办法让我得到更精确的指标?

优雅地停止普罗米修斯docker集装箱

我正在docker集装箱内运行prometheus。 我想知道是否有办法优雅地停止普罗米修斯(没有数据损坏)。 运行docker stop工作? 我找不到任何文档,我是Linux,docker和普罗米修斯的新手。

如何在Docker文件中运行两个python脚本

FROM python:2.7-slim WORKDIR /prometheus_docker ADD . /prometheus_docker RUN pip install -r requirments.txt EXPOSE 80 CMD ["python", "test_pushgateway.py","prometheusAlert.py"] //这是我的docker文件。我想在prometheusAlert.py之后运行test_pushgateway.py脚本,但是我不能这样做。实际上,我想运行一个脚本,我可以在prometheus中推送matrix,并生成警报在控制台。你可以build议我这样做

如何重新同步普罗米修斯的时间?

今天早上我和普罗米修斯有一个问题,晚了两个小时。 所以我有错误的时间戳,没有数据同步。 那么有没有办法重新同步普罗米修斯的时代? (我做了docker-compose down然后docker-compose up但是我不想每次都这样做) https://github.com/stefanprodan/dockprom/issues/9 – >这是我今天早上的错误

Prometheus查询监视通过名称和图像过滤的泊坞窗容器

我有几个docker集装箱运行: docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 736caaa764f4 ubuntu "/bin/bash" 2 hours ago Up 2 hours quirky_morse e2869c98ee1a ubuntu "/bin/bash" 2 hours ago Up 2 hours sleepy_wilson e4149472a2da ubuntu "/bin/bash" 2 hours ago Up 2 hours cranky_booth 70bb44ac5d24 grafana/grafana "/run.sh" 2 hours ago Up 2 hours 0.0.0.0:3000->3000/tcp microservicemonitoring_grafana_1 e4b30881a83e prom/prometheus "/bin/prometheus […]

prometheus notis“样本时间戳无序”

这是我的prometheus.ymlconfiguration信息: $ cat /etc/prometheus/prometheus.yml global: scrape_interval: 15s # By default, scrape targets every 15 seconds. # Attach these labels to any time series or alerts when communicating with # external systems (federation, remote storage, Alertmanager). external_labels: monitor: 'codelab-monitor' rule_files: – "/etc/prometheus/alert.rules" # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus […]

Docker本地主机IP

我正在笔记本电脑上运行各种容器: X1C3:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4daccb82531d prom/prometheus:latest "/bin/prometheus -con" 12 hours ago Up 12 hours 0.0.0.0:9090->9090/tcp berserk_goldstine 32c2c31e0d5f prom/blackbox-exporter "/bin/go-run -config." 12 hours ago Up 12 hours 0.0.0.0:9115->9115/tcp goofy_wescoff 7490523a3bc7 prom/node-exporter "/bin/go-run" 2 days ago Up 2 days sharp_albattani 61303633672b prom/alertmanager "/bin/go-run -config." 2 days ago Up 2 […]

普罗米修斯与ElasticSearch。 哪个更适合于容器和服务器监控?

ElasticSearch是一个文档存储和更多的search引擎,我认为ElasticSearch不是监视高维度数据的好select,因为它消耗了大量的资源。 另一方面,prometheus是一个TSDB,用于捕获高维数据。 任何有经验的人请告诉我什么是容器和服务器监控的最佳工具。

普罗米修斯 – 如何监控其他docker集装箱

我想用普罗米修斯监视我的docker集装箱。 我可以用Grafana运行Prometheus ,但我不知道如何指示它监视其他docker集装箱。 如果可能的话,我想看一些例子。 例如我有我的主机上运行的Ubuntu容器以及Gentoo容器。 我怎么能告诉普罗米修斯监视它们,或者监视一些运行在里面的应用程序? 提前感谢您的时间和耐心与我。