1 # Description: example netdata python.d plugin
2 # Author: Pawel Krupa (paulfantom)
4 NAME = "example.chart.py"
7 from base import BaseService
9 # default module values
15 class Service(BaseService):
16 def __init__(self,configuration=None,name=None):
17 super().__init__(configuration=configuration)
23 print("CHART example.python_random '' 'A random number' 'random number' random random line "+str(self.priority)+" "+str(self.update_every))
24 print("DIMENSION random1 '' absolute 1 1")
27 def update(self,interval):
28 print("BEGIN example.python_random "+str(interval))
29 print("SET random1 = "+str(random.randint(0,100)))