statsd

How does StatsD store its data?

给你一囗甜甜゛ 提交于 2019-12-06 21:02:31
问题 I've been going through the README at https://github.com/etsy/statsd but I can't figure out how does StatsD store the data it gets? Does it do any permanent storage or is it one off thing? I was trying to figure out what database (if any) it uses or if it simply uses a file-based storage. 回答1: Etsy's version of statsD does not store data per se but relies on "backends" to do something with the data it aggregates (e.g. print them out, send them to another statsD server or send them to graphite

安装Collectd+Statsd + Graphite 监控openstack swift

ぃ、小莉子 提交于 2019-12-06 01:07:52
Graphite 安装必要软件包: $ sudo apt-get install apache2 libapache2-mod-wsgi python-django \ python-twisted python-cairo python-pip python-django-tagging 用 pip 安装 whisper (简单的存放和操作数据的库), carbon (监控数据的 Twisted 守护进程) 和 graphite-web (Django webapp): $ sudo pip install whisper $ sudo pip install carbon $ sudo pip install graphite-web 初始化配置,直接用 example 文件里的默认配置就可以: $ cd /opt/graphite/conf/ $ sudo cp carbon.conf.example carbon.conf $ sudo cp storage-schemas.conf.example storage-schemas.conf $ sudo cp graphite.wsgi.example graphite.wsgi 修改 apache 配置,增加一个 vhost 或者偷懒下载一个配置文件覆盖 default,覆盖后需要重新 reload 配置: $ wget

How to alert in Seyren with Graphite if transactions in last 60 minutes are less than x?

旧时模样 提交于 2019-12-05 23:21:12
问题 I'm using Graphite+Statsd (with Python client) to collect custom metrics from a webapp: a counter for successful transactions. Let's say the counter is stats.transactions.count , that also has a rate/per/second metric available at stats.transactions.rate . I've also setup Seyren as a monitor+alert system and successfully pulled metrics from Graphite. Now I want to setup an alert in Seyren if the number of successful transactions in the last 60 minutes is less than a certain minimum . Which

Can writing to a UDP socket ever block?

三世轮回 提交于 2019-12-05 15:03:54
问题 And if so, under what conditions? Or, phrased alternately, is it safe to run this code inside of twisted: class StatsdClient(AbstractStatsdClient): def __init__(self, host, port): super(StatsdClient, self).__init__() self.addr = (host, port) self.server_hostname = socket.gethostname() self.udp_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) def incr(self, stat, amount=1): data = {"%s|c" % stat: amount} self._send(data) def _send(self, data): for stat, value in data.iteritems(): self

聊聊 Statsd 和 Collectd 那点事!

99封情书 提交于 2019-12-05 04:42:14
StatsD 是由 Etsy 开发并发布的汇总和总结应用指标的一个简单的守护进程,近些年来发展迅速,已经变成了一个用于收集应用性能指标的统一的协议。 关于 Statsd 的使用已经有很多文章介绍过,所以本文也不再赘述,本文主要来聊一聊它的来源原理以及和它类似的一个工具 Collectd 。 Etsy 使用 Statsd 监控系统应用 Etsy 工程师曾写 blog 介绍自己怎样使用 statsd 以及为什么使用它,有时间可以看一看这篇文章 Measure Anything, Measure Everything 。 Statsd 最初是由 Etsy 的 Erik Kastner 编写配合 Graphite/Carbon 使用的前端进程,最初是为了汇总和总结应用指标。开始使用的语言是 Node,后来其他语言也开发了此功能。它收集数据时基于2大功能: Counting & Timing 。应用程序的指标通过特定语言的客户端库进行检测,然后这些库用很简单的协议和 Statsd 后台守护进程进行通信,后台进程汇集指标并把他们传递到绘图软件或监控后台。 Statsd 如和工作 首先,你可以通过 Statsd 收集任何你想要的数据,例如 Gauges , Counters , Timing 和 Sets ,Statsd 客户端库通过发送 UDP 数据包来调用每个 Statsd 服务器,使用

How does StatsD store its data?

我的梦境 提交于 2019-12-05 02:51:33
I've been going through the README at https://github.com/etsy/statsd but I can't figure out how does StatsD store the data it gets? Does it do any permanent storage or is it one off thing? I was trying to figure out what database (if any) it uses or if it simply uses a file-based storage. Etsy's version of statsD does not store data per se but relies on "backends" to do something with the data it aggregates (e.g. print them out, send them to another statsD server or send them to graphite) as shown in https://github.com/etsy/statsd/tree/master/backends . If you want permanent storage, you'll

docker 相关问题和快速使用命令

亡梦爱人 提交于 2019-12-04 09:18:27
命令 清理none镜像 docker rmi $(docker images -f "dangling=true" -q) 强制清空 docker rmi $(docker images -q) -f docker时间问题 日志打印时间和系统时间差8个小时 项目中打印日志时间和系统外部用 date 命令打印的时间差了8个小时。 问题原因: 外部虽然修改了时区和时间,但是docker容器中的时间并没有修复,所以需要将外部的文件引入到内部里。 解决的方式在dockerfile 里添加一句 RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 但是docker 好像不能直接从外部copy, 所以上面这个一般不能成功 所以需要将 /usr/share/zoneinfo/Asia/Shanghai , Shanghai拷贝到和Dockerfile同一个目录 然后使用命令 COPY Shanghai /etc/localtime 这个时候docker 里面的utc时间就转换成了中国时间,就不会少了8个小时 使用alpine修改时区问题 上面修改时区的 在使用alpine的时候处理怎么都不能转换成功,google到一个解决方法 Bug #5543 docker run -it --rm alpine /bin/sh /

Having trouble getting accurate numbers from graphite

若如初见. 提交于 2019-12-04 08:42:23
问题 I have an application that publishes a number of stats to graphite via statsd. One of the stats simply sends a stat increment to statsd every time a message is received by the service. I need to display a graph that shows the the relative traffic over time for this stat. Generally speaking, I should be able to display a graph that refreshes every, say 10 seconds, and displays how many messages were recived in those 10 seconds as well as the history for a given period of time. However, no

DevOps专题 |监控,可观测性与数据存储

隐身守侯 提交于 2019-12-04 08:10:45
对于DevOps而言,监控是其中重要的一环,上一次的专题内容中,我们与大家分享了大型企业级监控系统的设计。今天我们将和大家从另一个角度进一步探讨互联网工程技术领域的监控设计(monitoring):系统的可观测性(observerbality)。 无论监控,还是可观测性,都是工程界的术语,并非严格定义的概念。人们可以描述它,但很难定义它。所以本文不会纠结于这些名词之间的区别。 在实践中,所有这些概念/术语,目标都是增强工程师对于线上系统运行情况的了解。 对工程师而言,监控/可观测性工程存在的意义,是帮助工程师发现问题,定位问题,解决问题。 对系统自身而言,这些工作都是通过数据的采集/存储/分析,以及进一步迭代来完成。 一、监控需求的产生 当程序被交付,部署到生产环境,才是其生命周期中最长的部分的开始。人们需要了解生产环境是否一切正常,监控需求自然而然产生。 互联网发展过程中涌现大量监控相关的工具/系统,Ganlia, Zabbix, RRDTools, Graphite,各自在不同的层面为“是否正常”提供答案。 监控本身,无论是业界对监控的认知,监控工具/系统自身的能力,也在以下两个方向演进着: 黑盒到白盒 资源到业务 这个阶段监控的愿景是很明确的,如何落地则各显神通。 直到 Etsy 于 2011 年通过博客公开了他们的 监控实践,利用 StatsD(已开源)

How to alert in Seyren with Graphite if transactions in last 60 minutes are less than x?

本小妞迷上赌 提交于 2019-12-04 04:52:26
I'm using Graphite+Statsd (with Python client) to collect custom metrics from a webapp: a counter for successful transactions. Let's say the counter is stats.transactions.count , that also has a rate/per/second metric available at stats.transactions.rate . I've also setup Seyren as a monitor+alert system and successfully pulled metrics from Graphite. Now I want to setup an alert in Seyren if the number of successful transactions in the last 60 minutes is less than a certain minimum . Which metric and Graphite function should I use? I tried with summarize(metric, '1h') but this gives me an