Comments (20)
graphite.py 是自己编写的呢,不然谁来帮我自动生产呢 :) 其实graphite.py
是按照 scrapy 数据收集器的模式来收集数据并且进行监控,只不过是将scrapy 的scrapy.stats
换成了graphite
,而graphite
的核心就是收集数据,然后画图展示,过一段时间,再收集数据,然后再画图,更详细的信息就要参考graphite
的文档了或者是参考 https://github.com/gnemoug/distribute_crawler
from jd_spider.
可以加一下楼主的qq或微信吗,关于怎么创建项目(项目创建过程)还是有点不懂,请教一下!!(qq:2514705610 weixing:wy18672353951)
from jd_spider.
你把自己的联系方式暴露出来了: ) 讨论技术问题的时候我用邮件,你可以发邮件给我,或者是在issue 上阐述你的问题嘛
from jd_spider.
哈哈,就是那个docker run -d
--name graphite
--restart=always
-p 80:80
-p 2003-2004:2003-2004
-p 2023-2024:2023-2024
-p 8125:8125/udp
-p 8126:8126
samrayleung/graphite-statsd(这里你说要配置一下,怎么配置),我可以运行官网的那个docker
run ........hopsoft /graphite-statsd。
不明白怎么配置!!
还有就是graphite.py文件我看不懂,有没有教程什么的 so sad.
from jd_spider.
最完整的graphite教程就是graphite 的官方文档, 虽说graphite 的文档齐全,但是graphite 的安装还是很麻烦的,并且只能在Linux 安装了,此外,为了让graphite 可以配合scrapy, 需要做额外的配置,参考scrapy-graphite. 说了这么多,就是想说graphite 安装麻烦,配置也麻烦,为了简化这些麻烦的东西,我做了个docker镜像,把所有东西都配置好了,只要用docker 跑起来就可以了, 如果跑了docker 还有问题的话,可以参考#16
from jd_spider.
你做的docker镜像是哪个??在哪啊,怎么用你的镜像(直接docker吗)
新手,刚学docker
from jd_spider.
我做的镜像在 samrayleung/graphite-statsd
, 也就是https://hub.docker.com/r/samrayleung/graphite-statsd/. 通过
docker run -d
--name graphite
--restart=always
-p 80:80
-p 2003-2004:2003-2004
-p 2023-2024:2023-2024
-p 8125:8125/udp
-p 8126:8126
samrayleung/graphite-statsd
命令拉取并且运行我的docker 镜像.如果还有什么疑问的,就应该去看docker 的文档了.
from jd_spider.
楼主,还是不行(使用了你的镜像和那个graphiteapp/graphite-statsd镜像都不行)。
log显示是:could not connect to graphite
from jd_spider.
楼主加我QQ吧!(ó﹏ò。)
from jd_spider.
是不是我是Windows安装的docker的原因:(
from jd_spider.
我知道了,是graphite中的IP和端口的问题,它用的是localhost,但是Windows用的不是这个IP!!
但是自己对graphite.py还是有很多地方看不懂(官方文档的介绍太少了,还是我看不明白?)
from jd_spider.
目测是你看不明白๑乛◡乛๑ graphite 的文档非常齐备,甚至有点多.scrapy
的statscol
感觉也挺好理解的
from jd_spider.
scrapy的statscol怎么理解,在哪里学习啊,有没有链接
from jd_spider.
我在上面已经把statscol
给你列出来了:
其实graphite.py是按照 scrapy 数据收集器的模式来收集数据并且进行监控,只不过是将scrapy 的scrapy.stats换成了graphite
from jd_spider.
楼主,我可以连接到garphite但是没有数据没有传过去。redis中是有数据的,但是传不过去。
from jd_spider.
我对graphite.py的修改:
def init(self, host="192.168.99.100", port=2003):
try:
#调用color模块的color_style()方法
self.style = color.color_style()
#创建套接字,AF_INET是套接字家族,SOCK_STREAM是套接字类型(面向连接的)
self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#套接字客户端连接(初始化TCP服务器连接)
self._sock.connect((host, port))
还有就是 GRAPHITE_HOST = '192.168.99.100'
GRAPHITE_PORT = 2003;和settings.py的 GRAPHITE_HOST = '192.168.99.100'
其他部分都没变。
传不了数据到graphite(windows的ip是192.168.99.100)
可能是什么原因呢
from jd_spider.
from jd_spider.
楼主,已经能传入数据到graphite,但是为什么显示的时间不对(我是晚上搞的,显示的时间是14点多)
好奇怪 =。=
from jd_spider.
感谢楼主一直回答我的问题,thanks(感觉自己很笨。。对于graphite文件还是有一些不懂的地方)
from jd_spider.
对graphite.py中的函数有部分还是不太明白,另一个问题是:不是太明白当中的函数执行顺序(先执行那个,后执行哪个)--流程不太明白
from jd_spider.
Related Issues (19)
- 加个好友吧,谢谢! HOT 1
- 请教一下为什么爬出来的数据80%以上都是图书? HOT 15
- erro HOT 18
- 如何用python3? HOT 18
- 项目中Scrapy-Redis的核心代码在哪里可以找到。 HOT 4
- 同一个商品多个sku,如何获取所有sku的信息 HOT 15
- 大佬,能不能借用一下你的部分爬到的数据,诚心感谢啊 HOT 4
- graphite 没有监控到 scrapy 数据 HOT 1
- 爬虫优化 HOT 2
- scrapy_redis HOT 1
- 能不能写个java版本的出来啊 HOT 1
- 京东前端策略更改了吧,这样的抓取不到了 HOT 6
- 新手。。如何运行 HOT 6
- 使用scrapy-splash渲染javascript HOT 3
- 没有验证重复的商品? HOT 2
- 好像不是分布式的? HOT 5
- 爬取页数限制 HOT 1
- 下载问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jd_spider.