influxdbkapacitor

Tick script with multiple tag values


I have a tick script where I have to run query with where clause on multiple interface_name which looks something like this:

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') ''')

and this query run on influx db but kapacitor change this query to something like this:

`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')`

how to avoid \ befor " in tick script.


Solution

  • I did not find any answer so i created a new tag with a different name and it solved the problem.