Skip to content

svalert.8

Manvendra Bhangui edited this page Apr 13, 2026 · 2 revisions

NAME

svalert - handle service alerts

SYNOPSYS

svalert sv arg2 [ arg3 ] [ arg4 ]

DESCRIPTION

svalert(8) is a script that can be used to send alerts for services started by supervise(8). It can be called in sv/run, sv/alert, sv/shutdown, where sv is the service name (usually a service in /service. If you don't have an alert script or a shutdown script, you can link these scripts to svalert. e.g.

  ln -s /usr/libexec/indimail/svalert /service/sv/alert
  ln -s /usr/libexec/indimail/svalert /service/sv/shutdown

You can have a line like below in your run, alert, shutdown script to send alerts.

  [ -x /usr/libexec/indimail/svalert ] && /usr/libexec/indimail/svalert "$@"

supervise passes arguments to the run, alert and the shutdown scripts. You can call svalert in these scripts by executing as svalert "$@". See supervise(8) for the full explanation of the arguments passed to run, alert and the shutdown scripts. svalert sends these alerts to the host name probe-server in /etc/hosts. You can set the environment variable PROBE_SERVER to an IP address or hostname to override /etc/hosts. svalert will then use the arguments passed to it, to send alerts on port 3001 as default using udpclient(1). You can use another port by setting SV_ALERT_PORT to a custom port. You can also set USE_SYSLOG environment variable to send messages to system journal using the logger(1) command.

SEE ALSO

supervise(8), svscan(8), udpclient(1),

Clone this wiki locally