Skip to content

Commit 5bbb86a

Browse files
committed
sort alerts by severity
1 parent 096e785 commit 5bbb86a

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* [CHANGE] Navigation is based on `providerId` URL parameter
66
* [ENHANCEMENT] Added Alertmonitor logo to menubar
77
* [ENHANCEMENT] Gracefully stop provider tasks when shutting down
8+
* [ENHANCEMENT] Sort alerts by severity
89

910

1011
## 2.5.0 / 2025-05-02

docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,20 @@ services:
1818
networks:
1919
- monitoring_network
2020
environment:
21+
# Timezone configuration
2122
- TZ=${TZ}
23+
# Logging configuration
2224
- SIMPLELOGGER_FILENAME=/opt/jboss/alertmonitor/log/alertmonitor.log
25+
- SIMPLELOGGER_LEVEL=INFO
26+
- SIMPLELOGGER_MAXFILESIZE=50
27+
- SIMPLELOGGER_MAXBACKUPFILES=10
28+
- SIMPLELOGGER_DATEFORMAT="yyyy-MM-dd'T'HH:mm:ss:SSS Z"
29+
# Custom environment variables used for variable substitution
2330
- GRAFANA_HOSTNAME=my.grafana.domain
31+
# Alertmonitor configuration
2432
- ALERTMONITOR_DATA_RETENTION_DAYS=7
2533
- ALERTMONITOR_PSYNC_INTERVAL_SEC=900
26-
- ALERTMONITOR_PROMETHEUS_SERVER=http://localhost:9090
34+
- ALERTMONITOR_PROMETHEUS_SERVER=http://prometheus:9090
2735
- ALERTMONITOR_PROMETHEUS_CLIENT_POOL_SIZE=1
2836
- ALERTMONITOR_HTTP_CLIENT_CONNECT_TIMEOUT_SEC=10
2937
- ALERTMONITOR_HTTP_CLIENT_READ_TIMEOUT_SEC=120

src/main/java/si/matjazcerkvenik/alertmonitor/web/uibeans/UiAlertsBean.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.io.Serializable;
44
import java.util.ArrayList;
5+
import java.util.Comparator;
56
import java.util.List;
67
import java.util.Map;
78
import java.util.stream.Collectors;
@@ -50,6 +51,7 @@ public List<DEvent> getActiveAlarms() {
5051

5152
List<DEvent> result = list.stream()
5253
.filter(notif -> filterEvent(notif))
54+
.sorted(Comparator.comparing(DEvent::getSeverity))
5355
.collect(Collectors.toList());
5456

5557
return result;

src/main/webapp/templates/ptoolbar.xhtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<p:menuitem value="Alarms" url="/alertmonitor" icon="pi pi-fw pi-star" />
1818
<p:menuitem value="Targets" url="/alertmonitor/targets" icon="pi pi-fw pi-th-large"/>
1919
<p:menuitem value="Configuration" url="/alertmonitor/config" icon="pi pi-fw pi-cog" />
20-
<p:menuitem value="About" url="/alertmonitor/about" icon="pi pi-fw pi-exclamation-circle" />
2120
<f:facet name="options">
2221
<p:inputText placeholder="Search" value="#{uiBean.searchString}"/>
2322
</f:facet>

0 commit comments

Comments
 (0)