-
Notifications
You must be signed in to change notification settings - Fork 185
Smokeping common faults
This usually means that you are missing one or more packages needed to successfully compile.
! Configure failed for Net-SSLeay-1.92. See /usr/local/src/smokeping-2.8.2/thirdparty/work/xxxxx.xxxx/build.log for details.
! Installing the dependencies failed: Module 'Net::SSLeay' is not installed
! Bailing out the installation for IO-Socket-SSL-2.074.
-
Ubuntu 20.04.x
- In addition to gcc make rrdtool librrds-perl, install the following packages: libssl-dev zlib1g-dev
These have two root causes:
- 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. Have smokeping report on your config with the --check option.
Like this:
smokeping --check
smokeping --debug
- 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
There is also a third possibility, although it’s not a root cause:
- New targets are getting blank graphs but old targets are being updated
If it’s just a new target that is showing blank graphs, make sure to restart the smokeping process or tell smokeping to reload its configuration.
- 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 ]
- 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.
The getfacl
utility will show you the permissions. Assuming apache is your webserver user, you can give the appropriate write permissions to the directory with setfacl
- setfacl -R -m u:apache:rw /var/lib/smokeping
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.]
- Your probe does not connect to the device and you find the following error in your syslog
Jul 20 09:55:34 monitor smokeping[24588]: OpenSSHJunOSPing connecting <ip>: ctl_dir /var/lib/smokeping/.libnet-openssh-perl/ is not secure
Reason: Issue #92
Solution:
Edit /usr/share/perl5/Smokeping/probes/OpenSSHJunOSPing.pm
and add the ctl_dir
parameter in line 104 below timeout => 60
.
The value of ctl_dir
must be a path and you can use one of the following options:
/tmp/.libnet-openssh-perl
-
/var/tmp/smokeping/.libnet-openssh-perl
- you need to create/var/tmp/smokeping
first (please keep in mind that RHEL based systems clear not accessed files in/var/tmp/
every 30 days) - you could also throw it in a smokeping folder in
/opt
or/home
Make sure only smokeping
and root
have write access to the directory (and all parents) where .libnet-openssh-perl
will be stored.