mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
25 lines
673 B
Python
Executable file
25 lines
673 B
Python
Executable file
#!/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 = {
|
|
# 'stories': Story.objects.count(),
|
|
'tags': Tag.objects.count(),
|
|
'authors': StoryAuthor.objects.count(),
|
|
'read_stories': UserStory.objects.count(),
|
|
}
|
|
|
|
if __name__ == '__main__':
|
|
MuninGraph(graph_config, metrics).run()
|