Probably not secure - but it's a start
This assumes smokeping is already installed and running. If not apt install smokeping will be a good starting point.
-
Add the service config below to the systemd smokeping override file:
systemctl edit smokeping[Service] Environment="RRDCACHED_ADDRESS=unix:/var/run/rrdcached.sock" -
Tell systemd to use the overlay file:
systemctl daemon-reload -
Install rrdcached and stop it:
apt install rrdcached systemctl stop rrdcached -
Edit
/etc/default/rrdcachedfile for rrdcached so it runs as smokeping (instead of root):nano /etc/default/rrdcached- Set the following:
SOCKGROUP=smokeping DAEMON_GROUP=smokeping DAEMON_USER=smokeping BASE_PATH=/var/lib/smokeping
-
Set permissions so rrdcached can still access it's files as smokeping user and remove stale PID and socket:
chown -R smokeping:smokeping /var/lib/rrdcached rm /var/run/rrdcached.* -
Start rrdcached and confirm it is happy:
systemctl start rrdcached systemctl status rrdcachedCheck the process is running as
smokepinguser and group as well as has-b /var/lib/smokeping(you should be able to see this in systemctl's output). -
Restart smokeping and confirm it is happy:
systemctl restart smokeping systemctl status smokeping -
Use
ncto confirm rrdcached is getting records from smokeping (you should seeUpdatesReceivedincreasing).- Connect with
nc -U /var/run/rrdcached.sock - Type the following commands to get info:
STATS,QUEUESTATS 9 Statistics follow QueueLength: 0 UpdatesReceived: 99 FlushesReceived: 10 UpdatesWritten: 15 DataSetsWritten: 80 TreeNodesNumber: 5 TreeDepth: 3 JournalBytes: 44354 JournalRotate: 0 QUEUE 0 in queue. - When done type QUIT
- Connect with
-
Check your graphs in smokeping. They should start getting updates (assuming you have some working targets).