-
Notifications
You must be signed in to change notification settings - Fork 2
Monitoring graphs for django
License
jlaine/django-timegraph
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
django-timegraph - monitoring graphs for django Copyright (c) 2011-2012, Wifirst Copyright (c) 2013, Jeremy Lainé See AUTHORS file for a full list of contributors. License ======= django-timegraph is distributed under the BSD license, see the LICENSE file for details. Usage ===== To inject metric values for an arbitrary object 'device': from timegraph.models import Metric for metric in Metric.objects.all(): value = request.POST.get(metric.parameter) if value: metric.set_polling(device, value) To read back the value for a metric: from timegraph.models import Metric metric = Metric.objects.get(pk=123) metric.get_polling(device) To plot a graph for the 'device' object: from timegraph.views import render_graph def graph_device(request, graph_slug, device_mac): """ Renders the given graph for the given device. """ device = get_object_or_404(Device, pk=device_mac) graph = get_object_or_404(Graph, slug=graph_slug) return render_graph(request, graph, device) Homepage ======== For more information, please refer to the project homepage: http://github.com/jlaine/django-timegraph
About
Monitoring graphs for django
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published