网站实时信息采集和统计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:
- Store numeric time-series data
- 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:
- carbon - a Twisted daemon that listens for time-series data
- whisper - a simple database library for storing time-series data (similar in design to RRD)
- 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/ linkcheckerhttp://blog.chinaunix.net/uid-13875633-id-4217569.html http://blog.csdn.net/puncha/article/details/9092765
http://www.vpsee.com/2012/05/install-graphite-on-ubuntu-12-04/ 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
网站实时信息采集和统计graphite的更多相关文章
- Java使用极小的内存完成对超大数据的去重计数,用于实时计算中统计UV
Java使用极小的内存完成对超大数据的去重计数,用于实时计算中统计UV – lxw的大数据田地 http://lxw1234.com/archives/2015/09/516.htm Java使用极小 ...
- 网络分析shell脚本(实时流量+连接统计)
介绍一个强大的分析网络的shell脚本,此脚本是从EZHTTP拆分出来的,觉得有必要单独介绍下.脚本运行效果截图: 此脚本包含的功能有: 1.实时监控任意网卡的流量 2.统计10秒内平均流量 3.统计 ...
- 【转载】国内网站博客数据统计选免费Google Analytics还是百度统计
[转载]国内网站博客数据统计选免费Google Analytics还是百度统计 Google Analytics谷歌统计是我用的第一个网站统计工具,当然现在也一直在用.Google Analytics ...
- 基于express+redis高速实现实时在线用户数统计
作者:zhanhailiang 日期:2014-11-09 本文将介绍怎样基于express+redis高速实现实时在线用户数统计. 1. 在github.com上创建项目uv-tj.将其同步到本地: ...
- 如何实现对网站页面访问量的统计(javaweb和php)
如何实现对网站页面访问量的统计(javaweb和php) 一.总结 一句话总结:其实很简单啦,每访问一次那个页面对应的index函数(控制器中的那个函数)访问次数就加1就可以了. 1.javaweb中 ...
- 网站实时协作JavaScript库 TogetherJS
TogetherJS是由Mozilla打造的一款可以给网站添加实时协作功能的JavaScript库,TogetherJS免费并且开源,遵循MPL 2.0开源协议,并且托管在Mozilla服务器上. 为 ...
- 如何给网站添加CNZZ站长统计功能代码的常用办法
前几天有个客户来问小编怎么给网站添加上CNZZ站长统计工具,其实这个很简单,只要把cnzz免费代码复制到我们的footer文件就行.今天小编正好有空就来分享一下具体的操作过程. 首先要想获得这个免费的 ...
- proc/net/dev实时网速统计实例【转】
转自:https://blog.csdn.net/dosthing/article/details/80384541 前言 网络编程是程序连接网络拓展的基础,尤其是在物联网.互联网加等概念火热的当下, ...
- 网站每日PV/IP统计/总带宽/URL统计脚本分享(依据网站访问日志)
在平时的运维工作中,我们运维人员需要清楚自己网站每天的总访问量.总带宽.ip统计和url统计等.虽然网站已经在服务商那里做了CDN加速,所以网站流量压力都在前方CDN层了像每日PV,带宽,ip统计等数 ...
随机推荐
- 文件 I/O 问题
文件 I/O 问题:(1)对不存在的或者错误的文件进行操作吗?(2)文件以不正确的方式打开吗?(3)文件结束判断不正确吗?(4)没有正确地关闭文件吗? #include <iostream> ...
- 《Programming with Objective-C》第五章 Customizing Existing Classes
1.分类里面只新增函数,不要新增变量:虽然新增是语法合法的,但是编译器并不会为你的property合成相应的成员变量.setter和getter Categories can be used to d ...
- ReactNative iOS源码解析
http://awhisper.github.io/2016/06/24/ReactNative%E6%B5%81%E7%A8%8B%E6%BA%90%E7%A0%81%E5%88%86%E6%9E% ...
- Target frameworks
https://docs.microsoft.com/en-us/dotnet/standard/frameworks When you target a framework in an app or ...
- WPF进阶之接口(4):ICommand实现详解
上一章WPF进阶之接口():INotifyPropertyChanged,ICommand中我们遗留了几个问题,我将在本节中做出解释.在详细解释ICommand实现之前,我们现在关注一下什么是:弱引用 ...
- php求数学对数
php的对数函数并不是很强大 有自然对数 有10的对数的函数,不过没有自定义底的对数函数,所以自己写了一个 <?php function xsqrt($x, $value) { $count = ...
- UIScrollView小记
视图的滚动过程,其实是在不断修改原点坐标.当手指触摸后,ScrollView会暂时拦截触摸事件,使用一个计时器.假如在计时器到点后没有发生手指移动事件,那么ScrollView发送tracking e ...
- Arduino开发版学习计划--蜂鸣器
文章内容参考:http://www.cnblogs.com/xiaowuyi/p/3343757.html 遇到不懂的方法,可以查看Arduino自带的API 就直接点击arduino的IDE里面菜单 ...
- 深入理解ByteBuffer
ByteBuffer类是在Java NIO中常常使用的一个缓冲区类,使用它可以进行高效的IO操作,但是,如果对常用方法的理解有错误,那么就会出现意想不到的bug. ByteBuffer类的常用方法 先 ...
- LeetCode 笔记系列16.2 Minimum Window Substring [从O(N*M), O(NlogM)到O(N),人生就是一场不停的战斗]
题目:Given a string S and a string T, find the minimum window in S which will contain all the characte ...