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