From d8deac499a27424165f744f6656a55344a15c5f4 Mon Sep 17 00:00:00 2001 From: matjaz99 Date: Sun, 26 Dec 2021 02:12:52 +0100 Subject: [PATCH] ready for 2.0.0 release --- CHANGELOG.md | 36 ++--- README.md | 123 ++++++++---------- docs/Todo.md | 6 - docs/config/README.md | 3 + docs/{ => examples}/alerts.json | 0 docs/{ => examples}/alerts2.json | 0 .../example_with_external_labels.json | 0 docs/{ => examples}/psync_alerts.json | 0 docs/{ => examples}/rules.json | 0 docs/{ => examples}/targets.json | 0 docs/{ => examples}/targets2.json | 0 .../alertmonitor/model/DNotification.java | 16 +-- .../alertmonitor/model/PSyncTask.java | 3 +- .../alertmanager/AlertmanagerProcessor.java | 2 +- .../alertmonitor/webhook/UiConfigBean.java | 3 + src/main/webapp/WEB-INF/version.txt | 2 +- src/main/webapp/about/about.xhtml | 2 +- src/main/webapp/active.xhtml | 2 +- src/main/webapp/alert/alert.xhtml | 4 +- src/main/webapp/resources/css/am_styles.css | 26 ++-- src/main/webapp/targets/targets.xhtml | 2 +- 21 files changed, 100 insertions(+), 130 deletions(-) create mode 100644 docs/config/README.md rename docs/{ => examples}/alerts.json (100%) rename docs/{ => examples}/alerts2.json (100%) rename docs/{ => examples}/example_with_external_labels.json (100%) rename docs/{ => examples}/psync_alerts.json (100%) rename docs/{ => examples}/rules.json (100%) rename docs/{ => examples}/targets.json (100%) rename docs/{ => examples}/targets2.json (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d04e508..3f299d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,40 +1,30 @@ -## 2.0.0-SNAPSHOT +## 2.0.0 / 2021-12-26 * [CHANGE] There are so many improvements in this release, the version is upgraded to 2. * [CHANGE] Licensed under Apache-2.0 License - -## 1.6.3-SNAPSHOT - * [CHANGE] Webhook view link removed from toolbar -* [FEATURE] Smart targets. The concept of smart targets is not new as Alertmonitor already did it in Targets view. It's just -that Targets are now retrieved from Prometheus. And you can now switch between: instance or smartTarget view. +* [CHANGE] Updated GUI styling due to update of Primefaces library +* [CHANGE] Environment variable `ALERTMONITOR_PSYNC_ENDPOINT`is now deprecated. Instead, +use `ALERTMONITOR_PROMETHEUS_SERVER` and without `/api/v1/alerts`. Just schema, host and port. +* [CHANGE] Alerts with severity `indeterminate` and `informational` are now also displayed in list of active alerts +* [FEATURE] Prometheus API implementation +* [FEATURE] Retrieving targets from Prometheus +* [FEATURE] SmartTargets. The concept of SmartTargets is not new as Alertmonitor already did it in Targets view. It's just +that Targets are now retrieved from Prometheus. And you can now switch between: instance or SmartTarget view. * [FEATURE] Reload Prometheus config button * [FEATURE] Load alert rules and show them in alerts +* [FEATURE] Kafka publisher will send each received alert to Kafka topic. Added environment variables for +configuration: `ALERTMONITOR_KAFKA_ENABLED` (default=false), `ALERTMONITOR_KAFKA_SERVER`, and +`ALERTMONITOR_KAFKA_TOPIC`. This is an experimental feature. +* [FEATURE] Configuration view for changing runtime parameters * [ENHANCEMENT] Added metric `alertmonitor_prom_api_duration_seconds` for monitoring Prometheus API response time. This is a replacement for `alertmonitor_psync_task_total` which is now obsolete. * [ENHANCEMENT] Styling improvements * [ENHANCEMENT] Targets have colored background according to its health (status) * [ENHANCEMENT] Search/filter also checks fields: alert name, info, instance/hostname, job, description * [ENHANCEMENT] Targets view now supports searching targets - -## 1.6.2-SNAPSHOT - -* [CHANGE] Updated GUI styling due to update of Primefaces library -* [CHANGE] Environment variable `ALERTMONITOR_PSYNC_ENDPOINT`is now deprecated. Instead, -use `ALERTMONITOR_PROMETHEUS_SERVER` and without `/api/v1/alerts`. Just schema, host and port. -* [FEATURE] Prometheus API implementation (for alerts and targets) -* [FEATURE] Retrieving targets from Prometheus * [ENHANCEMENT] Updated prometheus simple client java library to 0.12.0 * [ENHANCEMENT] Updated Primefaces java library to 11.0.0 - - -## 1.6.1-SNAPSHOT - -* [CHANGE] Alerts with severity `indeterminate` and `informational` are now also displayed in list of active alerts -* [FEATURE] Kafka publisher will send each received alert to Kafka topic. Added environment variables for -configuration: `ALERTMONITOR_KAFKA_ENABLED` (default=false), `ALERTMONITOR_KAFKA_SERVER`, and -`ALERTMONITOR_KAFKA_TOPIC` -* [FEATURE] Configuration view for changing runtime parameters * [ENHANCEMENT] Get other labels as well, not just 'supported' ones. Eg. external_labels * [ENHANCEMENT] Severity `indeterminate` and `informational` are shown as tags as well * [BUG] Fixed typos diff --git a/README.md b/README.md index b9d0a9e..b7fb337 100644 --- a/README.md +++ b/README.md @@ -6,27 +6,20 @@ [![Docker Pulls](https://img.shields.io/docker/pulls/matjaz99/alertmonitor.svg)](https://hub.docker.com/r/matjaz99/alertmonitor) [![GitHub issues](https://img.shields.io/github/issues/matjaz99/alertmonitor.svg)](https://GitHub.com/matjaz99/alertmonitor/issues/) -Alertmonitor is a webapp for displaying alerts from Prometheus. It offers a nice GUI with lots of cool features for browsing, -sorting and filtering alerts. +Alertmonitor is a webapp for displaying active alerts in Prometheus. Alertmonitor is receiving alerts from Alertmanager on the HTTP endpoint: `/alertmonitor/webhook`. Alternatively, if webhook receiver is not configured, Alertmonitor can still pull alerts directly from Prometheus. Ideally both approaches can be used in combination. This way you'll always receive alert immediately when it is fired and yet it offers -possibility to *synchronize* alerts with Prometheus current state in case if any alert has been lost. +possibility to *synchronize* alerts with Prometheus in case if any alert has been lost. +Alertmonitor automatically correlates firing and resolving alerts to display current state of active alarms. -Alertmonitor offers the following views: -- Active alerts - all currently firing alerts -- Journal - history of alerts -- Targets - alerts sorted by targets or instances -- Statistics - some statistical data (there is also `/metrics` endpoint) -- Configuration - configuration parameters of Alertmonitor -- About - general information +Alertmonitor displays monitored targets as instances or SmartTargets. Instance is one particular exporter on server, while +SmartTarget combines all instances on the same server and displays all active alerts on a server. +Tags provide a quick way of filtering alerts. -Alertmonitor correlates firing alerts and resolving alerts to display current state of active alarms. - -Alerts can be filtered by tags. Screenshot: @@ -35,9 +28,7 @@ Screenshot: ## Quick start -The easiest way to start using Alertmonitor is to deploy it on Docker. - -Deploy container: +Deploy Alertmonitor container on Docker: ``` docker run -d -p 8080:8080 matjaz99/alertmonitor:latest @@ -49,30 +40,29 @@ Alertmonitor is reachable on: [http://hostname:8080/alertmonitor/](http://hostna There is also `docker-compose.yml` file available for deployment in Swarm cluster. -#### Docker images +### Docker images Docker images are available on Docker hub: [https://hub.docker.com/r/matjaz99/alertmonitor](https://hub.docker.com/r/matjaz99/alertmonitor) ## Configure alerts in Prometheus -Alertmonitor relies on properly configured labels in Prometheus alert rules. +Alertmonitor strongly relies on properly configured labels in alert rules. Placing additional labels into alert rules will enrich the information that alert carries, such as: severity, metric labels, current metric value, alert tags or team responsible for resolving alerts. -#### Labeling alerts +### Labeling alerts Alertmonitor recognizes the following labels: | Label | Description | |-------------|-------------------------| -| severity | Mandatory (default=indeterminate). Severity is the weight of event. Possible values: `critical`, `major`, `minor`, `warning`, `clear` and `informational` | +| severity | Optional (default=indeterminate). Severity is the weight of event. Possible values: `critical`, `major`, `minor`, `warning`, `clear` and `informational` | | priority | Optional (default=low). Priority tells how urgent is alarm. Possible values: `high`, `medium`, `low` | | info | Mandatory. Detailed information about the alert. **Important: Info may not contain variables which change over the time (such as current metric value), because it creates new time series of alerts each time and the correlation will not work.!** | -| hostname | Optional. `instance` is usually already included in metric, but sometimes if alert rule doesn't return hostname (eg. containers in swarm), you can provide its value here by any other means. Usually IP address and port of exporter. | -| nodename | Optional. Descriptive name of hostname. Eg. hostname | +| instance | Optional. `instance` is usually already included in metric, but sometimes if alert rule doesn't return instance, you can provide its value here by any other means. Usually IP address and port of exporter. | | tags | Optional. Custom tags that describe the alert (comma separated). Tags are used for quick filtering in Alertmonitor. | -| team | Optional. Team responsible for this kind of alerts. | +| group | Optional. Custom group name. | | url | Optional. Custom URL that is related to alert. | | eventType | Optional. Event type according to IUT-T X.733 recommendation | | probableCause | Optional. Probable cause according to IUT-T X.733 recommendation | @@ -87,33 +77,25 @@ Example of alert rule in Prometheus (note the labels): groups: - name: my-alerts rules: - - alert: CPU usage - expr: sum(rate(process_cpu_seconds_total[5m])) by (hostname) * 100 > 80 + - alert: High CPU usage + expr: sum(rate(process_cpu_seconds_total[5m])) by (instance) * 100 > 80 for: 1m labels: - # mandatory labels severity: critical - priority: low - info: CPU alert for Node '{{ $labels.node_name }}' - # optional labels - nodename: '{{$labels.node_name}}' - hostname: '{{$labels.hostname}}' - tags: hardware, cpu, overload - team: Team1 + info: CPU alert for Node '{{ $labels.instance }}' + tags: hardware, server, cpu, overload url: 'http://${GRAFANA_HOSTNAME}/dashboard/' - eventType: 5 - probableCause: 1024 - description: Node {{ $labels.hostname }} CPU usage is at {{ humanize $value}}%. + description: Node {{ $labels.instance }} CPU usage is at {{ $value}}%. annotations: - description: Node {{ $labels.hostname }} CPU usage is at {{ humanize $value}}%. - summary: CPU alert for Node '{{ $labels.hostname }}' - currentValue: '{{ humanize $value }}%' + description: Node {{ $labels.instance }} CPU usage is at {{ $value}}%. + summary: CPU alert for node '{{ $labels.instance }}' + currentValue: '{{ $value }}%' ``` > For other integrations you might still need `description` and `summary` in annotations. Alertmonitor reads them from labels. -#### Configure webhook receiver in Alertmanager +### Configure webhook receiver in Alertmanager In order to receive alerts, configure an Alertmonitor receiver endpoint in `alertmanager.yml` configuration file. @@ -135,7 +117,7 @@ receivers: ## Views -#### Active alerts view +### Active alerts view This view shows currently active alerts. @@ -143,7 +125,7 @@ Active alerts can be filtered by selecting one or more tags. Deselect all tags to show all alerts. -#### Journal view +### Journal view This view shows all history of received events. The size of journal is limited by `ALERTMONITOR_JOURNAL_SIZE` parameter. When journal reaches its maximum size, the oldest events will be removed (First in, first out). @@ -151,11 +133,11 @@ When journal reaches its maximum size, the oldest events will be removed (First Remark: all the data in Alertmonitor is based on journal events. For example, Alertmonitor can only show targets, which have at least one alert recorded in journal. -#### Webhook view +### Webhook view This view shows raw messages as they were received by the HTTP webhook. -#### Target view +### Target view Alertmonitor strips protocol and port from `instance` label and what remains is target's hostname or IP address or FQDN. @@ -163,7 +145,7 @@ Alertmonitor then filters alerts and displays those who's hostnames match. Each target shows number of active alerts and an icon indicating the highest severity of raised alert. -#### Statistics view +### Statistics view This view shows statistical data, such as: - number of alerts by severity @@ -171,11 +153,11 @@ This view shows statistical data, such as: - timers (up time, time since last event...) - psync success rate -#### Configuratiion view +### Configuratiion view Here it is possible to change some configuration parameters during runtime. -#### About view +### About view Application meta data, version, build info... @@ -184,7 +166,7 @@ At the moment, only periodic sync endpoint can be configured (no restart require ## Configuration -#### Application configuration +### Application configuration The Alertmonitor can be configured with environment variables. Variables starting with `ALERTMONITOR_*` are related to behaviour of the application, while other variables may be used for other purposes @@ -192,18 +174,17 @@ to behaviour of the application, while other variables may be used for other pur A list of supported environment variables: -| EnvVar | Default value | Description | -|------------------------------------|-------------------------|------------------- | -| ALERTMONITOR_JOURNAL_SIZE | 20000 | Maximum journal size (FIFO). | -| ALERTMONITOR_PSYNC_INTERVAL_SEC | 900 | Periodic synchronisation interval in seconds | -| ~~ALERTMONITOR_PSYNC_ENDPOINT~~ | ~~http://localhost/prometheus/api/v1/alerts~~ | ~~The URL of Prometheus API for active alerts~~ Deprecated since 1.7.0. See `ALERTMONITOR_PROMETHEUS_SERVER` | -| ALERTMONITOR_PROMETHEUS_SERVER | http://localhost:9090 | The URL of Prometheus server | -| ALERTMONITOR_DATE_FORMAT | yyyy/MM/dd H:mm:ss | Date format for displaying in GUI | -| ALERTMONITOR_KAFKA_ENABLED | false | Enable or disable publishing to Kafka | -| ALERTMONITOR_KAFKA_SERVER | hostname:9092 | Hostname and port for Kafka | -| ALERTMONITOR_KAFKA_TOPIC | alertmonitor_notifications | Name of topic | +| EnvVar | Description | +|------------------------------------|------------------- | +| ALERTMONITOR_JOURNAL_SIZE | Maximum journal size (FIFO). Default: 20000 | +| ALERTMONITOR_PSYNC_INTERVAL_SEC | Periodic synchronisation interval in seconds Default: 900 | +| ALERTMONITOR_PROMETHEUS_SERVER | The URL of Prometheus server Default: http://localhost:9090 | +| ALERTMONITOR_DATE_FORMAT | Date format for displaying in GUI Default: yyyy/MM/dd H:mm:ss | +| ALERTMONITOR_KAFKA_ENABLED | Enable or disable publishing to Kafka Default: false | +| ALERTMONITOR_KAFKA_SERVER | Hostname and port for Kafka Default: hostname:9092 | +| ALERTMONITOR_KAFKA_TOPIC | Name of topic Default: alertmonitor_notifications | -#### Environment variable substitution +### Environment variable substitution Prometheus doesn't support substitution of environment variables in alert rules. Alertmonitor does that for you. @@ -235,7 +216,7 @@ Alertmonitor supports the following metrics in Prometheus format: - `alertmonitor_active_alerts_count` - `alertmonitor_alerts_balance_factor` - `alertmonitor_last_event_timestamp` -- `alertmonitor_psync_task_total` +- `alertmonitor_prom_api_duration_seconds` - `alertmonitor_psync_interval_seconds` Metrics are available on URI endpoint: @@ -246,30 +227,30 @@ GET /alertmonitor/metrics ## Log files +Inside container log files are located in directory `/opt/alertmonitor/log`. + Configure the log file location with environment variable `SIMPLELOGGER_FILENAME=/opt/alertmonitor/log/alertmonitor.log` -Rolling file policy can be also configured. For complete simple-logger configuration visit [https://github.com/matjaz99/simple-logger](https://github.com/matjaz99/simple-logger) +Rolling file policy can be also configured. For complete configuration of simple-logger visit [https://github.com/matjaz99/simple-logger](https://github.com/matjaz99/simple-logger) ## For developers -#### Community +### Community Google group for Alertmonitor Users: https://groups.google.com/g/alertmonitor-users -#### Dependencies +### Dependencies -Alertmonitor is written in Java. It's a maven project. It runs as web app on Apache Tomcat server and uses JSF 2.2 with Primefaces 6.2 for frontend interface. +Alertmonitor is written in Java. It's a maven project. It runs as web app on Apache Tomcat server and uses JSF 2.2 with Primefaces for frontend interface. In version 1.5.1 I switched from Java 8 to Java 13. I had to add `javax.annotations` dependency to pom.xml file. -Primefaces showcase: http://www.primefaces.org:8080/showcase - -#### Simple-logger maven dependency +### Simple-logger maven dependency Simple-logger is not available on Maven central repo. You can either build it on your own -or download jar file from [here](http://matjazcerkvenik.si/download/simple-logger-1.7.0.jar) -and then manually import it into your local repository: +or download jar file from [here](http://matjazcerkvenik.si/download/simple-logger-1.7.0.jar). +Then manually import it into your local repository: ``` wget http://matjazcerkvenik.si/download/simple-logger-1.7.0.jar @@ -283,7 +264,7 @@ Run the project with maven: mvn tomcat7:run ``` -#### Docker +### Docker Build docker image and push to docker hub: @@ -292,4 +273,4 @@ docker build -t {{namespace}}/{{image}}:{{tag}} . docker push {{namespace}}/{{image}}:{{tag}} ``` -Inside container log files are located in directory `/opt/alertmonitor/log` + diff --git a/docs/Todo.md b/docs/Todo.md index 6dc65b3..6421a52 100644 --- a/docs/Todo.md +++ b/docs/Todo.md @@ -8,15 +8,9 @@ - redesigned journal (not table, but a list with show details) - redesigned raw (not table, but a list, pretty json body) - copy to clipboard button -- show all targets: https://prom.devops.iskratel.cloud/prometheus/api/v1/targets - show targets by job -- show targets by stripped host (smart targets) -- show other labels (such as external_labels) - configure labels for CID (if needed also from external_labels) - store alarms in MongoDB -- replace team label with group -- parse alert rules from html -- reload prom diff --git a/docs/config/README.md b/docs/config/README.md new file mode 100644 index 0000000..f36cd19 --- /dev/null +++ b/docs/config/README.md @@ -0,0 +1,3 @@ +# config + +This is experimental. diff --git a/docs/alerts.json b/docs/examples/alerts.json similarity index 100% rename from docs/alerts.json rename to docs/examples/alerts.json diff --git a/docs/alerts2.json b/docs/examples/alerts2.json similarity index 100% rename from docs/alerts2.json rename to docs/examples/alerts2.json diff --git a/docs/example_with_external_labels.json b/docs/examples/example_with_external_labels.json similarity index 100% rename from docs/example_with_external_labels.json rename to docs/examples/example_with_external_labels.json diff --git a/docs/psync_alerts.json b/docs/examples/psync_alerts.json similarity index 100% rename from docs/psync_alerts.json rename to docs/examples/psync_alerts.json diff --git a/docs/rules.json b/docs/examples/rules.json similarity index 100% rename from docs/rules.json rename to docs/examples/rules.json diff --git a/docs/targets.json b/docs/examples/targets.json similarity index 100% rename from docs/targets.json rename to docs/examples/targets.json diff --git a/docs/targets2.json b/docs/examples/targets2.json similarity index 100% rename from docs/targets2.json rename to docs/examples/targets2.json diff --git a/src/main/java/si/matjazcerkvenik/alertmonitor/model/DNotification.java b/src/main/java/si/matjazcerkvenik/alertmonitor/model/DNotification.java index 177de83..273e043 100644 --- a/src/main/java/si/matjazcerkvenik/alertmonitor/model/DNotification.java +++ b/src/main/java/si/matjazcerkvenik/alertmonitor/model/DNotification.java @@ -83,7 +83,7 @@ public class DNotification implements Cloneable { /** Additional description of notification */ private String description; - private String team; + private String group; private String eventType = "5"; private String probableCause = "1024"; private String currentValue; @@ -286,12 +286,12 @@ public void setStatus(String status) { this.status = status; } - public String getTeam() { - return team; + public String getGroup() { + return group; } - public void setTeam(String team) { - this.team = team; + public void setGroup(String group) { + this.group = group; } public String getEventType() { @@ -373,7 +373,7 @@ public void setOtherLabels(Map labels) { otherLabels.remove("tags"); otherLabels.remove("severity"); otherLabels.remove("priority"); - otherLabels.remove("team"); + otherLabels.remove("group"); otherLabels.remove("eventType"); otherLabels.remove("probableCause"); otherLabels.remove("url"); @@ -391,7 +391,7 @@ public void generateUID() { + new Random().nextInt(Integer.MAX_VALUE) + info + new Random().nextInt(Integer.MAX_VALUE) - + team + + group + new Random().nextInt(Integer.MAX_VALUE) + instance + new Random().nextInt(Integer.MAX_VALUE) @@ -438,7 +438,7 @@ public String toString() { ", clearUid='" + clearUid + '\'' + ", tags='" + tags + '\'' + ", description='" + description + '\'' + - ", team='" + team + '\'' + + ", group='" + group + '\'' + ", eventType='" + eventType + '\'' + ", probableCause='" + probableCause + '\'' + ", currentValue='" + currentValue + '\'' + diff --git a/src/main/java/si/matjazcerkvenik/alertmonitor/model/PSyncTask.java b/src/main/java/si/matjazcerkvenik/alertmonitor/model/PSyncTask.java index 9cde8c9..ba1d4fb 100644 --- a/src/main/java/si/matjazcerkvenik/alertmonitor/model/PSyncTask.java +++ b/src/main/java/si/matjazcerkvenik/alertmonitor/model/PSyncTask.java @@ -18,7 +18,6 @@ import si.matjazcerkvenik.alertmonitor.model.alertmanager.*; import si.matjazcerkvenik.alertmonitor.model.prometheus.PAlert; import si.matjazcerkvenik.alertmonitor.model.prometheus.PrometheusApi; -import si.matjazcerkvenik.alertmonitor.util.AmMetrics; import si.matjazcerkvenik.simplelogger.SimpleLogger; import java.util.ArrayList; import java.util.List; @@ -71,7 +70,7 @@ public void run() { n.setTags(alert.getLabels().getOrDefault("tags", "")); n.setSeverity(alert.getLabels().getOrDefault("severity", "indeterminate")); n.setPriority(alert.getLabels().getOrDefault("priority", "low")); - n.setTeam(alert.getLabels().getOrDefault("team", "unassigned")); + n.setGroup(alert.getLabels().getOrDefault("group", "unknown")); n.setEventType(alert.getLabels().getOrDefault("eventType", "5")); n.setProbableCause(alert.getLabels().getOrDefault("probableCause", "1024")); n.setCurrentValue(alert.getAnnotations().getOrDefault("currentValue", "-")); diff --git a/src/main/java/si/matjazcerkvenik/alertmonitor/model/alertmanager/AlertmanagerProcessor.java b/src/main/java/si/matjazcerkvenik/alertmonitor/model/alertmanager/AlertmanagerProcessor.java index 7535ae4..9617e56 100644 --- a/src/main/java/si/matjazcerkvenik/alertmonitor/model/alertmanager/AlertmanagerProcessor.java +++ b/src/main/java/si/matjazcerkvenik/alertmonitor/model/alertmanager/AlertmanagerProcessor.java @@ -92,7 +92,7 @@ private static List convertToDNotif(WebhookMessage m, AmAlertMess n.setTags(a.getLabels().getOrDefault("tags", "")); n.setSeverity(a.getLabels().getOrDefault("severity", "indeterminate")); n.setPriority(a.getLabels().getOrDefault("priority", "low")); - n.setTeam(a.getLabels().getOrDefault("team", "unassigned")); + n.setGroup(a.getLabels().getOrDefault("group", "unknown")); n.setEventType(a.getLabels().getOrDefault("eventType", "5")); n.setProbableCause(a.getLabels().getOrDefault("probableCause", "1024")); n.setCurrentValue(a.getAnnotations().getOrDefault("currentValue", "-")); diff --git a/src/main/java/si/matjazcerkvenik/alertmonitor/webhook/UiConfigBean.java b/src/main/java/si/matjazcerkvenik/alertmonitor/webhook/UiConfigBean.java index 184b731..eade188 100644 --- a/src/main/java/si/matjazcerkvenik/alertmonitor/webhook/UiConfigBean.java +++ b/src/main/java/si/matjazcerkvenik/alertmonitor/webhook/UiConfigBean.java @@ -15,6 +15,9 @@ */ package si.matjazcerkvenik.alertmonitor.webhook; +import org.primefaces.model.chart.BarChartModel; +import org.primefaces.model.charts.ChartData; +import org.primefaces.model.charts.bar.BarChartDataSet; import si.matjazcerkvenik.alertmonitor.model.DAO; import si.matjazcerkvenik.alertmonitor.model.DNotification; import si.matjazcerkvenik.alertmonitor.model.TaskManager; diff --git a/src/main/webapp/WEB-INF/version.txt b/src/main/webapp/WEB-INF/version.txt index 155b9cb..359a5b9 100644 --- a/src/main/webapp/WEB-INF/version.txt +++ b/src/main/webapp/WEB-INF/version.txt @@ -1 +1 @@ -2.0.0-SNAPSHOT \ No newline at end of file +2.0.0 \ No newline at end of file diff --git a/src/main/webapp/about/about.xhtml b/src/main/webapp/about/about.xhtml index 87c7045..34045fb 100644 --- a/src/main/webapp/about/about.xhtml +++ b/src/main/webapp/about/about.xhtml @@ -8,7 +8,7 @@
- + diff --git a/src/main/webapp/active.xhtml b/src/main/webapp/active.xhtml index 72922bd..220d0d3 100644 --- a/src/main/webapp/active.xhtml +++ b/src/main/webapp/active.xhtml @@ -41,7 +41,7 @@ - + diff --git a/src/main/webapp/alert/alert.xhtml b/src/main/webapp/alert/alert.xhtml index 226ca5c..e4ffa11 100644 --- a/src/main/webapp/alert/alert.xhtml +++ b/src/main/webapp/alert/alert.xhtml @@ -47,8 +47,8 @@ - - + + diff --git a/src/main/webapp/resources/css/am_styles.css b/src/main/webapp/resources/css/am_styles.css index 4c4d15c..23f9e45 100644 --- a/src/main/webapp/resources/css/am_styles.css +++ b/src/main/webapp/resources/css/am_styles.css @@ -83,11 +83,11 @@ body .ui-panelgrid .ui-panelgrid-cell { .tagBorder { - border: 1px solid #555; - border-bottom-left-radius: 4px 4px; - border-bottom-right-radius: 4px 4px; - border-top-left-radius: 4px 4px; - border-top-right-radius: 4px 4px; + border: 1px solid #888; + border-bottom-left-radius: 7px 7px; + border-bottom-right-radius: 7px 7px; + border-top-left-radius: 7px 7px; + border-top-right-radius: 7px 7px; font-size: 12px; padding-top: 3px; padding-bottom: 3px; @@ -99,10 +99,10 @@ body .ui-panelgrid .ui-panelgrid-cell { } .targetBorder-true { border: 1px solid #BBFFAA; - border-bottom-left-radius: 6px 6px; - border-bottom-right-radius: 6px 6px; - border-top-left-radius: 6px 6px; - border-top-right-radius: 6px 6px; + border-bottom-left-radius: 7px 7px; + border-bottom-right-radius: 7px 7px; + border-top-left-radius: 7px 7px; + border-top-right-radius: 7px 7px; background: #E3FFF3; font-size: 12px; padding: 7px; @@ -112,10 +112,10 @@ body .ui-panelgrid .ui-panelgrid-cell { } .targetBorder-false { border: 1px solid #FFBBCC; - border-bottom-left-radius: 5px 5px; - border-bottom-right-radius: 5px 5px; - border-top-left-radius: 5px 5px; - border-top-right-radius: 5px 5px; + border-bottom-left-radius: 7px 7px; + border-bottom-right-radius: 7px 7px; + border-top-left-radius: 7px 7px; + border-top-right-radius: 7px 7px; background: #FFEEEE; font-size: 12px; padding: 7px; diff --git a/src/main/webapp/targets/targets.xhtml b/src/main/webapp/targets/targets.xhtml index 77bba82..3cb03d2 100644 --- a/src/main/webapp/targets/targets.xhtml +++ b/src/main/webapp/targets/targets.xhtml @@ -10,7 +10,7 @@ - +