I am using batch node to query data from InfluxDB over a specified period. The following is a short example:
batch |query( ''' SELECT "timeUntilEndOfLicence" FROM "artifactory__systems"."autogen".Artifactory ''' ) .period(9m) .every(20s) |last('timeUntilEndOfLicence') .as('timeUntilEndOfLicence') ..............
In this Tickscript I do calculations in an eval-node with the field timeUntilEndOfLicence. The result field called “licenceStatus” is pushed to InfluxDB to the same database with the same measurement (artifactory__systems".“autogen”.Artifactory). In another Tickscript I do the same calculating for another field and push the result field called “storageStatus” to InfluxDB. All works fine.
In another Tickscript I want to combine “licenceStatus” and “storageStatus” to do further processing. The way I access these fields is exactly the same as stated above using batch, period and last node. Nevertheless kapacitor log shows that the fields licenceStatus and storageStatus are missing. Checking the logs and InfluxDB entries these fields seem to be available though.
Here https://github.com/influxdata/kapacitor/issues/1217 they had a similar problem and suggest using batch instead of stream as solution. It seems that there still are some problems with batch.