- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我有一个 redis 数据库、logstash 和两个 elasticsearch 和一个 influxdb。我正在将 key 从 redis 传输到 elasticsearch,它工作正常并且想测试根本不起作用的 influxdb。
有人有有效的 influxdb 连接器吗?或者我应该如何在 redis 中提供数据以使其正常工作?
这是我的 influx-db 连接,只会引发错误
influxdb {
host => "localhost"
measurement => "sensor1"
allow_time_override => true
use_event_fields_for_data_points => true
exclude_fields => ["@version", "@timestamp", "sequence", "type", "host"]
}
这是我的 redis 连接,工作正常
redis
{
host => "localhost"
data_type => "list"
key => "vortex"
threads => 4
type => "testrecord"
codec => "plain"
}
我试过这种行格式
“传感器1,测量=1 1489594615.9747”作为 redis 的列表,例如
key: vortex
values:
sensor1,measure=1 1489594615.9747
sensor1,measure=1 1489594615.9747
sensor1,measure=1 1489594615.9747
sensor1,measure=1 1489594615.9747
sensor1,measure=1 1489594615.9747
....
但这也行不通。
有人知道如何通过 logstash 从 redis 获取数据到 influxdb 吗?
最佳答案
搜索了几个小时后,我通过以下方式解决了它:
替换保留策略
要使用的保留策略
config :retention_policy, :validate => :string, :default => "autogen"
//config :retention_policy, :validate => :string, :default => "default"<< orignial
在 redis 中我使用了以下字符串格式(没有时间戳)foo=70617 bar=3
logsash 的配置文件如下所示 - 只是作为一个示例,说明如何最终运行 :-)
input {
redis{
host => "localhost"
data_type => "list"
key => "vortex"
threads => 4
type => "testrecord"
codec => "plain"
}
}
filter {
kv {
add_field => {
"test1" => "yellow=cat"
"test=space" => "making= life=hard"
"feild= space" => "pink= dog"
}
}
}
output {
stdout { codec => rubydebug }
influxdb {
host => "localhost"
measurement => "myseries"
allow_time_override => true
use_event_fields_for_data_points => true
exclude_fields => ["@version", "@timestamp", "sequence", "message", "type", "host"]
send_as_tags => ["bar", "baz", "test1", "test=space"]
}
}
关于redis - logstash - influxdb 数据传输,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42815396/
我正在尝试收集 smartctl 指标并将它们推送到 influxdb 中。我很难为插入的值添加标签,以便标签和值位于正确的位置。 如果我这样做: curl -POST 'http://localho
是否可以设置 influxdb 从其他 influxdb 获取数据? 或者有一些本地日志代理用于流入数据。 例如我有 10 个后端服务器。我希望每个后端服务器中间件代码都在 influxdb 或一些本
我正在尝试获取给定测量的标签值。我在 influxDB 中进行了测量,如下所示。 > select * from "EVENT_LIVE" name: EVENT_LIVE time
在尝试理解 InfluxDb 的不同概念时,我遇到了 this文档,其中有与 SQL 数据库的术语比较。 An InfluxDB measurement is similar to an SQL da
我的 influxDB 用例是存储来自不同 PLC 的过程数据并对其进行趋势分析。我使用 grafana 可视化这些数据。在第一个试点中,我使用了 influxDB 的模式设计指南,使用通用测量名称并
有没有办法在 influxdb 中为特定查询创建临时表? (因此它们的范围只是该查询,而不是创建并插入到新的测量中)。 我想过写一个连续查询,但是有restrictions在 where 子句(即时间
在InfluxDB中,可以将多维哈希值post到数据库吗? 例如,这个散列: { "field1": "value1", "field2": { "field2a":
有没有办法从 InfluxDB 测量中选择所有值字段(或所有标签字段)? SELECT * FROM ... 查询选择值 和 标签。 最佳答案 SELECT *::field FROM "measur
什么查询将返回 InfluxDB 中不同主机的数量?我有一小群计算机(希望如此)通过 collectd 将统计数据写入 InfluxDB,但我不知道如何计算计算机成功写入的次数。 编辑:使用 Infl
我正在尝试使用一个我几乎不了解的数据库,我需要知道一个表的列名: 这是我尝试过的: client = DataFrameClient(host, 8086, username, password, "
我的 influxdb 数据库中有一些测量数据,我可以使用这些数据进行查询: 从 E_real_con 中选择 * 名称:E_real_con 时间值(value) ---- ----- 153792
我正在使用 telegraf 将 snmp 数据推送到我的 InfluxDB 并通过 Grafana 将其可视化。 现在我遇到了一个奇怪的问题(很可能只是我的误解......) 鉴于以下系列: snm
每天查询 InfluxDB 特定时间的最佳方法是什么,例如,我有一个有 checkin / checkout 事件的系列,我需要在上个月每天下午 2 点到 3 点之间查看它们,我知道没有在查询语言上执
是否可以使用不同的保留策略处理 influxdb 中的不同测量? 最佳答案 InfluxDB 完全可以做到这一点。为此,您需要创建一个具有两个保留策略的数据库,然后将数据写入关联的保留策略。 例子:
InfluxDB我有两个写点,一个是开始,一个是结束。我只需要确定这两个事件之间的持续时间,并围绕它进行查询。 InfluxDB 有差异()聚合方法,但它不适用于时间元字段。 提供自定义时间戳值是实现
我已经使用 influxDB 一段时间了,但从来没有从它连续流过数据。一个简单的 GET/query 就足够了。但是现在我需要一种将数据流式传输到前端以绘制漂亮图形等的方法。 到目前为止,我们一直在前
能否请您帮助解决以下错误 - INSERT blocks,color=blue number=90 1547095860 ERR: {"error":"partial write: points be
我在 InfluxDB 中设置身份验证时遇到问题。首先跟随教程告诉我更改配置文件: https://docs.influxdata.com/influxdb/v1.7/administration/a
我在 Influxdb 中有 my_db1、my_db2、my_db3,现在有没有办法通过查询在这些数据库之间移动或复制数据? 最佳答案 InfluxQL 提供了一个 INTO可用于在数据库之间复制数
我在 localhost:8086 上运行了 InfluxDB (它是默认的)和在不同端口上运行的 go 程序(因为它必须,也不能在 8086 上运行)。我试图在我的 go 程序中使用 JavaScr
我是一名优秀的程序员,十分优秀!