我有一个刻度脚本,我必须在多个 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')`
如何避免\
在"
刻度脚本中出现之前。