Skip to content
Strykar edited this page Jun 15, 2016 · 14 revisions

Smokeping common faults

Graphs are empty!

These have two root causes:

  1. Data not reaching the RRD [round robin databases]

Run smokeping in debug mode and watch what it says - you'll probably find some good reasons stuff isn't working and be able to fix it yourself.

Like this:

smokeping --debug
  1. Data is hitting the RRD's as confirmed by --debug & empty graph from the browser.

You see: the user smokeping is running (= is writing the data) as user root or smokeping. However, the thing that's creating the graphs has to read the data - and that's whatever process your web-server is running as. That's often apache or www, httpd or www-data.

[It depends on the apache [or how your distro sets it] configuration - or whatever other web-server you're using.]

For apache you could try:

apachectl -V | grep SERVER_CONFIG
apachectl -t -D DUMP_RUN_CFG | grep -E 'Root|User|Group'

So, make sure that both the user smokeping is running as, as well as the user the web-server is running as, both have rights to the RRD's.

[If you aren't sure what apache is running at, have a look at the apache config files. For example Ubuntu 12.04 has the user in /etc/apache2/envvars - and the user is www-data.]

So, to spoon-feed you - you'll need to chown the files to something like:

chown smokeping:www-data some-rrd-files*.rrd

Or to do many files at once from the parent directory:

find . -type f -name '*.rrd' | xargs chown smokeping:www-data

Master-slave setups

  1. Why is the master polling a target I only want the slave to poll?

[Because you told it to? Or rather, because you didn't tell it not to! See: nomasterpoll in the docs, here: http://oss.oetiker.ch/smokeping/doc/smokeping_config.en.html ]

  1. Why are my graphs empty [for the slaves?]

[See 1 & 2 above if you didn't read them already...]

A master-slave has one additional wrinkle, though the principles are the same.

For slaves, smokeping IS NOT writing the data to the RRD files - they're getting pushed there by the web-server.

So, in master-slave mode you need to be sure that the user your web-server is running as [apache perhaps] has WRITE permissions to the RRD files.

Also, if you simply go mod the permissions and then you add new slave targets, those new slave RRD files won't have the right permissions.

So you either have to simply handle that, or tweak things so the new RRD's get created with the appropriate level of permissions.

Checking that data is being written properly follows these steps.

  • check what the master is writing with --debug. [Master RRD data in]
  • the slaves will log problems writing in the web-server logs. [Slave RRD data in]

And the output of graphs will likely show the problem, also in the web-server logs. [Master and slave RRD data out]

[Though if you fix the writing problem you're probably not going to have a problem reading them. A clear sign of a slave write problem is if the master plots graph fine, but the slaves don't.]

Clone this wiki locally