使用 statsd 有什么好处?

使用 statsd 有什么好处?

所以过去几天我一直在研究石墨,我看到了它的潜力以及它为什么如此强大。

我的主要问题是,为什么我应该像 esty 和其他许多人一样在它前面使用 statsd?截至目前,我看不出在 graphite 前面放置另一个堆栈有什么大的好处。

我希望有人能澄清一下

https://github.com/etsy/statsd

答案1

于是我进入 IRC 频道并得到了这个

<jY> what are the benefits of putting statsd in front of graphite
 <vvuksan> data aggregation
 <vvuksan> say you wanted to find out how many registrations you have per time period
 <vvuksan> you can either keep track of it yourself
 <vvuksan> send to graphite every minute
 <vvuksan> or
 <vvuksan> any time there is a successful registration send a packet to statsd and let statsd deal with it
 <jY> ok.. so i  just keep incing the counter then to statsd?
 <vvuksan> no
 <vvuksan> you just send to statsd
 <vvuksan> statsd will increment it for you
 <jY> ok
 <vvuksan> you can do all this yourself
 <vvuksan> it's just more work
 <jY> could i also send stuff like load avg to statsd.. or should that go right to graphite?
 <vvuksan> that should go right to graphite
 <vvuksan> cause that is already a composite metric
 <vvuksan> not just a data point
 <jY> ok so it's really only app specific stuff 
 <jY> ok thanks.. clears up a lot
 <jY> statsd would be good to send logins to.. so i can see how many logins per minute i get in other words
 <vvuksan> yeah
 <vvuksan> or what's average response time of an external API
 <vvuksan> it will also do percentiles which is useful
 <vvuksan> you could even do how long it took to execute a particular important query
 <jY> great.. thanks that cleared up a lot

因此,我的结论是将系统统计信息(如可用内存/驱动器空间/用户登录权限)发送到 graphite,并发送应用程序统计信息(如用户登录到 statsd 并让 statsd 发挥其魔力,为 graphite 生成良好的数据)

相关内容