Open anagaraj2 opened 4 weeks ago
I found a long and not the most optimal workaround for this problem...
Keep the parameters within quotes so that all the data is collected and sent to influx.
Link the data source to grafana.
Use a flux query that converts the strings to float from(bucket: “fanuc”) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r[“_measurement”] == “axis”) |> filter(fn: (r) => r[“_field”] == “load”) |> map(fn: (r) => ({ r with _value: float(v: r._value), _time: time(v: r._time) }))
At this stage, the grafana dashboard will plot all the data being collected on the same plot (X axis, Y axis, Z axis, etc.) but these can be selected by series name under the override options. Then the required data can be plotted by hiding every other series also available as an override option (hide in area).
P.S. I was not able to figure out the flux code to select the series directly and hence had to use the override option. There was an issue with the data headers having double quotes for each of the words (for example - load {axis=""X"", machine=""cnc1"", path=""1""}.
Hello,
I am trying to collect axis data and display it on a real time grafana dashboard.
If I use the config.system.yml file as it is, through dozzle I can see that the FANUC driver is collecting axis data but I don't see any of the axis data like position, load, power, etc. listed on the influxdb UI. To solve this issue, I followed the suggestion by another user (Issue #110 ) and put all the parameters in quotes. When all the axis.data parameters are in quotes in the config.system.yml file, the data is available on influx as a string. However, this works only when all the parameters are in quotes, not a selected few.
Under the case when all the axis.data parameters are being collected as a string, I am able to see the data as a table on grafana - say my machine has 2 axes, the first column is time, the second column is the x axis data and the third column is the z axis data. I don't know the right way to query flux to plot only the second column data. An additional problem that arises here is due to the headers being parsed as strings and each word in the data header is within double quotes, I get syntax errors when trying to copy the header and query flux. I have tried many different ways to query flux but it does not seem to work.
Thank you!