网站实时信息采集和统计graphite

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的图形仍能以接近实时的方式显示。

http://blog.csdn.net/crazyhacking/article/details/8363235

http://www.infoq.com/cn/articles/graphite-intro?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global

http://segmentfault.com/a/1190000000744706

时间: 2024-08-28 12:03:14

网站实时信息采集和统计graphite的相关文章

如何在网站中加入百度统计

原文:http://jingyan.baidu.com/article/f96699bb92dce9894e3c1b8b.html 可能有部分新站长不太了解如何在自己的网站中加入百度统计.现在我用图文并茂的形式交大家方法.希望能够用得上. 工具/原料 网络 电脑 方法/步骤 首先打开百度首页,点击下图中红色标注部分<更多>.   点击<更多>后会出现下面的内容,再点击<百度统计>,进入统计页面.   如果你有百度站长或百度推广账号,直接输入进去就可以了.如果没有就继续按

【转载】国内网站博客数据统计选免费Google Analytics还是百度统计

[转载]国内网站博客数据统计选免费Google Analytics还是百度统计 Google Analytics谷歌统计是我用的第一个网站统计工具,当然现在也一直在用.Google Analytics凭借其强大的功能和超强的稳定性.快速的反应能力.广泛的数据应用功能,受到了广大站长的追捧. 使用Google Analytics的站长们应该不在少数吧,每天登录Google Analytics免费网站上查看网站的流量也是我们这些站长们必须做的事情,认真分析Google Analytics当中的数据信

基于express+redis高速实现实时在线用户数统计

作者:zhanhailiang 日期:2014-11-09 本文将介绍怎样基于express+redis高速实现实时在线用户数统计. 1. 在github.com上创建项目uv-tj.将其同步到本地: [root@~/wade/nodejs]# git clone [email protected]:billfeller/uv-tj.git 2. 使用npm init初始化node项目(本例不须要复杂的操作,所以暂不使用express工具来生成express应用程序骨架): [root@~/wa

Servlet学习的两个案例之网站访问次数的统计

一.统计次数的Servlet源码 package com.shanrengo; import java.io.IOException; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.

网站点击率统计 Redis Zset NetMq

最近我们在开发一个项目,其中一项需求就是统计网站稿件点击率,为点击时效性前端框架我们采用的是NodeJs+Redis 这种方式 ,数据组织通过Zset 以及关键词进行拆分,每篇稿件对应的是一条Zset 记录,通过Score 增加来统计每篇稿件点击率,后期在通过Net Mq 同步到关系型数据库中,Redis是Keyvalue 型数据库要与关系行数据库对应上,因次必须是对象优先设计出来,这样才能跟好理清逻辑,以及方便数据交互

如何在B2C电子商务网站后台添加CNZZ统计代码(转)

CNZZ作为网站流量数据统计分析工具的一种,和百度统计工具类似,同样也是用于查看分析网站所有流量数据来源的一种站长工具,当然商家可根据自己的习惯在B2C电子商务网站后台添加相应的数据统计代码来管理您的网站.具体设置方式如下: 第一步:获取CNZZ数据统计代码. 1:登录CNZZ数据统计平台(http://www.cnzz.com/),没有账号则需先注册一个账号再登录. 如下图: 2:登录成功后,在添加站点页面中输入网站的名称,域名及相关信息后,点击“确认添加站点”按钮. 如下图: 3:进入获取代

php实现网站访客数量统计的方法(简单实现,不能防刷新)

方法一: <?php function Counter()//定义函数 { $five = "00000";//声明变量,$five,$four等变量表示零的个数,放在数字前边构成6位数 $four = "0000"; $three = "000"; $two = "00"; $one = "0"; $counter = "rec.txt";//存放访问数的目的文件,.dat格式

切分Nginx日志,完成网站访问量的自动统计

如果你的网站通过 Nginx 代理,那么本文将为你提供一个自动统计网站访问量的方案. 方案在实现步骤上,一个分为三步: 1. 运行 shell 脚本,移动 Nginx 日志到指定文件夹,并运行 Python 脚本: 2. 执行 Python 脚本,统计有效的 IP 访问量 3. 设置 crontab 定时任务. 一.shell 脚本 通过 Nginx 配置文件,查看监听端口的日志文件,并移动到指定的路径. 然后运行 Python 脚本,执行处理 Nginx 日志文件的 Python 脚本. sh

实用网站(实时更新)

更新保存一下实用的网站,有博客,总比来回保存浏览器收藏夹标签方便 http://app.protofluid.com/  在线测试工具,模拟移动设备,显示网页设计