NewsBlur/utils/munin/newsblur_feeds.py
2010-06-08 11:19:41 -04:00

21 lines
537 B
Python
Executable file

#!/usr/bin/env python
from utils.munin.base import MuninGraph
from apps.rss_feeds.models import Feed
from apps.reader.models import UserSubscription
graph_config = {
'graph_category' : 'NewsBlur',
'graph_title' : 'NewsBlur Feeds',
'graph_vlabel' : 'Feeds & Subscribers',
'feeds.label': 'feeds',
'subscriptions.label': 'subscriptions',
}
metrics = {
'feeds': Feed.objects.count(),
'subscriptions': UserSubscription.objects.count(),
}
if __name__ == '__main__':
MuninGraph(graph_config, metrics).run()