Sanity check simple TICKscript


Hopefully this isn’t too out of place, but I’m going stir crazy here. I’m sure this was working fine, but now it isn’t…

I have the following TICKscript:

// Measurement selection
var db = 'telegraf'

var rp = 'autogen'
var measurement = 'winperf_hypervhealth'
var groupBy = ['host']
var whereFilter = lambda: TRUE

// Get a window of data
var data = stream
    // Keep only one field
    |eval(lambda: "Health_OK" + "Health_Critical")
        .tag('kapacitor', 'true')

There are 4 nodes sending the winperf_hypervhealth metric to InfluxDB and I’ve confirmed that they have all submitted values with the following query:

SELECT last("Health_OK") AS "last_Health_OK" FROM "telegraf"."autogen"."winperf_hypervhealth" WHERE time > now() - 5m GROUP BY time(10s), "host" FILL(null)

However, when I check my new field of Total_VMs, I only see the calculated value from one of the nodes. If I alter my TICKScript to log with the alert() node, I can only see that same node’s entries.

Any ideas? Did I fudge up my TICK script?


Okay, out of the blue, another node has that field and populated data, but hasn’t had for the last few weeks? Anything I could check?

And back to nothing again. Restarted all InfluxDB and Kapacitor services, re-added the subscriptions.

The odd thing is that, when if I use alert() to a file, I see Health_OK, Health_Critical and Total_VMs values.

Really baffled.