Telegraf persistence with the help of NATS Streaming?

Here’s a a bit of a convoluted idea to add a localhost disk persistence layer… Just to help avoid metric loss due to Telegraf/host forced restarts, filled memory buffer, etc

Run a NATS Streaming instance (configured for disk store) along with Telegraf on each host, to use as a local queue. In Telegraf, push everything out to the NATS server output. At the same time, have an input reading from NATS. Then push that into InfluxDB.

I’m assuming NATS Streaming support in both directions, not sure if support is just for regular NATS or not. I also have no hands-on experience with NATS whatsoever, not sure if it’s lightweight enough (in both CPU/RAM resources and operational effort) to make it worthwhile.

Flawed? Not possible? Too crazy? Not worth it?

In theory, I think this would work. Currently we only have regular NATS input/output, but there are pull requests for NATS streaming. It could be tested with a different queue, NSQ seems like a reasonable stand in. I won’t say if its too crazy or just the right amount.