Specify more than one database and/or retention policy in a tick script

Working off the example cpu_alert_stream.tick I have a dataframe defined like this:

// Dataframe
var data = stream
.where(lambda: “cpu” == ‘cpu-total’)
From the looks of it, if I want to monitor another database on the same influxdb server it appears I will have to make another duplicate tick script with a different name and the database field changed. I would also have to define another cpu_alert_stream.

Is there a way for me to avoid having to recreate tick scripts for say another environment? For example, prod/stg/dev. Or, cust1/cust2/cust3/.

Something like this?

.database(‘metrics_cust1’, ‘metrics_cust2’, ‘metrics_custn’)


Even if I created a new stream per database, I’d still end up having to create another similar tick_script.

@dashvvv This is a usecase for templated .tick scripts. There is some documentation here.