mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
28 lines
710 B
Python
Executable file
28 lines
710 B
Python
Executable file
#!/usr/bin/env python
|
|
from utils.munin.base import MuninGraph
|
|
|
|
|
|
class NBMuninGraph(MuninGraph):
|
|
|
|
@property
|
|
def graph_config(self):
|
|
return {
|
|
'graph_category' : 'NewsBlur',
|
|
'graph_title' : 'NewsBlur Stories',
|
|
'graph_vlabel' : 'Stories',
|
|
'graph_args' : '-l 0',
|
|
'stories.label': 'stories',
|
|
'tags.label': 'tags',
|
|
'authors.label': 'authors',
|
|
'read_stories.label': 'read_stories',
|
|
}
|
|
|
|
def calculate_metrics(self):
|
|
from apps.rss_feeds.models import MStory
|
|
|
|
return {
|
|
'stories': MStory.objects().count(),
|
|
}
|
|
|
|
if __name__ == '__main__':
|
|
NBMuninGraph().run()
|