Code Monkey home page Code Monkey logo

tsar2db's Introduction

tsar2db用来收集一个cdn节点内tsar的采集数据,存到mysql数据库,提供给其它应用查询
数据保留最近3个月的,各表字段含义和tsar采集定义相同
从mysql的tsar库中可以看到整个cdn节点tsar采集到的数据

配置tsar向tsar2db传送数据vi /etc/tsar/tsar.conf
output_nagios_addr console2:56677
将console2替换成tsar2db的hostname

tsar2db的编译依赖mysql-devel,运行依赖于httpd和mysql-server,其中httpd是用来提供cgi环境供查询
mysql可以下载:
mysql:http://vault.centos.org/5.3/updates/x86_64/RPMS/mysql-5.0.77-3.el5.x86_64.rpm
mysql-devel:http://vault.centos.org/5.3/updates/x86_64/RPMS/mysql-devel-5.0.77-3.el5.x86_64.rpm
mysql-server:http://vault.centos.org/5.3/updates/x86_64/RPMS/mysql-server-5.0.77-3.el5.x86_64.rpm

查询时通过cgi接口指定时间和模块,查看具体数据,比如:
[kongjian@console1 cdnlog]$ curl http://localhost:8082/query.cgi
Error:miss table name.
Table:load mem cpu tcp squid haproxy lvs switch traffic udp tcpx apache partition swap io pcsw 
Host:cache161.cn20 
Start/End:timestamp or stardtime, 1292472000 or 2010-12-16_12:00:00 
Sample as:query.cgi?table=load&start=1292472000&end=1292472060&host=mmdev2.corp.alimama.com 

tsar2db's People

Contributors

kongjian avatar microhuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tsar2db's Issues

用户名和密码都是对的,为什么会出现output_db.c:110 output_db write error:Connection refused?

[root@localhost cron.d]# tsar --cron
[Wed Dec 12 11:12:33 2018] output_db.c:110 output_db write error:Connection refused

开启采集以后,提示无法连接数据库。
tsar2db的配置如下:
[root@localhost cron.d]# cat /etc/tsar2db/tsar2db.cfg
#mysql database hostname or ip
db_address=localhost
#database port default is 3306
db_port=3306
#mysql user info for tsar
db_name=tsar
db_user=root
db_pw=11
#tsar2db port.same as output_nagios_addr at /etc/tsar/tsar.conf
server_port=56677
#log for tsar2db.see more@/var/log/message
debug=0
pid_file=/var/run/tsar2db.pid
配置中用户名和密码都是正确的。请问这是什么问题?或是哪里有详细的错误日志?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.