How to configure Smokeping alerts


SmokePing keeps track of your network latency:
  • Best of breed latency visualisation.
  • Interactive graph explorer.
  • Wide range of latency measurement plugins.
  • Master/Slave System for distributed measurement.
  • Highly configurable alerting system.
  • Live Latency Charts with the most ‘interesting’ graphs.
  • Free and OpenSource Software written in Perl written by Tobi Oetiker, the creator of MRTG and RRDtool

Another great feature of smokeping is the ability to write your own Alert rules and them have smokeping email when a rule is fired. Very useful 😀 The guide for this is taken from an Ubuntu 10.04 server but the config should be pretty much the same on any *nix (some linux versions contain all these elements in a single config file).

First off we write our rules in /etc/smokeping/config.d/Alerts. I only use two rules at the moment for basic checking/alerting. Not the use of edgetrigger. This means a rule only send alerts when its state changes I.e one email to report the fault raised and one to report cleared. If you dont use this a mail will be sent every 5 minutes when the rule is triggering.

*** Alerts ***
# This is an Alias on the machine
to = smokealert@localhost
from =

# This rule checks for 3 periods (3 * 5min default) where
# the rtt is >70ms
type = rtt
# in milli seconds
pattern = >70,>70,>70
edgetrigger = yes
comment = On backup circuit maybe?

# This rule checks for one period (1 * 5mins) of >60% loss
type = loss
# in percent
pattern = >60%
edgetrigger = yes
comment = Massive loss for 5 mins

From the rules above I send Alerts to a local alias. This is so I can easily send mails to multiple mailboxes. I do this by editing the aliases file vi /etc/aliases adding the line below then running the newaliases command to register the aliase

smokealert: :include:/etc/smokeping/config.d/userstoalert

Then I have a file with an email address on each line at /etc/smokeping/config.d/userstoalert. So e.g.


Now just edit the Targets and apply the rules to the hosts you want /etc/smokeping/config.d/Targets.

++ Google
menu = Google
title =
host =
alerts = hostdown

++ m00nie
menu = m00nie
title = m00nie
host =
alerts = rttdetect,hostdown

Now simply restart the smokeping service (service smokeping restart) and your good to go 🙂

Example of an email alert received.

Thu Jul 5 02:28:17 2012

Alert “hostdown” was raised for

> 60%

Data (old –> now)
loss: 0%, 0%, 0%, 100%
rtt: 21ms, 22ms, 21ms, U

Massive loss for 5 mins

m00nie 😀


  • I use smokeping and it works great. But I want to translate the mail text, because phrases like
    “[SmokeAlert] offline is active on Server1”
    doesnt sound good.

    Do you know where to find these text for editing them? Regards from Frankfurt, Germany

  • Hi Christian

    Sorry its not something I’ve ever done but if there is a “comment = blah” you can configure for each alert that might include a description your looking for. If you do find what your looking for it would be good to know 🙂


  • Hola, muy bueno el articulo.
    He logrado hacer funcionar el server, pero no puedo lograr que envíe un mail ante una alerta. He configurado todo lo posible y nada. Podrás ayudarme?

  • Hi Esteban

    Might be worth checking the mail log which is probably /var/log/maillog for any info that might help debug mail problems? 🙂


  • Gracias por la respuesta.
    En mi Debian existe /var/log/mail.err,.info, .log, .warn, pero estan vacíos.
    “tSmoke –testamail” envía exitosamente un email a la casilla configurada en “Alerts”
    /var/log/messages muestra alertas desplegadas por smokeping.
    Sin embargo smokeping –debug devuelve “no match” para cada target, aunque haya alarma.
    ¿Alguna idea?

  • Esteban,

    Me ocurria lo mismo y pensaba que era un error, pero en realidad lo que esta diciendo es que no hay alerta para ese target.


  • Gracias por contestar Jorge, lo que ocurre es que efectivamente hay alarmas evidentes, pero el debug no los ve, y por tanto no me manda el mail.

  • Hi Tommy

    Edgetrigger just means you get a mail/alert on a state change e.g. from no fault -> fault or fault -> no fault would send an alert/mail. Of you dont configure edgetrigger you get an alert/mail every 5mins!
    Hope that helps



  • Kamil, not necessarily, you can have “groups” in smokeping and setup the alerts there instead of each host. In you Targets file, you can have:
    + Internet
    menu = Internet
    title = Internet
    alerts = rttdetect,hostdown

    ++ Host1
    menu = My 1st host
    title = My 1st host
    host =

    ++ Host2
    menu = My 2nd host
    title = My 2nd host
    host =

    Then the alerts defined in the group “Internet” will apply on “Host1” and “Host2”.

Leave a Reply