[smokeping-users] Smokeping, master-slave, slave targets on master host
gregs at sloop.net
Fri Oct 4 23:29:09 CEST 2013
Never mind - I didn't realize I already had a github account - so I
did a quick mark-up and posted it.
Common smokeping problems! See:
Tobi - if that looks reasonable - lets link it from the site.
GS> Here's what I have so far - these seem, by far, to be the most common
GS> problems. If you'd post them up at Git - that would be great!
GS> Smokeping usual faults:
GS> Graphs are empty!
GS> These have two root causes:
GS> 1) Data not reaching the RRD [round robin databases]
GS> Run smokeping in debug mode and watch what it says - you'll probably
GS> find some good reasons stuff isn't working and be able to fix it
GS> yourself. Like this: smokeping --debug
GS> 2) Data *is* hitting the RRD's as confirmed by --debug. However, you
GS> still get an empty graph from the browser.
GS> You see: the user smokeping is running as, is writing the data -
GS> that's often root or smokeping. However, the thing that's creating the
GS> graphs has to *read* the data - and that's whatever process your
GS> web-server is running as. That's often apache or www, httpd or
GS> [It depends on the apache [or how your distro sets it] configuration -
GS> or whatever other web-server you're using.]
GS> So, make sure that both the user smokeping is running as, as well as
GS> the user the web-server is running as, both have rights to the RRD's.
GS> [If you aren't sure what apache is running at, have a look at the
GS> apache config files. For example Ubuntu 12.04 has the user in
GS> /etc/apache2/envvars - and the user is www-data.]
GS> So, to spoon-feed you - you'll need to chown the files to something
GS> like smokeping:www-data
GS> 3) Master-slave setups:
GS> 3A) Why is the master polling a target I only want the slave to poll?
GS> [Because you told it to? Or rather, because you didn't tell it not to!
GS> See: nomasterpoll in the docs, here:
GS> http://oss.oetiker.ch/smokeping/doc/smokeping_config.en.html ]
GS> 3B) Why are my graphs empty for the slaves?
GS> See 1 & 2 above
GS> But master-slave has one additional wrinkle - though the principles
GS> are the same.
GS> For slaves, smokeping IS NOT writing the data to the RRD files -
GS> they're getting pushed there by the web-server.
GS> So, in master-slave mode you need to be sure that the user your
GS> web-server is running as [apache perhaps] has *WRITE* permissions to
GS> the RRD files.
GS> Also, if you simply go mod the permissions and then you add *new*
GS> slave targets, those new slave RRD files won't have the right
GS> So you either have to simply handle that, or tweak things so the new
GS> RRD's get created with the appropriate level of permissions.
GS> Now, you will need to check what the master is writing with --debug.
GS> The slaves will log problems writing in the web-server logs.
GS> And the *output* of graphs will likely show the problem, also in the
GS> web-server logs.
GS> [Though if you fix the writing problem you're probably not going to
GS> have a problem reading them. A clear sign of a slave write problem is
GS> if the master plots graph fine, but the slaves don't.]
DM>> On 4 October 2013 23:03, Gregory Sloop <gregs at sloop.net> wrote:
>>> I've been working on a "usual-screw-ups" FAQ:
DM>> I opened the above issue quite a while ago, with all the best
DM>> intentions.... oh well :(
DM>> You may want to add your FAQ to that.
Gregory Sloop, Principal: Sloop Network & Computer Consulting
Voice: 503.251.0452 x82
EMail: gregs at sloop.net
More information about the smokeping-users