Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:telegraph [2018/03/20 22:12]
darron [Telegraph (cpu.xml)]
projects:telegraph [2018/11/16 04:24]
Line 1: Line 1:
-==== Telegraph (SNMP/RRD/SQL) ==== 
-<wrap right> 
-{{:projects:telegraph.png?200}} 
-</wrap> 
  
-Telegraph is a project which will poll an SNMP 
-server and update an RRD or SQL (SQLite3) database. 
- 
-A number of external SNMP daemon commands are supplied 
-to capture values from various probes on a Raspberry or Banana Pi. 
- 
-An example PHP script demonstrates how to generate RRD 
-graphs like this one shown here. 
- 
-=== Install === 
- 
-<code> 
-hg clone http://hg.kewl.org/pub/telegraph 
-cd telegraph 
-</code> 
- 
-At this time you must read the file named README in the telegraph directory. 
-This file explains the installation requirements for this software. 
- 
-Telegraph may be installed once all requirements are met, with 
-<code> 
-make 
-make install 
-</code> 
- 
-=== SNMPD (snmpd.conf) === 
- 
-SNMPD is set up to return a value when probed for the CPU temperature on a Raspberry Pi. 
- 
-<code> 
-rocommunity public X.X.X.X/24 
-extend cpu /usr/local/bin/soc /sys/class/thermal/thermal_zone0/temp 
-</code> 
- 
-=== Telegraph (cpu.xml) === 
- 
-This configuration file sets up a query for the above cpu temperature in snmpd.conf. 
- 
-<code> 
-<?xml version="1.0"?> 
-<telegraph> 
- <graph title="CPU Temp" label="C" /> 
- <database type="rrd" filename="/var/lib/rrd/cpu.rrd" /> 
- <query source="0" name="cpu" host="X.X.X.X" community="public" miboid="cpu" /> 
-</telegraph> 
-</code> 
- 
-=== CRON === 
- 
-A CRON job will run every 5 minutes to update the RRD. 
-<code> 
-*/5 * * * * /usr/local/bin/telegraph /usr/local/etc/cpu.xml 
-</code> 
- 
-=== World wide web === 
- 
-Example scripts exist in the demo directory of the project which 
-demonstrate how the RRD is queried to produce a graph of the values 
-stored within it. 
- 
-The demo can be seen [[http://london.omweb.org/|here]].