-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Grafana Dashboard #4
Comments
I like the idea of having the Dashboard as part of the chart too! |
I am guessing that the odd zeros are probably just a bug where dockerhub's code is timing out calculating/collecting, so its returning a default value (0)... It might be interesting to try to catch the debug output when an odd zero, maybe they are returning an error too, and we could catch/retry or just not "export" that odd value... We don't have to do anything, as we are simply reporting the value we received from docker, but it might make the graph smoother (if that is desirable) :) For the "cliff" issue, I am guessing that they are pushing out a new version of their code that calculates image pulls and maybe don't have stateful storage configured? |
I have not done the helmchart part yet, I am just releasing it with flux directly right now... which basically involves a yaml file like: apiVersion: v1
kind: ConfigMap
metadata:
labels:
grafana_dashboard: "1"
name: dockerhub-rate-limits
namespace: monitoring
data:
dockerhub-rate-limits.json: |-
{JSON HERE} I will attach the JSON directly (had to gzip it for github), so we can collaborate on the min/max... I don't see any issue with hardcoding the min to 0, but the max will have to be template driven (values.yaml) unless we can come up with a way to calculate it (without switching to percent) |
strangely, I tried removing the MAX and it is fine now? I wonder if the problem was that I didn't have enough data yet to determine the auto-determined max? |
I haven't found the time yet to look at the dashboard json, but it sounds reasonable that grafana can choose a fitting max value automatically? So I would suggest not specifying a max value and letting grafana work its magic? Regarding the "odd zeros" I think there is no error code returned in the http request, the actual values for the metrics are just missing. At least it was like that when I was looking into it a couple of weeks ago. I am not sure if it's desirable to smoothen out the curve, I think it's better to simple reflect the truth as mandated by the dockerhub api and leaving the interpretation of the data to the user looking at the chart. Regarding the "cliff issue" I think your assumption makes a lot of sense. |
Hmm, just thought of something, it almost seems like they are returning 100 available (and 100 max) based on the results? From what I can tell in the code, the default values would be 0, 0. We could probably safely just not publish a 0,0 result, it would make more sense to keep the previous value or not return anything (leave a gap) than to return 0,0, but in this case, it is returning 100,100 (I think). Anyhow... since we can make this dashboard template driven, I am thinking make setting the max value optional. That way, if someone wants to hard-code it, they can set it in values.yaml. |
I experience the same behavior even with a simple bash script and curl:
|
For sure, the odd 100 reading seems like it is "their" problem, not ours. The question is, do we just report the statistics as gathered, or "filter" the odd result out? HOWEVER, this issue was actually about adding the grafana dashboard ;) |
I opened a separate issue for the "odd 100" problem. :-) Is there something I can do to help go forward with the Grafana dashboard here? |
The original blog post has a dashboard linked. I am thinking about adding that as an option to the helm chart. However, in order to "maintain" a reasonable gauge, I had to hardcode the min/max values. It doesn't look like there is a way to calculate or use the MAX based on a query, without changing over to "percent" (which you can hardcode).
I have a couple enhancements to mine that I would be happy to share as well (fixed thresholds on Pulls Remaining for example).
Also, has anyone else noticed that the graphs fall off like a cliff several times a day instead of having a "rolling" 6 hour period? Is that a bug in our collection or in "dockerhub" ? (thoughts?)
The text was updated successfully, but these errors were encountered: