-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use dashboard.out directly #15
Comments
Hey, are you running in a K8s environment? The namespace varaible might be empty due to not running in a k8s env. I see that migrations graph have metrics at one point. |
Nope, i'm using docker |
Does this work better: https://gist.github.com/adinhodovic/0ce3f492d566eb453361feadab8aae56? |
It's this PR: #13. |
No, i've created a new dashboard and imported the json but this is the same, only the migrations metrics is here |
I'm not sure, what's your scrape interval? Do you have metrics there? do you see anything in prometheus for e.g |
Hmm, the /metrics should not have any metrics for django, those are prometheus runtime metrics. Can you open your prometheus UI and see if prometheus is scraping django and if there are view metrics related to for example: django_http_responses_total_by_status_view_method_total. The model changes are not required. |
Cool, so that works. Might just be insufficient amount of requests. If you increase the time range in grafana to lets say 7 days does anything show? |
You was right, it was insufficient amount of data, everything works great, on production there will be a lot more of requests so more accurate, thanks a lot for the help :) |
The dashboards don't support monitoring of specific models as of yet. There are no panels that cover that. I might add it soon! You can open a new issue for that or even a PR if you want. Ofcourse you can adjust the dashboards yourself on, but it's not provided out of the box yet. Open an Issue! Happy to hear that it works. You can generate alerts or use preconfigured also: https://github.com/adinhodovic/django-mixin/blob/main/prometheus_alerts.yaml. |
Thanks a lot, I will think about it when i will monitor my specific models, why not create a PR :) |
The grafana URL for alerts is generated from config files here: https://github.com/adinhodovic/django-mixin/blob/remove-ns-dependency/config.libsonnet#L14. Everything is adjustable. However, the Grafana URL is only used for alerts and not necessary, here's a template for slack that uses the Regarding prometheus, don't know of the top of my head, I use K8s/operators and that differs. I'll close this issue as it's unrelated. |
Hello Adin,
I have a question, if i followed you're tutorial on you're website : https://hodovi.cc/blog/django-monitoring-with-prometheus-and-grafana/
I have'nt added
ExportModelOperationsMixin
on any of my django models,And i already configured a datasources.yaml file, that is mounted inside the grafana:
Am i supposed to/ Can i import the json files in dashboard_out/ directly into the grafana website ?
Since my datasource has an uid called
prometheus
, i've just replaced all the"uid": "$datasource"
to"uid": "prometheus"
but i think this isn't enough to make it work (I tried with this one: https://github.com/adinhodovic/django-mixin/blob/main/dashboards_out/django-overview.json ):The text was updated successfully, but these errors were encountered: