Sound the Alarm
Historically grown environments often use more than one monitoring system. For example, production might use Zabbix, while research uses Ganglia with its computing clusters, and IT swears by Observium. In other cases, monitoring runs locally on each of the organization's sites and, of course, the tools are from different vendors because the various sites purchased them independently.
The Alerta [1] alerting manager collects messages from all of these systems, summarizes and de-duplicates them, and displays the results on a clear-cut web page. The Alerta web view gives you the messages from all the monitoring applications involved, sorting the messages by criticality. If you don't want to commit right away, the demo page [2] will give you a taste of the features.
Installing Alerta
Alerta is based on the Python programming language with Flask as its web framework. The data can be stored in either MongoDB or PostgreSQL. For actions on the command line, a command of the same name can generate alerts. You can save yourself some work with the docker-alerta Docker image [3] from the GitHub repository.
To begin, open the docker-compose.yml file and change the value for ADMIN_PASSWORD; then, start the containers:
wget https://raw.githubusercontent.com/alerta/docker-alerta/refs/heads/master/docker-compose.yml
sed -i -e 's/ADMIN_PASSWORD=.*/ADMIN_PASSWORD=abc123/' docker-compose.yml
docker-compose up -d
alias alerta="docker exec -it root_web_1 /venv/bin/alerta"
alerta versionThe final command outputs the version number and automatically checks whether the containers are running and whether internal communication in Alerta is working.
Now access the web interface on http://<Your_Server>:8080/ and log in to the website with the access credentials from the Compose file. The alarm list that is now visible is initially empty. All that is missing are a few test alerts to bring the website to life. In principle, any monitoring system can be integrated by the Application Programming Interface (API); however, I will start with the alerta command.
Alarms at the Command Line
Alerta comes with a command of the same name, which not only sends alerts but is a full-fledged replacement for the web console – albeit in the console view. The command is part of the Docker installation but can also be used separately with the pip Python installer [4]. The Alerta server and the alerta command use the same API key by default, so you can set off the first alarm:
alerta send --resource <Your_Server> --service Disk --event DiskFull --environment Production --severity majorIf the two components are running on different hosts or use different API keys, you will need to adjust the local configuration. The alerta command takes its parameters from the alerta.conf file in your home directory or from environment variables. Both options are described and illustrated with examples in the GitHub repository. The
alerta topcommand provides a quick overview of critical alarms (Figure 1). Unfortunately, the view cannot be filtered as nicely as with the web console, which I introduce in the next section.

Color Highlighting in the GUI
The Alerta graphical user interface (GUI) appears without encryption in the web browser on http://<Your_Server>:8080/. After logging in, the test alarm of the alerta command should be visible. The default filter only shows open messages (i.e., messages for which the client has not yet given the all-clear). On the right-hand side of the respective alarm line, the message can be conveniently confirmed or deleted with the mouse.
Alerta pulls out all the stops when it comes to color highlighting: Alerts with a Critical weighting are red, Warnings are blue, Major is orange, Minor is yellow, and Normal is green. An alarm remains in the list until the client sends another message with a Normal severity level. The icon at top left opens the menu structure, where you can create users, groups, and API keys. Here, you can also generate an API key to integrate your own monitoring system.
Integrating Monitoring Systems
Nagios might not be the newest kid on the monitoring block, but it is certainly the best known. The Nagios-to-Alerta gateway [5] on GitHub is an event broker that sends Nagios alarms to Alerta with minimal overhead. An existing Nagios environment requires the precompiled alerta-neb.o.nagios4 file on the local filesystem. You need to include this as a broker_module in your nagios.conf file and add the API key and the URL of the Alerta server in the same line. After restarting Nagios, a copy of each message is sent to Alerta. The event broker takes care of authentication and the correct format.
If you cannot find a ready-made integration project for your monitoring software, you will need to program it yourself – which sounds more complicated than it is, as long as the monitoring system can trigger an arbitrary command as an alert. This command then calls the alerta command and sends the alert to the Alerta server. For example, the M/Monit monitoring tool on a local Rocky Linux checks the HTTPD process and contacts Alerta if the web service becomes unavailable. The M/Monit-style configuration is:
check process httpd with pidfile /run/httpd/httpd.pid
if 2 restart within 3 cycle then exec "/usr/local/bin/alerta --config-file /etc/alerta.conf --profile production send --resource Rocky9 --service Web --event ServiceDown --environment Production --severity major"Unfortunately, M/Monit does not give the all-clear, but at least it tries to restart several times before Alerta is notified of the failure.
Nagios and M/Monit are just two examples of how Alerta can be used in combination with other tools. The documentation [6] has a long list of compatible providers and software projects under Integrations & Plugins and in the GitHub repository, with candidates including Grafana, Telegram, Slack, Zabbix, and Fail2ban. Extensions such as pinger and urlmon let Alerta independently check the remote station for availability and generate alerts from the results. When browsing the list, the direction is always important, because Alerta can only receive SNMP traps and syslog messages, but cannot send them – with email and Microsoft Teams, it is exactly the opposite.
Manage Users
The logged-in administrator can do and see everything. A new user is created in the web GUI in the Users area and is assigned permissions with the selected role user or guest. What sounds like a fairly rough and ready authorization solution can be made more granular in the Permissions section. Roles are assigned specific rights for individual website functions, such as read access for alerts or modify rights for API keys.
By default, users can create their own accounts on the website and then work with the GUI. Self-registration can be disabled but only in the Compose file, where you need to set the SIGNUP_ENABLED variable to False and restart the containers. The registration option then disappears from the login page.
Because local user accounts are a nuisance in large environments, Alerta allows users to log in to an authentication server. The options range from OpenID Connect, to SAML and OAuth2, to classic LDAP, which means you can use the most common authentication services or your local Active Directory. The configuration is handled at the command line in the alertad.conf configuration file. The DEBUG variable supports troubleshooting by enriching the output of
docker-compose logs -fwith detailed log messages.
Setting Up Multiclient Capability
Alerta can assign incoming alerts to clients. The corresponding user account only sees the messages from its own monitoring system in the web view, which is useful for managing multitenant setups. The assignment is made by the API key. If Alerta receives an alert that has been authenticated with the API key belonging to customer A, the message obviously belongs to that tenant. This distinction is also useful when multiple monitoring systems in the same company report to Alerta. In this case, each individual system is a tenant, so the web view always shows the environment in which the alert originated.
Alerta only uses this multitenant capability if the CUSTOMER_VIEWS variable is set to True in the Compose file. To enable, you need to restart the container. The web interface will then display the new Customers section. Create a Customer for each customer or monitoring system; then, create a new API key for each entry. Figure 2 shows how Alerta collects messages from multiple systems and displays the origin in the Customer column.

Alerta in the Cloud
To log the monitoring systems of different customers centrally, you can host the Alerta server with a cloud provider and receive the alerts from the Internet. However, you have to do some upgrading of the existing environment, because the server is currently unencrypted. You can use an upstream web server such as Caddy to resolve the issue. The Caddy software automatically obtains TLS certificates from Let's Encrypt to prevent warnings in the web browser. The configuration takes just a few lines.
However, first you need to install Caddy on your local Linux machine with either the package manager, an executable, or a container. The web server expects its configuration to be stored in a text file named Caddyfile. Caddy only needs a few lines to help it perform its role as a reverse proxy:
https://<alerta.example.net> {
reverse_proxy localhost:8080
# tls internal
}Replace the first line with your server's DNS name. When you call
caddy runthe first time, Caddy contacts the Let's Encrypt certificate server and obtains valid TLS certificates for the name selected in the first line. If you do not have a public domain or are trying out the setup on your local network, remove the hash in line 3. Caddy will then use self-signed certificates. Alerta is then accessible on https://<alerta.example.net> – both the website and the API. If the hosting provider has a firewall, it needs permission for ports 80 (Let's Encrypt) and 443 (HTTPS).
Caddy can also be started as a Docker container and integrated into the existing Compose file. The extended docker-compose.yml file is available for download [7].
Targeted API Use
With Alerta, everything relies on the API, even if this is not apparent at first glance. The web front end communicates with the back end on localhost and transfers all the commands to the API in JSON format. Although not a groundbreaking innovation, it demonstrates the developers' structured approach. API access is open but requires authentication in the form of an API key. This type of key is the same as that used by a monitoring system to transfer alarms to Alerta. In the simplest case, curl accesses the API and retrieves an overview of the current situation (Listing 1).
| Listing 1: Retrieving Data |
|
The command chain with jq makes the output a bit friendlier; otherwise everything would be in a single long line. Also interesting is the alert endpoint, which the API uses to receive an alert without the alerta command having to be installed on the local machine. In this way, Alerta can be operated entirely with curl or integrated into your software.
The official documentation explains all the functions and provides detailed examples in the API Reference section. If you want to practice safely in a demo environment, take a look at the API kit [8]. If you encounter any initial difficulties, a request to the endpoint /management/healthcheck will check whether the Alerta service is running and the database is OK. Ideally, you will receive a 200 OK response.
Checking Whether a Service Is Still Running
Alerta also offers a feature from the world of passive monitoring: heartbeats. A script or cron job must call this API endpoint regularly. If this call is not made, Alerta can throw an alert. This feature is useful for backup jobs, for example, so you can immediately see whether they are working properly. An existing backup script can be extended to include heartbeat in a curl command:
curl --request POST --header 'Authorization: Key H0i_bj<...>' --header 'Content-type: application/json' --data '{ "origin": "gitea", "timeout": 360 }'https://<alerta.example.net>/api/heartbeatAlerta displays the update messages in the Heartbeats section of the web GUI (Figure 3). Servers or services that do not phone home for a longer period of time are marked expired. Unfortunately, an alert is not generated automatically, but only after running the
alerta heartbeats --alertscommand. The documentation recommends setting up this command as a cron job that runs every five minutes.

Alerta Reports
Alerta can receive messages and can forward them to other Alerta servers. This feature is designed for environments with hierarchical structures. For example, the local Alerta server at a company site receives all the alerts and forwards them to company headquarters. The receiving server can even use a different alert manager, as long as the software can interpret the JSON messages correctly.
Another use case is a high-availability Alerta cluster: Alerta forwards incoming alarms from cluster node A to node B and vice versa, keeping the two servers synchronized, and it automatically rules out infinite loops.
The next reporting function relates to top 10 reports: Which services were most frequently affected? In the Reports section of the web GUI, Alerta lists the problem cases sorted by message count, which means you can deal with particularly disruptive candidates in a targeted way. For example, if the same server is complaining about a high CPU load every day at around four in the morning, the daily cron job could be a possible cause.
Finally, do not forget that the alerting software is open for changes and offers plenty of scope for integrations and minor tweaks. The developers provide a library for the Python programming language, making Alerta particularly easy to integrate into Python scripts. Also very appealing is the ability for third-party providers, such as AWS CloudWatch and Grafana, to use webhooks to connect to Alerta and generate alerts there.
Conclusions
Alerta is not a typical monitoring system that queries the network status; instead, it is a collection point for alerts from other monitoring systems. Alerta gains an overview of which monitoring environments are operating normally and where things are currently falling apart. Alerta comes with a command-line tool that lets you interact with your monitoring environment and can also be controlled entirely by the API, which means that integration with any programming language is possible. Alerta is also at home in the cloud, making it ideal for service providers.
[2] Demo environment: https://try.alerta.io/alerts
[3] docker-alerta: https://github.com/alerta/docker-alerta
[4] Python Alerta client: https://github.com/alerta/python-alerta-client
[5] Nagios-to-Alerta gateway: https://github.com/alerta/nagios-alerta
[6] Alerta documentation: https://docs.alerta.io
[7] Docker Compose file with Alerta, PostgreSQL, and Caddy: https://www.it-administrator.de/sites/default/files/2025-02/docker-compose.txt
[8] API kit: explorer.alerta.io