How-to customize CheckMK and NagVis sounds
This article explains how to enable and customize alarm sounds in Checkmk Views and NagVis.
LAST TESTED ON CHECKMK 2.4.0p18
Overview
Checkmk can play audible alerts when a service or host changes state in Views. NagVis can also play sounds when map events are triggered.
Default sound files are stored under $OMD_ROOT/share. Any changes made there will be overwritten during site updates. The supported and persistent method is to place replacement sound files under $OMD_ROOT/local.
Important limitation regarding built-in and custom Views
There is no way to configure the following combination:
Built-in View: sound disabled
Custom View: sound enabled
The setting Sounds in views under Setup → General → Global settings is a global switch.
Once Sounds in views is enabled:
It applies to all built-in and custom Views.
Custom Views can disable sound individually by unticking Play alarm sounds.
Built-in Views do not provide an option to untick Play alarm sounds.
As a result, if global sound is enabled, built-in Views will always play alarm sounds.
Step-by-step guide
Enable sound in Checkmk views
Go to Setup → General → Global settings and search for sound.
Tick Sounds in views.
Next, open Customize from the left menu.
Go to Views.
Select the view you want (example:
allservices) and click Edit.Tick Play alarm sounds.
Open the view. If it contains a CRIT service, a sound will play.
To replay the sound, click the timer icon at the top right.
Notes on View behavior
Built-in Views inherit the global setting.
Custom Views can disable sound individually.
Built-in Views cannot disable sound individually.
Replace the default Checkmk View sound (persistent method)
The default sounds are stored here in /omd/sites/mysite/share/check_mk/web/htdocs/sounds
root@mylinuxhost:/omd/sites/mysite/share/check_mk/web/htdocs/sounds$ ls -l
total 400
-rw-rw-r--+ 1 root root 88164 Dec 18 10:10 critical.wavYou can modify the sound files directly in the default directory, but any changes made there will be overwritten during a site update. Instead, create a new sounds directory under $OMD_ROOT/local and place your custom sound file there, as shown below:
Create the local sounds directory in
OMD[mysite]:~/local/share/check_mk/web/htdocs/soundsPlace your custom sound file in that local directory using the same filename as the sound you want to replace (example shown:
critical.wav).OMD@mysite:~/local/share/check_mk/web/htdocs/sounds$ ls -l total 136 -rw-rw-r-- 1 mysite mysite 129664 Dec 24 02:33 critical.wavAs shown above, the files and directories under
$OMD_ROOT/localare owned by the site user (e.g.,mysite), while those under$OMD_ROOT/shareare owned byroot. This design is intentional and helps prevent issues in distributed environments, such as during Activate Changes operations.Refresh the browser page and verify the new sound plays.
If the old sound still plays, disable browser cache by right-clicking the page → Inspect → Network tab → tick Disable cache, then refresh.
Enable sound in NagVis
Follow the Checkmk NagVis documentation for map configuration.
In NagVis, click on Options → General Configuration.
Switch to the Object Defaults tab.
At the top, activate
event_on_load.Lower down, enable
eventsoundto activate audible warnings.
Replace the default NagVis sound (persistent method)
The default sounds are stored here in /omd/sites/mysite/share/check_mk/web/htdocs/sounds
root@mylinuxhost:/omd/sites/mysite/share/nagvis/htdocs/userfiles/sounds$ ls -l
total 400
-rw-rw-r--+ 1 root root 2966 Dec 2 13:49 std_critical.mp3You can modify the sound files directly in the default directory, but any changes made there will be overwritten during a site update. Instead, create a new sounds directory under $OMD_ROOT/local and place your custom sound file there, as shown below:
Create the local sounds directory in
OMD[mysite]:~/local/share/nagvis/htdocs/userfilesCopy your replacement MP3 into the local directory using the same filename as the sound you want to replace (example shown:
std_critical.mp3).OMD[mysite]:~/local/share/nagvis/htdocs/userfiles$ ls -l sounds total 8 -rw-rw-r-- 1 mysite mysite 5618 Dec 24 10:12 std_critical.mp3As shown above, the files and directories under
$OMD_ROOT/localare owned by the site user (e.g.,mysite), while those under$OMD_ROOT/shareare owned byroot. This design is intentional and helps prevent issues in distributed environments, such as during Activate Changes operations.Refresh the browser page and verify the new sound plays.
If the old sound still plays, disable browser cache by right-clicking the page → Inspect → Network tab → tick Disable cache, then refresh.