我有以下 docker-compose 文件:
version: '3.4'
services:
serviceA:
image: <image>
command: <command>
labels:
servicename: "service-A"
ports:
- "8080:8080"
serviceB:
image: <image>
command: <command>
labels:
servicename: "service-B"
ports:
- "8081:8081"
prometheus:
image: prom/prometheus:v2.32.1
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
restart: unless-stopped
expose:
- 9090
labels:
org.label-schema.group: "monitoring"
volumes:
prometheus_data: {}
Run Code Online (Sandbox Code Playgroud)
docker-compose 还包含具有以下配置的 Prometheus 实例:
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
scrape_configs:
- job_name: …Run Code Online (Sandbox Code Playgroud) 我正在使用Eclipse 3.4.2开发一个项目,并且想知道它有多少非注释代码行(NCLOC).
可以成为一个简单的插件,但我不会太臃肿.我的机器已经很慢了.
我正在查看除代码行之外的一些代码长度指标.Source Monitor报告的内容是语句.这似乎是一件值得知道的事情,但Source Monitor计算某些东西的方式似乎不直观.例如,for语句是一个语句,即使它包含变量定义,条件和增量语句.如果方法调用嵌套在另一个方法的参数列表中,则整个事物被认为是一个语句.
是否有一种标准的方式来计算陈述,并且是他们管理这种事情的规则?
作为一名软件开发人员,我见过很多不同的软件指标,主要是代码质量和错误跟踪.
我听说过"Dilbert指标",即"有多少人在你的团队中阅读和嘲笑Dilbert漫画",这表明你的公司/组织有多糟糕.
在代码审查期间还有"每分钟WTF":http://www.osnews.com/images/comics/wtfm.jpg.
我正在寻找既有趣又又相关的指标,你有吗?
我在这一点上感到困惑.我在Influx和Grafana的深处花了一两天的时间来绘制一些对我的需求至关重要的图表.但是,对于最后一个,我需要总计两个指标(两个增量计数,列值).我们称之为notifications.one和notifications.two.在图中我希望它们显示出来,它可以很好地作为两个图形行的总和,显示(notifications.one + notifications.two)而不是两个单独的图形.
我尝试了通常SELECT sum(value) from的两个,但我没有得到它的任何数据(确实存在!).在Influx的文档中也提到了merge(),但我也无法使用它.
合并文档需要以下内容:
SELECT mean(value) FROM /notifications.*/ WHERE ...
Run Code Online (Sandbox Code Playgroud)
这也是一个扁平的零线.
我希望我的问题有一定的重要性,因为我有足够的知识来尽可能地传达问题.
谢谢.
在研究Service Fabric上的资源平衡器和动态负载指标时,我们遇到了一些问题(运行devbox SDK GA 2.0.135).
在Service Fabric Explorer(门户网站和独立应用程序)中,我们可以看到平衡是经常运行的,大部分时间它几乎立即完成,这种情况每秒都会发生.在查看节点或分区上的负载度量信息时,它不会在报告负载时更新值.
我们根据交互(对服务的HTTP请求)发送动态负载报告,大量增加单个分区的报告负载数据.这个尖峰在5分钟内变得可见,此时平衡器实际上开始平衡.这似乎是加载数据刷新的间隔.在上次报告的时间得到更新所有的时间,但没有新的价值.
我们将指标添加到applicationmanifest和clustermanifest以确保它在平衡中使用.这意味着资源平衡器使用相同的数据5分钟.这是可配置的设置吗?是约束因为它是在devbox上运行的吗?我们在clustermanifest中尝试了很多变量,但似乎都没有影响这个刷新时间.
如果这不适应,有人可以解释为什么你会使用陈旧数据运行平衡器?为什么选择这5分钟的间隔?
我通过遵循prometheus 文档设置prometheus来监控kubernetes指标 .
许多有用的指标现在都出现在prometheus中.
但是,我看不到任何引用我的pod或节点状态的指标.
理想情况下 - 我希望能够绘制pod状态(Running,Pending,CrashLoopBackOff,Error)和节点(NodeReady,Ready).
这个指标在哪里?如果没有,我可以将它添加到某个地方吗?如何?
我试图了解Spark Streaming输出的不同指标是什么意思,我稍微混淆了最后一批处理时间,总延迟和处理延迟之间的差异是什么?
我已经看过Spark Streaming指南,它提到处理时间是一个关键指标,用于确定系统是否落后,但其他地方,如" Pro Spark Streaming:使用Apache Spark的实时分析的禅 "谈论使用总延迟和处理延迟.我没有找到任何列出Spark Streaming生成的所有指标的文档,并解释了每个指标的含义.
如果有人可以概述这三个指标的含义或者指出任何可以帮助我理解这些指标的资源,我将不胜感激.
我正在将Spring Boot应用程序从Spring Boot 1(使用Prometheus Simpleclient)转换为Spring Boot 2(使用Micrometer).
我很难将Spring Boot 1和Prometheus的标签转换为Micrometer中的概念.例如(与普罗米修斯):
private static Counter requestCounter =
Counter.build()
.name("sent_requests_total")
.labelNames("method", "path")
.help("Total number of rest requests sent")
.register();
...
requestCounter.labels(request.getMethod().name(), path).inc();
Run Code Online (Sandbox Code Playgroud)
千分尺的标签似乎与普罗米修斯的标签不同:所有值都必须预先声明,而不仅仅是键.
可以使用普罗米修斯的弹簧(引导)和千分尺标签吗?
我正在阅读log_loss和交叉熵,似乎有两种计算方法
第一:
import numpy as np
from sklearn.metrics import log_loss
def cross_entropy(predictions, targets):
N = predictions.shape[0]
ce = -np.sum(targets*np.log(predictions))/N
return ce
predictions = np.array([[0.25,0.25,0.25,0.25],
[0.01,0.01,0.01,0.97]])
targets = np.array([[1,0,0,0],
[0,0,0,1]])
x = cross_entropy(predictions, targets)
print(log_loss(targets, predictions), 'our_answer:', ans)
Run Code Online (Sandbox Code Playgroud)
输出:0.7083767843022996 our_answer: 0.71355817782,几乎相同。所以这不是问题。
资料来源:http : //wiki.fast.ai/index.php/Log_Loss
以上实现是等式的中间部分。
第二:计算方法是等式的RHS部分:
res = 0
for act_row, pred_row in zip(targets, np.array(predictions)):
for class_act, class_pred in zip(act_row, pred_row):
res += - class_act * np.log(class_pred) - (1-class_act) * np.log(1-class_pred)
print(res/len(targets))
Run Code Online (Sandbox Code Playgroud)
输出: 1.1549753967602232
不太一样。我用numpy尝试过相同的实现也没有用。我究竟做错了什么?
PS:我也很好奇,-y …
metrics ×10
prometheus ×3
analytics ×1
apache-spark ×1
c# ×1
code-metrics ×1
docker ×1
eclipse ×1
grafana ×1
influxdb ×1
java ×1
kubernetes ×1
micrometer ×1
monitoring ×1
python ×1
rebalancing ×1
scikit-learn ×1
spring-boot ×1
statsd ×1
streaming ×1