【问题标题】:Tick script with multiple tag values带有多个标签值的勾选脚本
【发布时间】:2019-03-05 12:23:26
【问题描述】:

我有一个刻度脚本,我必须在多个 interface_name 上使用 where 子句运行查询,看起来像这样:

query('''SELECT last("state") as "value" FROM router.autogen.cisco_router where type = 'interface' and host = '10.66.14.82' and ("name"='GigabitEthernet0/0/0' OR "name"='GigabitEthernet0/0/1') ''')

这个查询在 influx db 上运行,但是 kapacitor 把这个查询改成这样:

`SELECT last("state") as "value" FROM router.autogen.cisco_router where type = 'interface' and host = '10.66.14.82' and (\"name\"='GigabitEthernet0/0/0' OR \"name\"='GigabitEthernet0/0/1')`

如何在刻度脚本中避免 \ 之前的 "

【问题讨论】:

  • name 是标签吗?
  • 是的,我在创建新标签名称 interface_name 后能够解决问题

标签: influxdb kapacitor


【解决方案1】:

我没有找到任何答案,所以我创建了一个具有不同名称的新标签,它解决了问题。

【讨论】:

    猜你喜欢
    • 2012-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-10
    相关资源
    最近更新 更多