网站实时信息采集和统计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统计等数 ...
随机推荐
- Python 资料性网站。
伯乐在线:http://blog.jobbole.com/category/python/ http://blog.chinaunix.net/uid/22334392/cid-24327-list- ...
- HTML的footer置于页面最底部的方法
方法一:footer高度固定+绝对定位 <html> <head> <style type="text/css"> html{height:%; ...
- php7 宏杂记
php.h zend_api.h ZEND_FN(name) ---> zif_##name PHP_FUNCTION(name) ...
- Oracle的优化器的RBO和CBO方式
1.基于规则的优化方式(Rule-Based Optimization,简称为RBO) 优化器在分析SQL语句时,所遵循的是Oracle内部预定的一些规则,对数据是不敏感的.它只借助少 ...
- Object Slicing in C++
In C++, a derived class object can be assigned to base class, but the other way is not possible. cla ...
- switch语句相关
Cannot switch on a value of type long. Only convertible int values, strings or enum variables are pe ...
- webpack 报错 path is not defind
webpack.config.js里的内容是这样的,注意标红的地方: 首先,绝对路径'./dist'是 没有问题的 那么,查了很多,最后看到别人的webpack.config.js里面这样写着,现在c ...
- codevs 5965 [SDOI2017]新生舞会
分数规划的裸题. 不会分数规划的OIer.百度:胡伯涛<最小割模型在信息学竞赛中的应用> /* TLE1: last:add(i,j+n,1e9,(real)((real)a[i][j]- ...
- Django学习笔记第七篇--实战练习三--关于更有层级的url请求、404错误以及其他响应函数
一.关于更有层级的URL: 可以实现每一个APP一个子URL目录,例如app1的所有操作都在http://www.localhost1.com:5443/app1/xxxx 在工程主文件夹下的工程同名 ...
- 记录初次使用tesseract的过程
目录 简介 安装tesseract 安装成功 python应用识别图片 简介 这个谷歌的识别项目早就听说了,使用之后发现,真的很厉害.写下初次简单使用的过程吧. 安装tesseract 谷歌的开源识别 ...