######################################################################## # KPI extraction configuration # # This configuration file defines how and when data should be # extracted. # # Static items are extracted once on rpimonitord startup. Each # statistic is specified below by a line starting with the keyword # 'static' and followed by a numerical unique identifier. # # Each static item has four further parameters: # # static..name= # is the string represention the item (or comma-separated # items) being defined. Each name must be unique. # Only alpha-numeric charaters and underscores are valid in item # names. # # static..source=[, may be a file or an executable from which content # can be read. If a full path is not provided, rpimonitord will # first attempt to read from a file with the specified name and, # failing this, will attempt to execute a binary of the same name # within any directory specified in the contents of the PATH # vaiable. # Warning: specifying an executable by its absolute name will tell # rpimonitord to read the content of the executable.1.graph. # # static..regexp= # is an optional regular expression which may be # applied to extracting information from the designated source # value, above. Data matching a Perl-Compatible/Extended Regular # Expression group (e.g. matches within round-brackets) will be # selected to represent this . # Where a list of s is being defined, each sequential # group match will be assigned to each in turn. # # static..postprocess= # is an optional expression denoting any # postprocessing which should be applied to the raw or # the output if defined. # The first is referenced as '$1', with further s in a list being referred to as '$2', '$3', etc. # The expression will be evaluated via the Perl 'eval' command. # # Dynamic items are periodically evaluated with period specified by # 'daemon.delay' from /etc/rpimonitord.conf. Each statistic is # defined with the keyword 'dynamic' followed by a # identifier and five further parameters: # # dynamic..name=[,,...] # dynamic..source= # dynamic..regexp= # dynamic..postprocess= # , , , and # have the same use as when used with static items. # # dynamic..rrd= # The fifth parameter determines whether the item's data should be # stored in an Round-Robin Database, and how it should be # represented. A blank entry will prevent RRD creation. # See http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html for # details of the RRD different RRD options. # # NB: Values associated with named static items are available for use # during post-processing with the notation: # # $this->{'static'}->{'static_data_name'} # # See the dynamic item named 'swap_used' for a real-world example. # ######################################################################## static.1.name=distribution static.1.source=/etc/os-release static.1.regexp=PRETTY_NAME.\"(.*)\" static.1.postprocess= static.2.name=kernel_version static.2.source=uname -msr static.2.regexp=(.*) static.2.postprocess= static.3.name=firmware static.3.source=/proc/version static.3.regexp=(#\d+) static.3.postprocess= static.4.name=processor static.4.source=/proc/cpuinfo static.4.regexp=model name\s+: (.*) static.4.postprocess= static.5.name=hardware static.5.source=/proc/cpuinfo static.5.regexp=Hardware\s+: (.*) static.5.postprocess= static.6.name=revision static.6.source=/proc/cpuinfo static.6.regexp=Revision\s+: 0*(.*) static.6.postprocess= static.7.name=serial static.7.source=/proc/cpuinfo static.7.regexp=Serial\s+: (.*) static.7.postprocess= static.8.name=sdcard_root_total static.8.source=df / static.8.regexp=^[^\s]+\s+(\d+) static.8.postprocess=$1/1024 static.9.name=sdcard_boot_total static.9.source=df /boot static.9.regexp=^[^\s]+\s+(\d+) static.9.postprocess=$1/1024 # Also monitor the default mount from sys-apps/tmpfs - which should be used # with RPi-Monitor in order to reduce writes to SD! #static.11.name=tmpfs_ram_total #static.11.source=df /mnt/ram #static.11.regexp=^[^\s]+\s+(\d+) #static.11.postprocess=$1/1024 ############################################################################## #dynamic.1.name=upgrade #dynamic.1.source=/usr/share/rpimonitor/updatestatus.txt #dynamic.1.regexp=(\d+ upgraded, \d+ .*|.* .*) #dynamic.1.postprocess= #dynamic.1.rrd= # #dynamic.2.name=packages #dynamic.2.source=/usr/share/rpimonitor/updatestatus.txt #dynamic.2.regexp=^ (.*)\d+ upgraded, #dynamic.2.postprocess= #dynamic.2.rrd= dynamic.1.name=scaling_governor dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor dynamic.1.regexp=(.*) dynamic.1.postprocess= dynamic.1.rrd= dynamic.2.name=cpu_frequency dynamic.2.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq dynamic.2.regexp=(.*) dynamic.2.postprocess=$1/1000 dynamic.2.rrd=GAUGE dynamic.3.name=cpu_voltage dynamic.3.source=/opt/vc/bin/vcgencmd measure_volts core dynamic.3.regexp=(\d+.\d+)V dynamic.3.postprocess= dynamic.3.rrd=GAUGE dynamic.4.name=load1,load5,load15 dynamic.4.source=/proc/loadavg dynamic.4.regexp=^(\S+)\s(\S+)\s(\S+) dynamic.4.postprocess= dynamic.4.rrd=GAUGE dynamic.5.name=sdcard_root_used dynamic.5.source=df / dynamic.5.regexp=^[^\s]+\s+\d+\s+(\d+) dynamic.5.postprocess=$1/1024 dynamic.5.rrd=GAUGE dynamic.6.name=sdcard_boot_used dynamic.6.source=df /boot dynamic.6.regexp=^[^\s]+\s+\d+\s+(\d+) dynamic.6.postprocess=$1/1024 dynamic.6.rrd=GAUGE #dynamic.8.name=tmpfs_ram_used #dynamic.8.source=df /mnt/ram #dynamic.8.regexp=^[^\s]+\s+\d+\s+(\d+) #dynamic.8.postprocess=$1/1024 #dynamic.8.rrd=GAUGE dynamic.9.name=swap_total dynamic.9.source=/proc/meminfo dynamic.9.regexp=SwapTotal:\s+(\d+) dynamic.9.postprocess=$1/1024 dynamic.9.rrd=GAUGE dynamic.10.name=swap_used dynamic.10.source=/proc/meminfo dynamic.10.regexp=SwapFree:\s+(\d+) dynamic.10.postprocess=$this->{'dynamic'}->{'swap_total'} - ($1/1024) dynamic.10.rrd=GAUGE dynamic.11.name=memory_total dynamic.11.source=/opt/vc/bin/vcgencmd get_mem arm dynamic.11.regexp=^.*=(\d+)M$ dynamic.11.postprocess= dynamic.11.rrd=GAUGE dynamic.12.name=memory_gpu dynamic.12.source=/opt/vc/bin/vcgencmd get_mem gpu dynamic.12.regexp=^.*=(\d+)M$ dynamic.12.postprocess= dynamic.12.rrd=GAUGE dynamic.13.name=memory_free dynamic.13.source=/proc/meminfo dynamic.13.regexp=MemFree:\s+(\d+) dynamic.13.postprocess=$1/1024 dynamic.13.rrd=GAUGE dynamic.14.name=memory_used dynamic.14.source=/proc/meminfo dynamic.14.regexp=MemFree:\s+(\d+) dynamic.14.postprocess=$this->{'dynamic'}->{'memory_total'} - ($1/1024) dynamic.14.rrd=GAUGE dynamic.15.name=net_received dynamic.15.source=/sys/class/net/eth0/statistics/rx_bytes dynamic.15.regexp=(.*) dynamic.15.postprocess=$1*-1 dynamic.15.rrd=DERIVE dynamic.16.name=net_send dynamic.16.source=/sys/class/net/eth0/statistics/tx_bytes dynamic.16.regexp=(.*) dynamic.16.postprocess= dynamic.16.rrd=DERIVE dynamic.17.name=soc_temp dynamic.17.source=/sys/devices/virtual/thermal/thermal_zone0/temp dynamic.17.regexp=(.*) dynamic.17.postprocess=$1/1000 dynamic.17.rrd=GAUGE dynamic.18.name=uptime dynamic.18.source=/proc/uptime dynamic.18.regexp=(^\S+) dynamic.18.postprocess= dynamic.18.rrd=GAUGE ######################################################################## # Web interface configuration # # Friends are defining a displayed name and a link reachable from a # top left menu visible if at least one friends is configured. Each # friend is identified by its and is described by the 2 following # parameters # # web.friends..name= # web.friends..link= # # web.friends..name= # is the name printed into the drop down menu # # web.friends..link= # is the link to another RPi-Monitor running # into the friend machine. # # # The status page is fully configurable. # It is possible to define multiple pages. Each page is identified by # its . # # web.status..name= # name of the page displayed into the drop down menu in # case of multiple pages. # # Status page is split in strips displaying information. Each status # strip is identified by a unique . Each status strip is # defined by a name, an icon and a serie of lines described as follow: # # web.status..content..name= # web.status..content..icon= # web.status..content..line.= # # web.status..content..name= # Name displayed as title of the strip # # web.status..content..icon= # Icon of the strip # # web.status..content..line.= # represent the position of the line within the strip. # This number has to be unique within the strip. # is describing the content of the line. This parameter # will be evaluated by the javascript command with the function # eval() theirfore parameter should be valid javacript. # To have clean rendering, RPi-Monitor web interface provides some # functions that could be used inside the parameter. The object data # is also available and contains the result of dynamic and static # extracted as described in the KPI extraction section. # # Functions provided by RPi-Monitor are the following: # # Uptime(uptime in sec) # Print the uptime from seconds to the following format: # XX year XX days XX hours XX minutes XX seconds # # Pad(value) # Add a prefixed 0 for number smaller than 10 # # KMG(value, pre) # Print value in kilo, Mega, Giga, Peta. # pre can be 'k', 'M', 'G' or 'P' depending on the value. # # Percent(value,total) # Print percentage of value compared to total # # ProgressBar(value,total) # Draw a progressbar representing the value compared to total. # [=========------------] # # Plural (value) # Print 's ' if value > 1 or ' ' if not. # # Clock(data.localtime) # This function is a little bit particular and should be written # and should be written exactly as in the upper line. It will # display on screen the current time and will simulate the # seconds by incrementing them tperiodically. # # # The statistic page is fully configurable. # It is possible to define multiple pages. Each page is identified by # its . # # web.status..name= # name of the page displayed into the drop down menu in # case of multiple pages. # # The statistic page displays statistics graphs. The graphs are # identified an unique and by the following parameters. # # web.statistics..content..name= # is the name of the statistics displayed in the # top left drop down list. # # web.statistics..content..graph.= # is identifying the graph and is unique per # is the name of the dynamic and static extracted as # described in the KPI extraction section. # # web.statistics..content..ds_graph_options..label=