2010-06-08 11:19:41 -04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from utils.munin.base import MuninGraph
|
|
|
|
from apps.rss_feeds.models import Story, Tag, StoryAuthor
|
|
|
|
from apps.reader.models import UserStory
|
|
|
|
|
|
|
|
graph_config = {
|
|
|
|
'graph_category' : 'NewsBlur',
|
|
|
|
'graph_title' : 'NewsBlur Stories',
|
|
|
|
'graph_vlabel' : 'Stories',
|
|
|
|
'stories.label': 'stories',
|
|
|
|
'tags.label': 'tags',
|
|
|
|
'authors.label': 'authors',
|
|
|
|
'read_stories.label': 'read_stories',
|
|
|
|
}
|
|
|
|
|
|
|
|
metrics = {
|
2010-07-01 12:07:15 -04:00
|
|
|
# 'stories': Story.objects.count(),
|
2010-06-08 11:19:41 -04:00
|
|
|
'tags': Tag.objects.count(),
|
|
|
|
'authors': StoryAuthor.objects.count(),
|
|
|
|
'read_stories': UserStory.objects.count(),
|
|
|
|
}
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
MuninGraph(graph_config, metrics).run()
|