Telegraph (SNMP/RRD/SQL)

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.


hg clone
cd telegraph

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

make install

SNMPD (snmpd.conf)

SNMPD is set up to return a value when probed for the CPU temperature on a Raspberry Pi.

rocommunity public X.X.X.X/24
extend cpu /usr/local/bin/soc /sys/class/thermal/thermal_zone0/temp

Telegraph (cpu.xml)

This configuration file sets up a query for the above cpu temperature in snmpd.conf.

<?xml version="1.0"?>
 <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" />


A CRON job will run every 5 minutes to update the RRD.

*/5 * * * * /usr/local/bin/telegraph /usr/local/etc/cpu.xml

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 here.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information