Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Naming pattern in graphite and statsd

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
like image 1000
Vivek Goel Avatar asked Mar 24 '23 06:03

Vivek Goel


1 Answers

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.

like image 66
Adam Avatar answered Apr 02 '23 13:04

Adam