0
votes

I have an API that fetches data packets from different servers. It formats this data to different small JSON units. I wrote an algorithm that sends them to graphite with the command json2graphite. The sending works very well, the incoming data doesn't look bad either.

Now the problem: The data displayed in graphite shows that each entry is followed by a null.

The data points that should be connected

I am aware that this data can also be connected using a function provided by the Graphite interface, but this doesn't help because Grafana boards always jump back and forth between value and null. Is there a way to tell Grafana that it only goes to null if there was no data for more than 1 min or so?

I already tried to fix the problem with the data from "storage-schemas.conf" and "storage-aggregation.conf". Unfortunately without success.

storage-schemas.conf:

[default_1min_for_1day]
pattern = .*
retentions = 10s:6h,30s:8d,1m:31d,10m:1y,1h:5y

aggregation.conf:

[default_average]
pattern = .*
xFilesFactor = 0
aggregationMethod = average

If you want to know any more, ask me. : )

2

2 Answers

0
votes

Grafana has an option to connect datapoints that are separated by nulls. You can see how to enable this in the screenshot shown under Display Styles settings on Grafana's documentation.

In Graphite composer you can also do it by specifying the connected line mode under Graph options here:

connected line mode

Additionally, you could use Graphite's keepLastValue function to carry the last received value over gaps where there are nulls.

0
votes

I haven't found a direct solution but I will now try to minimize the interval between the entries. I noticed that the requests take much too long: 2-5 minutes. There are probably too many servers, so the requests block the port too long. The problem is not solved yet but I think I will mark it as solved if nobody says I have the problem within 5 days.