1 # -*- coding: utf-8 -*-
2 # Description: example netdata python.d plugin
3 # Author: Pawel Krupa (paulfantom)
6 from base import BaseService
8 NAME = "example.chart.py"
9 # default module values
15 class Service(BaseService):
16 def __init__(self, configuration=None, name=None):
17 super(self.__class__,self).__init__(configuration=configuration, name=name)
23 print("CHART example.python_random '' 'A random number' 'random number' random random line " +
26 str(self.update_every))
27 print("DIMENSION random1 '' absolute 1 1")
30 def update(self, interval):
31 print("BEGIN example.python_random "+str(interval))
32 print("SET random1 = "+str(random.randint(0,100)))