Sideload node value should be passed under "wherenode" as variable

Hi there,

brief desc: Retriving value from .yml (using sideload) and need to use in “where” node by passing the value

Am writing tick script for disk . Have 10+ mount point, from that i need only limited or less then 5(Depends on server’s) .

Here i used

side load

and have .yml file like below:

Test.yml
{
“mountpath”:“/oracle”
}

Question : How to write a tick script (that script should refer the .yml file for value in our case “/oracle”) to query influxdb to only show the details of “/oracle” mount point

I don’t think so the below code help me

Tick script

var data = stream
|from()
.database(‘testdb’)
.retentionPolicy(‘autogen’)
.measurement(‘disk’)
.groupBy(‘host’,‘service’)
.where(lambda: “path” == “mountpath”)
|sideload()
.source(‘file:/etc/kapacitor/load/tasks/sideload’)
.order(‘{{.host}}.yml’)
.field(‘mountpath’, “/test”)

|influxDBOut()
.database(‘testdb’)
.retentionPolicy(‘autogen’)
.measurement(‘testmes’)

Thank you in advance for your cooperation :slight_smile:

Hi parimalan. Were you able to solve this ?
I am working on a similar problem and would appreciate if you had a simpler solution.

Thanks.
Arushi

Hi
I couldn’t able to find answer for this … so i used py script.

Not only this i feel like lot functionality is missing in kapacitor Tickscript

Thanks
Parimalan

Incase if you found let me know @arushigangrade :slight_smile: