I’ve read about setting up multiple instances of influx db in my Kapacitor config but i just wanted some clarifaction.
I have two influx databases that are NOT clustered together for any high availability, they are both stand alone databases monitoring two separate systems. I’ve connected both of these instances to Kapacitor and got SSL working between them so i’m happy thats working, but when i define my tick script and view the output with kapacitor show taskName shows no points being processed. There is data being written to teh DB’s.
My main question is, while it is possible to connect multiple instances do those instances have to be part of the same cluster? Or can i do this with 2 separate data sources?
The script itself is just a generic idle CPU alert using the
cpu measurement that is monitoring both the DB’s and it lives on my Kapacitor instance.
var crit = 90
var data = stream |from() .database(db) .retentionPolicy(rp) .measurement(measurement) .groupBy(groupBy) .where(whereFilter) |eval(lambda: "usage_idle") .as('value') var trigger = data |alert() .crit(lambda: "value" > crit) .stateChangesOnly() .message(message) .id(idVar) .idTag(idTag) .levelTag(levelTag) .messageField(messageField) .durationField(durationField) .details(details) .email('firstname.lastname@example.org') trigger |influxDBOut() .create() .database(outputDB) .retentionPolicy(outputRP) .measurement(outputMeasurement) .tag('alertName', name) .tag('triggerType', triggerType) trigger |httpOut('output')
I had seen about using
.cluster('databaseone) after reading another topic on here but it seems that only works on the |influxDBOut node when i try it.
Is this something that can be done or am i misunderstanding the purpose of adding multiple DB instances? Thanks!