Getting specific column values into another bucket


I’m pulling in syslog messages and based on information that is in the message I am generating other columns of values and also calculating different state durations for activity. The goal is to use Grafana to graph the data that I am breaking out into columns but rather than doing all the Flux query breakout from the syslog info in Grafana I wanted to reference a new bucket that has the columns already set. I am able to get data into a different bucket but have the following issues.

  1. I’m getting a number of columns in my new bucket that I don’t need, is there a way to specify which columns I want in my bucket? I’m using the to(org: “xxx”, bucket: “xxxx”) to capture the data.

  2. The 3 columns I generate using the stateDuration() function are not showing in my new bucket. I even tried to follow up the stateDuration with a map function to define the column and that is not showing up in my new bucket either.

In simple terms, I’m trying to copy the values of the events for the columns I want into a new bucket so that I can use that directly as raw data for my Grafana setup.