Skip to content

Instantly share code, notes, and snippets.

@NoifP
Last active January 19, 2026 20:36
Show Gist options
  • Select an option

  • Save NoifP/55f4ac2ca9aee78b84dffa5aadfea93b to your computer and use it in GitHub Desktop.

Select an option

Save NoifP/55f4ac2ca9aee78b84dffa5aadfea93b to your computer and use it in GitHub Desktop.
Smokeping RRDCacheD on Debian 13

Smokeping RRDCacheD on Debian 13

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.

  1. Add the service config below to the systemd smokeping override file: systemctl edit smokeping

    [Service]
    Environment="RRDCACHED_ADDRESS=unix:/var/run/rrdcached.sock"
    
  2. Tell systemd to use the overlay file: systemctl daemon-reload

  3. Install rrdcached and stop it:

    apt install rrdcached
    systemctl stop rrdcached
    
  4. Edit /etc/default/rrdcached file for rrdcached so it runs as smokeping (instead of root):

    1. nano /etc/default/rrdcached
    2. Set the following:
      SOCKGROUP=smokeping
      DAEMON_GROUP=smokeping
      DAEMON_USER=smokeping
      BASE_PATH=/var/lib/smokeping
      
  5. 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.*
    
  6. Start rrdcached and confirm it is happy:

    systemctl start rrdcached
    systemctl status rrdcached
    

    Check the process is running as smokeping user and group as well as has -b /var/lib/smokeping (you should be able to see this in systemctl's output).

  7. Restart smokeping and confirm it is happy:

    systemctl restart smokeping
    systemctl status smokeping
    
  8. Use nc to confirm rrdcached is getting records from smokeping (you should see UpdatesReceived increasing).

    1. Connect with nc -U /var/run/rrdcached.sock
    2. Type the following commands to get info: STATS, QUEUE
      STATS
      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.
      
    3. When done type QUIT
  9. Check your graphs in smokeping. They should start getting updates (assuming you have some working targets).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment