我可以看到目标状态为关闭,并且错误“INVALID”不是普罗米修斯控制台中的有效启动令牌。
我按照以下步骤操作:
以下是详细信息——
普罗米修斯日志:
level=warn ts=2019-09-06T11:42:42.187Z caller=scrape.go:937 组件=“抓取管理器” scrape_pool=weblogic1 target=http://************。*.****.* :7001/wls-exporter msg="追加失败" err="\"INVALID\" 不是有效的启动令牌"
curl output1 :-
-bash-4.2$ curl http://**********.***.****.***:7001/wls-exporter | promtool check metrics
-bash: promtool: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1783 100 1783 0 0 323k 0 --:--:-- --:--:-- --:--:-- 348k
(23) Failed writing body …Run Code Online (Sandbox Code Playgroud)假设我有一个request_failures用户指标。对于每个用户,我向指标添加一个唯一的标签值。因此,对于用户u1,当请求失败两次时,我得到以下指标:
request_failures{user_name="u1"} 2
Run Code Online (Sandbox Code Playgroud)
我还有一条规则,当出现新的失败时就会触发。其表达式为:
increase(request_failures[1m]) > 0
Run Code Online (Sandbox Code Playgroud)
这对于已经遇到故障的用户来说非常有效。例如,当 u1 遇到第三次失败时,规则就会触发。
当新用户u2的请求失败时,我得到的指标如下:
request_failures{user_name="u1"} 2
request_failures{user_name="u2"} 1
Run Code Online (Sandbox Code Playgroud)
现在的问题是警报规则不会针对u2触发。该规则似乎无法识别“新指标”,尽管所有三个指标都是相同的request_failures,只是具有不同的标签。
任何人都可以指出我应该如何构建规则?
我每天多次运行构建脚本。我的感觉是我和我的同事花了相当多的时间等待这个脚本的执行。现在我想知道:我们每天花多少时间等待脚本执行?。我可以对总体平均值感到满意,即使我真的很想获得每日数据(例如“上周一我们花了 X 分钟等待脚本执行,周二......)
为了找到答案,我用推送网关启动了 Prometheus。在构建脚本中,我向推送网关添加了一个 REST 调用,该调用发布counter标有机器名称的指标(类型:)以及执行脚本所用时间的示例数据。
正在收集数据,但我意识到我收集的数据不足以回答我的问题,我需要将我推送的指标(即:当前运行经过的时间)累积到以前的数据。查看文档,我感觉推送网关不支持此功能:
Pushgateway 显然不是聚合器或分布式计数器,而是指标缓存
我的问题是:
我们有一个 Prometheus Pushgateway 正在运行并监听来自 AWS Lambda 函数的指标推送。然而,Pushgateway 的 URL 可供公众访问,这可能会带来一些安全问题。我们想知道是否有任何方法可以为 Pushgateway 添加一层保护,使其无法公开访问?
我发现这个 Github 线程可以回答这个问题: https://github.com/prometheus/pushgateway/issues/281
建议在pushgateway前面设置一个反向代理。但是,我仍然对这实际上如何运作感到困惑?我们目前正在使用 Kubernetes 来部署 Prometheus。
嗨,我目前正在修复我的 valgrind 错误,它们是:
==11925== ERROR SUMMARY: 9 errors from 1 contexts (suppressed: 0 from 0)
==11925==
==11925== 9 errors in context 1 of 1:
==11925== Syscall param ioctl(generic) points to uninitialised byte(s)
==11925== at 0xF8B7F47: ioctl (syscall-template.S:84)
==11925== by 0x1F770DAD: drmIoctl (in /opt/amdgpu/lib/x86_64-linux-gnu/libdrm.so.2.4.0)
==11925== by 0x1F7756E8: drmCommandWriteRead (in /opt/amdgpu/lib/x86_64-linux-gnu/libdrm.so.2.4.0)
==11925== by 0x3332C6AC: amdgpu_create_bo_from_user_mem (in /opt/amdgpu/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1.0.0)
==11925== by 0x32A479F2: ??? (in /usr/lib/x86_64-linux-gnu/gallium-pipe/pipe_radeonsi.so)
==11925== by 0x32A6E6B3: ??? (in /usr/lib/x86_64-linux-gnu/gallium-pipe/pipe_radeonsi.so)
==11925== by 0x2D8E8BD6: ??? (in /usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1.0.0)
==11925== by 0x2D8E05D4: ??? (in /usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1.0.0)
==11925== …Run Code Online (Sandbox Code Playgroud) prometheus ×4
alert ×1
c++ ×1
ioctl ×1
networking ×1
rules ×1
security ×1
valgrind ×1
weblogic ×1