[smokeping-users] No data being displayed for slave machine

G.W. Haywood ged at jubileegroup.co.uk
Fri Jun 20 14:53:19 CEST 2008


Hi David,

On Fri, 20 Jun 2008, David Tomic wrote:

> I've tried setting up another machine to run as a slave [snip] but
> the graphs just aren't registering any data for the slave machine.

> ... if I run the slave in --debug mode ...
> ...
> FPing: Executing /usr/bin/fping -C 21 -q -B1 -r1 -i10 192.168.1.254 192.168.1.123
> FPing: Got fping output: '192.168.1.254 : 8.80 0.64 0.67 0.65 0.88 3.56 0.70 0.61 0.67 0.63 0.64 0.63 0.63 0.74 0.63 0.64 0.95 0.63 0.62 0.66 0.64'
> FPing: Got fping output: '192.168.1.123 : 0.45 0.31 0.28 0.24 0.28 0.27 0.57 0.62 0.31 0.70 0.40 0.37 0.24 0.28 0.26 2.94 0.49 5.20 0.25 0.38 0.38'
> Sent data to Server. Server said OK
>
> The master has created the .rrd file for the slave, and it's showing it
> on the graph legend, but it's just reporting 'nan' for all its data.

You should first check that there is indeed data in the .rrd file.
First I'd probably just dump the data to a .xml file using rrdtool
as root:

rrdtool dump /var/lib/smokeping/World/Europe/UK/WWW3-HTTP.rrd >WWW3-HTTP.xml

Then I'd use a pager, editor or whatever to look at the data in the .xml file:

head -n 3 WWW3-HTTP.xml
<!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
        <step> 300 </step> <!-- Seconds -->
        <lastupdate> 1213965501 </lastupdate> <!-- 2008-06-20 13:38:21 BST -->

> My efforts in Google as well as searching through this list seemed to
> turn up a comments from people about making sure that smokeping.cgi has
> got write permission to the cache directory.
>
> Does anyone know if that could be where I'm going wrong here [and if so
> exactly what I need to be doing to fix it]?
>
> IE - Exactly which files/folders, on which machines, need which permissions.

The .rrd files need to be written by the process which is collecting the data,
at a guess that's being run as user 'smokeping', and they need to be readable
by the user that's running the Web server - I wouldn't like to guess that one
but world read will do. :)  The directories (some people call them 'folders',
and we politely pretend not to notice:) in the path to the files also need to
have the execute bit for the user that's reading/writing files.  Again, world
permission will do.  Read permission on directories is needed to list them,
but not to read the files in them.  The permissions on the files themselves
affect that of course.  Be aware that romping all around your systems adding
permissions to files and directories willy-nilly is a very bad idea.

ls -l /var/lib/smokeping/World/Europe/UK/WWW3-HTTP.rrd
-rw-r--r-- 1 smokeping smokeping 1039568 2008-06-20 13:28 /var/lib/smokeping/World/Europe/UK/WWW3-HTTP.rrd

ls -l /var/lib/smokeping/World/Europe/
drwxr-xr-x 2 smokeping www-data 4096 2008-06-20 13:30 UK

There's also a bunch of image files and suchlike in the Apache directory
structure, they're owned by the user that's running Apache.  In my systems
they're world readable and the user is 'www-data'.

--

73,
Ged.



More information about the smokeping-users mailing list