Naming pattern in graphite and statsd

前提是你 提交于 2019-12-01 05:38:36

问题


Problem Description: I have module which does following thing.

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

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. Global QOS
  2. Global action level QOS
  3. Global object level QOS
  4. Host QOS
  5. Host action level QOS
  6. Host object level QOS

回答1:


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)>

Example:

accounts.authentication.password.attempted

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.



来源:https://stackoverflow.com/questions/17542088/naming-pattern-in-graphite-and-statsd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!