mgr/influx: Various time fixes #20494
This PR fixes three things:
The default interval of 5 seconds is a nice to have, but it breaks large systems. Collecting and sending all this information on a 2000 OSD cluster is killing for the Manager. We shouldn't set that by default.
In addition a optimization here is to only fetch the time once, store it in a variable and us it in that run. Otherwise values have different times, but we also perform a lot of syscalls for fetching the time.
The last fix is to set a default retention of 8 weeks in InfluxDB. Users can change this however they like, it will not be modified afterwards, but it's to prevent users setting this up and having a DB grow for ever and breaking at some point in the future.
@jcsp Well, Influx also has to accept the data and the JSON needed to be send.
The thing is, I don't have this cluster at my disposal to test and debug everything on it, it's in production.
However, having a 30 second interval means you have a 6th of the data compared to the 5s interval.
People can still use a 5s interval, but I don't think it's wise to make it the default