绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
网站实时信息采集和统计graphite
2022-04-21 14:21:34

Graphite 是一个Python写的web应用,采用django框架,Graphite用来进行收集服务器所有的即时状态,用户请求信息,Memcached命中率,RabbitMQ消息服务器的状态,Unix操作系统的负载状态,Graphite服务器大约每分钟需要有4800次更新操作,Graphite采用简单的文本协议和绘图功能可以方便地使用在任何操作系统上。

官方文档:https://graphite.readthedocs.org/en/latest/overview.html

What Graphite is and is not

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know how to send data to graphite. Even though it often requires a little code, sending data to Graphite is very simple.

About the project

Graphite is an enterprise-scale monitoring tool that runs well on cheap hardware. It was originally designed and written by Chris Davis at Orbitz in 2006 as side project that ultimately grew to be a foundational monitoring tool. In 2008, Orbitz allowed Graphite to be released under the open source Apache 2.0 license. Since then Chris has continued to work on Graphite and has deployed it at other companies including Sears, where it serves as a pillar of the e-commerce monitoring system. Today many large companies use it.

The architecture in a nutshell

Graphite consists of 3 software components:

  1. carbon - a Twisted daemon that listens for time-series data
  2. whisper - a simple database library for storing time-series data (similar in design to RRD)
  3. graphite webapp - A Django webapp that renders graphs on-demand using Cairo (cairo:绘图)

Feeding in your data is pretty easy, typically most of the effort is in collecting the data to begin with. As you send datapoints to Carbon, they become immediately available for graphing in the webapp. The webapp offers several ways to create and display graphs including a simple URL API for rendering that makes it easy to embed graphs in other webpages.

架构图:

在这个图中我们可以看到Carbon先将数据写入到Whisper数据库文件中,然后Graphite Webapp去读取这个数据,然后显示出图形。但是实际上这个体系采用了缓存,数据可能先到缓存中,然后Webapp读取,显示出图形。这也是为什么在主机I/O反应不过来时Webapp的图形仍能以接近实时的方式显示。

python遇到ssl错误:

You can try to bypass the SSL error by using http instead of https. Of course this is not optimal in terms of security, but if you are in a hurry it should do the trick:

pip install --index-url=http://pypi.python.org/simple/ linkchecker
http://blog.chinaunix.net/uid-13875633-id-4217569.html
分享好友

分享这个小栈给你的朋友们,一起进步吧。

Graphite
创建时间:2022-04-21 10:18:11
Graphite
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

技术专家

查看更多
  • LCR_
    专家
戳我,来吐槽~