Skip to content

Commit

Permalink
added license
Browse files Browse the repository at this point in the history
  • Loading branch information
matjaz99 committed Dec 25, 2021
1 parent 673b9c9 commit 1a3f169
Show file tree
Hide file tree
Showing 65 changed files with 772 additions and 141 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
## 2.0.0-SNAPSHOT

* [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 views: instance or smartTarget.
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
* [ENHANCEMENT] Added metric `alertmonitor_prom_api_duration_seconds` for monitoring Prometheus API response time.
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ RUN apk add tzdata
COPY target/alertmonitor.war /usr/local/tomcat/webapps/alertmonitor.war

RUN mkdir -p /opt/alertmonitor/log
COPY LICENSE /opt/alertmonitor
COPY NOTICE /opt/alertmonitor
COPY README.md /opt/alertmonitor

#HEALTHCHECK --interval=5m --timeout=3s \
# CMD curl -f http://localhost:8080/alertmonitor || exit 1
Expand Down
21 changes: 21 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The Alertmonitor system
Copyright 2021 Matjaž Cerkvenik

This product includes software developed by Matjaž Cerkvenik.

The following components are included in this product:

javax.servlet-api
javax.annotation-api
jsf-api
jsf-impl
primefaces
gson
simpleclient
simpleclient_common
simple-logger
okhttp
okio
kafka-clients

The Alertmonitor docker image is based on: tomcat:8.5-jre8-alpine
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,28 @@
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.

Alerts are pushed from Alertmanager to the HTTP endpoint of Alertmonitor: `/alertmonitor/webhook`.
If pushing alerts from Alertmanager is not configured, you can pull alerts via /alerts endpoint.
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.


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 provides the following views:
- Journal - history of all events
- Active - only active alerts
- Targets - alerts sorted by targets
- Statistics - statistical data
- About - general information and configuration options

Alertmonitor correlates firing alerts and resolving alerts to display current state of active alarms.

Alerts can be filtered by tags.

Alertmonitor supports periodic synchronisation of active alerts with Prometheus. This feature is extremely useful after a broken connection
to refresh the state of currently active alerts.

Screenshot:

![Alertmonitor](docs/overview.png)
![Alertmonitor](docs/screenshots/2.0.0/alerts.png)


## Quick start
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/2.0.0/alerts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/2.0.0/configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/2.0.0/statistics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/2.0.0/targets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/main/java/si/matjazcerkvenik/alertmonitor/model/DAO.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model;

import si.matjazcerkvenik.alertmonitor.model.prometheus.PRule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model;

import si.matjazcerkvenik.alertmonitor.util.MD5;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/si/matjazcerkvenik/alertmonitor/model/DTag.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model;

public class DTag {
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/si/matjazcerkvenik/alertmonitor/model/PSyncTask.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model;

import si.matjazcerkvenik.alertmonitor.model.alertmanager.*;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/si/matjazcerkvenik/alertmonitor/model/Severity.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model;

public class Severity {
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/si/matjazcerkvenik/alertmonitor/model/TagColors.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model;

import java.util.Random;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/si/matjazcerkvenik/alertmonitor/model/Target.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model;

import si.matjazcerkvenik.alertmonitor.util.AmMetrics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model.alertmanager;

import com.google.gson.Gson;
Expand All @@ -13,7 +28,7 @@

public class AlertmanagerProcessor {

public static void processWebhookMessage(WebhookMessage m) {
public static void processWebhookMessage(WebhookMessage m) throws Exception {

GsonBuilder builder = new GsonBuilder();
Gson gson = builder.create();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model.alertmanager;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model.alertmanager;

import si.matjazcerkvenik.alertmonitor.model.alertmanager.AmAlert;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model.prometheus;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model.prometheus;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model.prometheus;

public class PAlertsMessage {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
Copyright 2021 Matjaž Cerkvenik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package si.matjazcerkvenik.alertmonitor.model.prometheus;

import java.util.Map;
Expand Down
Loading

0 comments on commit 1a3f169

Please sign in to comment.