简体   繁体   English

Librato>综合指标:减去两米

[英]Librato > Composite Metrics: Subtract two meters

I have two different meters reporting values: 我有两个不同的仪表报告值:

Meter A: Items looked up against data store Meter B: Items returned from data store 仪表A:根据数据存储查找物料仪表B:从数据存储返回物料

I want my chart to also have a composite metric that just tracks the difference between these two values for easy observation. 我希望图表也具有一个复合指标,该指标仅跟踪这两个值之间的差异以便于观察。 However, I'm struggling getting Librato to report this value properly. 但是,我正在努力让Librato正确报告此值。

What I have at this point is based on the subtract example here: http://support.metrics.librato.com/knowledgebase/articles/354670-composite-metrics-language-tutorial 我目前所基于的是这里的subtract示例: http : //support.metrics.librato.com/knowledgebase/articles/354670-composite-metrics-language-tutorial

However, the results it reports are a scale factor off of the real number. 但是,它报告的结果是与实数成比例的比例因子。 It seems the number it reports is the actual number divided by some number, which may be the number of separate sources reporting the value. 它报告的数字似乎是实际数字除以某个数字,这可能是报告该值的单独来源的数量。

For instance Metric A = 100 items Metrics B = 50 items Composite = 25 items ?? 例如,指标A = 100项目指标B = 50项目复合= 25项目?? (seems to be off by factor of 2) (似乎相差2倍)

The factor changes depending on the specific datapoint. 系数根据特定数据点而变化。

Rich, 丰富,

Without seeing the actual data streams I'm just taking a guess, but there are a couple of possibilities: 在没有看到实际数据流的情况下,我只是猜测,但是有两种可能:

  • Picking a summary function: If the metric is reporting multiple client-side aggregated samples, it may be reporting as a complex gauge with individual components of: count, sum, min, max, etc. To view the total number of items in the metric you would want to choose the sum property. 选择摘要功能:如果度量标准正在报告多个客户端聚合的样本,则它可能是作为一个复杂的度量标准进行报告的,具有以下各个组成部分:计数,总和,最小值,最大值等。要查看度量标准中的项目总数您将要选择sum属性。 You can do this by setting "function":sum as an option to the series function. 您可以通过将"function":sum设置为series功能的一个选项来实现。

  • Aligning data points in time: The subtract function works by subtracting points aligned in time. 时间上对齐数据点: subtract功能通过减去时间上对齐的点来工作。 If the two metrics are reporting at different time steps there may be points where they don't align. 如果两个指标在不同的时间步长进行报告,则可能存在一些点不一致之处。 You can fix this by setting a measure_time when POSTing the samples to the API or by setting the period option of the series function to the period of the data. 您可以通过以下方式解决此measure_time在将示例过measure_time到API时设置measure_time或将series函数的period选项设置为数据的周期。

Always feel free to copy us at support@librato.com on any questions. 如有任何问题,请随时通过support@librato.com复制我们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM