石墨的命名方式和统计 [英] Naming pattern in graphite and statsd

查看:153
本文介绍了石墨的命名方式和统计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题描述: 我有做以下事情的模块.

Problem Description: I have module which does following thing.

delete/folder
delete/file
move/folder
move/file

此应用程序正在多个主机上运行.我找不到更好的命名空间模式来将其存储在statsd中:

This application is running on multiple host. I am not able to find better namespace pattern for storing it in statsd:

我已经考虑过以下模式:

I have thought about following patterns:

<env>.<app>.<action>.<object>.<host>.exec_time
<env>.<app>.<action>.<object>.<host>.failed
<env>.<app>.<action>.<object>.<host>.succeeded

我在想的第二种模式是:

Second pattern I am thinking is:

<env>.<app>.<object>.<action>.<host>.exec_time
<env>.<app>.<object>.<action>.<host>.failed
<env>.<app>.<object>.<action>.<host>.succeeded

我还能有更多这样的模式吗?

I can have some more pattern like this?

<env>.<app>.<object>.<action>.exec_time.<host>
<env>.<app>.<object>.<action>.failed.<host>

我找不到哪种模式是好的,为什么?你能建议

I am not able to find which pattern will be good and why? Can you please suggest

目前,我正在考虑遵循以下指标.

Currently I am thinking about following metrics.

  1. 全球QOS
  2. 全球行动水平QOS
  3. 全局对象级别QOS
  4. 主机QOS
  5. 主机操作级别QOS
  6. 主机对象级别QOS

推荐答案

这非常取决于您的需求.您已经遵循了一些一般规则(例如常识),但是整个主题都是非常个别的.

This is very dependent on your needs. There are some general rules to follow (like common sense) which you have followed already, but this entire topic is very individual.

我确实遇到了一个不错的指南一起在这个话题上.从指南中:

I did encounter a nice guide someone put together on this topic though. From the guide:

<namespace>.<instrumented section>.<target (noun)>.<action (past tense verb)>

示例:

accounts.authentication.password.attempted

accounts.authentication.password.attempted

虽然该指南提供了一些不错的见解,但我认为这将是反复试验的结果.在我的公司中,我们有100多个指标,并且花了一些时间来组织它们.您还应该学习如何从Carbon删除不必要的指标!它将帮助您清理石墨接口,避免在那里看到垃圾.

While the guide provides some nice insights, my opinion is that it will be a bit of trial and error. At my company we have 100s of metrics, and it took a while to organize them. You should also learn how to delete unnecessary metrics from Carbon too! It will help you clean out your graphite interface to avoid seeing garbage in there.

这篇关于石墨的命名方式和统计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆