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