InfluxDB

Kapacitor .post() HTTP Post to url not sending data

隐身守侯 提交于 2019-12-10 15:29:45
问题 I am using kapacitor to send alert to URL using HTTP POST. Written script is hitting on given url but it is not sending related data to any of given url. Following is my TICK script. stream |from() .measurement('cpu') |alert() .id('kapacitor/{{ index .Tags "host"}}') .message('{{ .ID }} is {{ .Level }} value:{{ index .Fields "value" }}') .info(lambda: TRUE) .post('http://localhost:1440/alert') .post('http://localhost/test.php') Following is a first post script: var express = require("express"

Left join in influx DB

冷暖自知 提交于 2019-12-10 12:42:48
问题 I am new to influx DB. Now I need to migrate MySQL db into influxDB. I chose influx DB because it support SQL like queries. But I could not found left join in it. I have a series called statistics which contains browser_id and another series contains browser list. How can I join these 2 tables like relational database concept? I wrote this query but it is not giving any result. select * from statistics as s inner join browsers as b where s.browser_type_id = b.id statistics browsers 回答1: You

How to add a plugin to Telegraf?

耗尽温柔 提交于 2019-12-10 09:47:31
问题 Hello I would to know if someone have all ready add a plugin to telegraf for Influxdb . I have my go code which is working. What do I need next and where to put theses files? I've found that I need to do something like this: type ReadFile struct { //buf []byte //MemoryBytes int64 //PID int } func (s *ReadFile) Description() string { return "This is a test plugin to read data from a file and send them to influxdb" } func (s *ReadFile) SampleConfig() string { return "ok = true # indicate if

Statsd and InfluxDB: how to handle host information?

懵懂的女人 提交于 2019-12-10 09:46:04
问题 I want to measure statsd performance metrics in a couple of applications on a couple of hosts. Those measurements will be aggregated by statsd, then stored in influxdb and then visualized in grafana. The architecture will be very similar to the one shown in this blog post: http://www.symantec.com/connect/blogs/metrics-cocktail-statsdinfluxdbgrafana App -> Statsd -> InfluxDB -> Grafana My application 'app1' runs on host1, host2, host3 in environment 'prod'. So my statsd metrics names as sent

监控报警系统搭建及二次开发经验

。_饼干妹妹 提交于 2019-12-10 09:02:55
本次分享的内容是监控报警系统搭建,以及基于开源组件的二次开发。自从接受了公司监控报警系统二期开发需求以来,我们完成了监控数据的补全完善、报警系统搭建调试和报警规则配置界面的开发。下图是监控报警系统的架构图,除了业务数据收集器外,其余全部基于原生开源组件或二次开发完成,整个系统采用TICK(telegraf + influxdb + chronograf + kapacitor)架构,使用go语言实现。 influxdb时间序列数据库 influxdb 数据库是一个时间序列数据库,他会为每行数据打上时间戳,即使数据被并发写入,也会按照时间先后顺序存储。同时它也是一个关系型数据库,可以通过sql语言进行增删改查,学习成本低。官方提供了一个简单实用的web界面,非常地人性化。在工程实践中,我们发现了它的一个坑,在大数据量查询时会crash,重启后才能恢复,这个问题仍待研究。不必担心的是,因为监控系统中不存在特别大数据量的查询,生产环境下influxdb的性能表现十分良好。 telegraf数据收集器 telegraf 是一个数据收集器,负责收集所有的原始数据,格式化后存入influxdb。telegraf内置了大量的数据输入、输出和分析插件,能够收集php-fpm、nginx、access log、mysql、redis等组件的监控数据。telegraf的扩展性很强,开源社区也十分活跃

Calculating duration between a start and end event in InfluxDB

送分小仙女□ 提交于 2019-12-09 17:09:07
问题 I have two write points for InfluxDB, one is the start and the other is the end. I just need to determine the duration between those two events, and make queries around it. InfluxDB has difference() aggregate method, but it doesn't work on the time meta field. Is supplying a custom timestamp value the only way to accomplish this? 回答1: If you write only the mentioned two entries then you can follow the below steps - Limit the result to two (Eg: select * from timeseries limit 2) Extract the

InfluxDB&Grafana在Ubuntu上搭建总结

六眼飞鱼酱① 提交于 2019-12-09 14:49:21
一、InfluxDB https://influxdata.com/downloads/ ubuntu: 1、下载: curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/lsb-release echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list 2、安装: sudo apt-get update && sudo apt-get install influxdb sudo service influxdb start 3、配置: /etc/influxdb/influxdb.conf 修改端口和db存放位置 4、启动: sudo service influxdb start sudo service influxdb restart sudo service influxdb restart 启动参考日志: /var/log/influxdb/influxd.log 5、卸载 apt-get remove --purge influxdb 二、Grafana

How do you INSERT into influxDB using the SQL-like interface?

时光总嘲笑我的痴心妄想 提交于 2019-12-08 20:35:08
问题 Is it possible to INSERT data into series / measurements using the SQL-like interface on InfluxDB? 回答1: Yes, you can simply INSERT a Line Protocol string. An example from Getting Started: INSERT cpu,host=serverA,region=us_west value=0.64 A point with the measurement name of cpu and tags host and region has now been written to the database, with the measured value of 0.64 . 来源: https://stackoverflow.com/questions/47447511/how-do-you-insert-into-influxdb-using-the-sql-like-interface

Issue formatting data for insert into influxdb

纵然是瞬间 提交于 2019-12-08 19:18:59
问题 I am not understanding the format needed to insert data. Why doesn't test a=dog,b=0,c=nice work? On the site, I see that <measurement>[,<tag-key>=<tag-value>...] <field-key>=<field-value>[,<field2-key>=<field2-value>...] is the format to follow. I also am reading you can have 0-many tags (in the above example I have zero tags) Not sure what I am violating or why the error I keep getting is {"error":"unable to parse 'test a=dog,b=0,c=nice': invalid boolean"} Who said anything about a boolean!?

How to configure telegraf to send a folder-size to influxDB

冷暖自知 提交于 2019-12-08 18:09:30
I am having a hard time understanding and using the disk plugin. I want to emit the folder size for /var/lib/influxdb/hh/ , and I am trying to figure out how to wire this using the disk plugin. I have tried the following : setup a new configuration file for telegraf here vi /etc/telegraf/telegraf.d/influxdbdata_telegraf.conf added this configuration [[inputs.disk]] mount_points = ["/var/lib/influxdb/hh/"] now I try to query the data from influxDB, and I don't see this. But I see the other measurements. I am definitely confused with the usage of disk plugin. I can write an exec plugin and