Skip to content

Commit

Permalink
Merge pull request #12 from exasol/feature/#11-add-backup-metrics
Browse files Browse the repository at this point in the history
Feature/#11-add-backup-metrics
  • Loading branch information
kaklakariada authored Feb 22, 2022
2 parents 251f3a6 + 659223c commit e32b553
Show file tree
Hide file tree
Showing 13 changed files with 192 additions and 70 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/broken_links_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ on:
schedule:
- cron: "0 5 * * *"
push:
branches:
- main
pull_request:

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure broken links checker
run: |
mkdir -p ./target
echo '{ "aliveStatusCodes": [429, 200] }' > ./target/broken_links_checker.json
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
use-verbose-mode: 'yes'
config-file: ./target/broken_links_checker.json
7 changes: 6 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
with:
fetch-depth: 0
- name: Test synthesize
run: cdk synthesize
run: cdk synthesize --json > exasolCloudwatchDashboard.json
- name: Upload cloudformation template
uses: actions/upload-artifact@v2
with:
name: cloudformation-template
path: exasolCloudwatchDashboard.json
build:
runs-on: ubuntu-latest
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:
- name: Install CDK
run: npm install -g aws-cdk
- name: Synthesize
run: cdk synthesize > exasolCloudwatchDashboard.yaml
run: cdk synthesize --json > exasolCloudwatchDashboard.json
- name: Generate sha256sum files
run: sha256sum exasolCloudwatchDashboard.yaml > exasolCloudwatchDashboard.yaml.sha256
run: sha256sum exasolCloudwatchDashboard.json > exasolCloudwatchDashboard.json.sha256
- name: Upload assets to the GitHub release draft
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: exasolCloudwatchDashboard.yaml
asset_path: exasolCloudwatchDashboard.json
- name: Upload sha256sum files
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: exasolCloudwatchDashboard.yaml.sha256
asset_path: exasolCloudwatchDashboard.json.sha256
- name: Upload error-code-report
uses: shogo82148/actions-upload-release-asset@v1
with:
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ target
.idea
.vscode
*.iml

.settings/org.eclipse.m2e.core.prefs
.settings/org.eclipse.core.resources.prefs
# CDK asset staging directory
.cdk.staging
cdk.out
Expand All @@ -26,4 +27,4 @@ pom.xml.versionsBackup
*.bak
*.orig
*.old
*.md.html
*.md.html
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,25 @@ In this repository we define the dashboard by code using [AWS CDK](https://aws.a
You can use this as a starting point for your own dashboards. In contrast to changing the dashboard using the AWS Console that allows you for example to version your dashboards in Git, add a review process or simply copy the same dashboard for multiple Exasol deployments. For that you need to go through the following steps:

* Checkout (or fork) this repository
* Adapt the dashboard to your needs (modify `src/main/java/com/exasol/cloudwatchexampledashboard/CloudwatchDashboardExamplesStack.java`)
* Adapt the dashboard to your needs (modify [`src/main/java/com/exasol/cloudwatchexampledashboard/CloudwatchDashboardExamplesStack.java`](src/main/java/com/exasol/cloudwatchexampledashboard/CloudwatchDashboardExamplesStack.java))
* [Install the AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_install)
* Deploy your dashboard using
```shell
cdk deploy --parameters deploymentName=<YOUR DEPLOYMENT NAME>
cdk deploy --parameters deploymentName=<YOUR DEPLOYMENT NAME> --parameters clusterName=MAIN
```
(Don't forget to replace `<YOUR DEPLOYMENT NAME>` with the value you configured during the CloudWatch-adapter setup)
## Injecting Metrics Values for Testing
To test your dashboard and alarms you can manually inject metrics values by executing commands like these:
```sh
aws cloudwatch put-metric-data --namespace "Exasol" --dimensions "Cluster Name=MAIN,Deployment=<YOUR DEPLOYMENT NAME>" --unit Seconds --value 30 --metric-name "BACKUP_DURATION"
aws cloudwatch put-metric-data --namespace "Exasol" --dimensions "Cluster Name=MAIN,Deployment=<YOUR DEPLOYMENT NAME>" --unit Count --value 1 --metric-name "BACKUP_START"
aws cloudwatch put-metric-data --namespace "Exasol" --dimensions "Cluster Name=MAIN,Deployment=<YOUR DEPLOYMENT NAME>" --unit Count --value 1 --metric-name "BACKUP_END"
aws cloudwatch put-metric-data --namespace "Exasol" --dimensions "Cluster Name=MAIN,Deployment=<YOUR DEPLOYMENT NAME>" --unit Count --value 1 --metric-name "BACKUP_ABORTED"
```
## Additional Information
* [Changelog](doc/changes/changelog.md)
Expand Down
80 changes: 44 additions & 36 deletions dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,54 @@
| [software.amazon.awscdk:core][0] | [Apache License 2.0][1] |
| [software.amazon.awscdk:cloudwatch][0] | [Apache License 2.0][1] |

## Test Dependencies

| Dependency | License |
| ------------------------------- | -------------------------------- |
| [JUnit Jupiter (Aggregator)][4] | [Eclipse Public License v2.0][5] |

## Plugin Dependencies

| Dependency | License |
| ------------------------------------------------------- | --------------------------------------------- |
| [Apache Maven Compiler Plugin][4] | [Apache License, Version 2.0][5] |
| [Exec Maven Plugin][6] | [Apache License 2][7] |
| [Project keeper maven plugin][8] | [MIT][9] |
| [Versions Maven Plugin][10] | [Apache License, Version 2.0][5] |
| [org.sonatype.ossindex.maven:ossindex-maven-plugin][12] | [ASL2][7] |
| [Apache Maven Enforcer Plugin][14] | [Apache License, Version 2.0][5] |
| [Maven Surefire Plugin][16] | [Apache License, Version 2.0][5] |
| [JaCoCo :: Maven Plugin][18] | [Eclipse Public License 2.0][19] |
| [error-code-crawler-maven-plugin][20] | [MIT][9] |
| [Reproducible Build Maven Plugin][22] | [Apache 2.0][7] |
| [Maven Clean Plugin][24] | [The Apache Software License, Version 2.0][7] |
| [Maven Resources Plugin][26] | [The Apache Software License, Version 2.0][7] |
| [Maven JAR Plugin][28] | [The Apache Software License, Version 2.0][7] |
| [Maven Install Plugin][30] | [The Apache Software License, Version 2.0][7] |
| [Maven Deploy Plugin][32] | [The Apache Software License, Version 2.0][7] |
| [Maven Site Plugin 3][34] | [The Apache Software License, Version 2.0][7] |
| [Apache Maven Compiler Plugin][6] | [Apache License, Version 2.0][7] |
| [Exec Maven Plugin][8] | [Apache License 2][9] |
| [Project keeper maven plugin][10] | [MIT][11] |
| [Versions Maven Plugin][12] | [Apache License, Version 2.0][7] |
| [org.sonatype.ossindex.maven:ossindex-maven-plugin][14] | [ASL2][9] |
| [Apache Maven Enforcer Plugin][16] | [Apache License, Version 2.0][7] |
| [Maven Surefire Plugin][18] | [Apache License, Version 2.0][7] |
| [JaCoCo :: Maven Plugin][20] | [Eclipse Public License 2.0][21] |
| [error-code-crawler-maven-plugin][22] | [MIT][11] |
| [Reproducible Build Maven Plugin][24] | [Apache 2.0][9] |
| [Maven Clean Plugin][26] | [The Apache Software License, Version 2.0][9] |
| [Maven Resources Plugin][28] | [The Apache Software License, Version 2.0][9] |
| [Maven JAR Plugin][30] | [The Apache Software License, Version 2.0][9] |
| [Maven Install Plugin][32] | [The Apache Software License, Version 2.0][9] |
| [Maven Deploy Plugin][34] | [The Apache Software License, Version 2.0][9] |
| [Maven Site Plugin 3][36] | [The Apache Software License, Version 2.0][9] |

[8]: https://github.com/exasol/project-keeper-maven-plugin
[18]: https://www.eclemma.org/jacoco/index.html
[22]: http://zlika.github.io/reproducible-build-maven-plugin
[28]: http://maven.apache.org/plugins/maven-jar-plugin/
[10]: https://github.com/exasol/project-keeper-maven-plugin
[24]: http://zlika.github.io/reproducible-build-maven-plugin
[30]: http://maven.apache.org/plugins/maven-jar-plugin/
[1]: http://www.apache.org/licenses/LICENSE-2.0
[5]: https://www.apache.org/licenses/LICENSE-2.0.txt
[14]: https://maven.apache.org/enforcer/maven-enforcer-plugin/
[7]: http://www.apache.org/licenses/LICENSE-2.0.txt
[16]: https://maven.apache.org/surefire/maven-surefire-plugin/
[24]: http://maven.apache.org/plugins/maven-clean-plugin/
[9]: https://opensource.org/licenses/MIT
[30]: http://maven.apache.org/plugins/maven-install-plugin/
[12]: https://sonatype.github.io/ossindex-maven/maven-plugin/
[6]: http://www.mojohaus.org/exec-maven-plugin
[10]: http://www.mojohaus.org/versions-maven-plugin/
[4]: https://maven.apache.org/plugins/maven-compiler-plugin/
[19]: https://www.eclipse.org/legal/epl-2.0/
[32]: http://maven.apache.org/plugins/maven-deploy-plugin/
[34]: http://maven.apache.org/plugins/maven-site-plugin/
[26]: http://maven.apache.org/plugins/maven-resources-plugin/
[7]: https://www.apache.org/licenses/LICENSE-2.0.txt
[16]: https://maven.apache.org/enforcer/maven-enforcer-plugin/
[9]: http://www.apache.org/licenses/LICENSE-2.0.txt
[18]: https://maven.apache.org/surefire/maven-surefire-plugin/
[26]: http://maven.apache.org/plugins/maven-clean-plugin/
[5]: https://www.eclipse.org/legal/epl-v20.html
[11]: https://opensource.org/licenses/MIT
[32]: http://maven.apache.org/plugins/maven-install-plugin/
[4]: https://junit.org/junit5/
[14]: https://sonatype.github.io/ossindex-maven/maven-plugin/
[8]: http://www.mojohaus.org/exec-maven-plugin
[12]: http://www.mojohaus.org/versions-maven-plugin/
[6]: https://maven.apache.org/plugins/maven-compiler-plugin/
[21]: https://www.eclipse.org/legal/epl-2.0/
[34]: http://maven.apache.org/plugins/maven-deploy-plugin/
[36]: http://maven.apache.org/plugins/maven-site-plugin/
[28]: http://maven.apache.org/plugins/maven-resources-plugin/
[0]: https://github.com/aws/aws-cdk
[20]: https://github.com/exasol/error-code-crawler-maven-plugin
[22]: https://github.com/exasol/error-code-crawler-maven-plugin
[20]: https://www.jacoco.org/jacoco/trunk/doc/maven.html
1 change: 1 addition & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changes

* [0.2.0](changes_0.2.0.md)
* [0.1.1](changes_0.1.1.md)
* [0.1.0](changes_0.1.0.md)
33 changes: 33 additions & 0 deletions doc/changes/changes_0.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# cloudwatch-dashboard-examples 0.2.0, released 2022-02-22

Code name: Metrics and alarms for Exasol backups

## Summary

In this release we added metrics for successful/failed backups and backup duration. We also added alarms for failed backups and missing succesful backups.

## Features

* #11: Added metrics and alarms for Exasol backups

## Dependency Updates

### Compile Dependency Updates

* Updated `software.amazon.awscdk:cloudwatch:1.133.0` to `1.145.0`
* Updated `software.amazon.awscdk:core:1.133.0` to `1.145.0`

### Test Dependency Updates

* Added `org.junit.jupiter:junit-jupiter:5.8.2`

### Plugin Dependency Updates

* Updated `com.exasol:error-code-crawler-maven-plugin:0.6.0` to `1.0.0`
* Updated `com.exasol:project-keeper-maven-plugin:1.3.2` to `1.3.4`
* Updated `io.github.zlika:reproducible-build-maven-plugin:0.13` to `0.15`
* Updated `org.apache.maven.plugins:maven-compiler-plugin:3.8.1` to `3.10.0`
* Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3` to `3.0.0`
* Updated `org.codehaus.mojo:versions-maven-plugin:2.7` to `2.9.0`
* Updated `org.jacoco:jacoco-maven-plugin:0.8.5` to `0.8.7`
* Updated `org.sonatype.ossindex.maven:ossindex-maven-plugin:3.1.0` to `3.2.0`
Binary file modified doc/images/exasolCloudwatchDashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion error_code_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error-tags:
CDE:
packages:
- com.exasol.cloudwatchexampledashboard
highest-index: 0
highest-index: 1
32 changes: 18 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.exasol</groupId>
<artifactId>cloudwatch-dashboard-examples</artifactId>
<version>0.1.1</version>
<version>0.2.0</version>
<name>cloudwatch-dashboard-examples</name>
<description>Example dashboards for the Exasol database's CloudWatch metrics</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cdk.version>1.133.0</cdk.version>
<cdk.version>1.145.0</cdk.version>
<java.version>11</java.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Expand All @@ -25,13 +23,19 @@
<artifactId>cloudwatch</artifactId>
<version>${cdk.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
Expand All @@ -48,7 +52,7 @@
<plugin>
<groupId>com.exasol</groupId>
<artifactId>project-keeper-maven-plugin</artifactId>
<version>1.3.2</version>
<version>1.3.4</version>
<executions>
<execution>
<goals>
Expand All @@ -69,7 +73,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<version>2.9.0</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -86,7 +90,7 @@
<plugin>
<groupId>org.sonatype.ossindex.maven</groupId>
<artifactId>ossindex-maven-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -99,7 +103,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.0.0</version>
<executions>
<execution>
<id>enforce-maven</id>
Expand All @@ -109,7 +113,7 @@
<configuration>
<rules>
<requireMavenVersion>
<version>3.3.9</version>
<version>3.6.3</version>
</requireMavenVersion>
</rules>
</configuration>
Expand All @@ -132,7 +136,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>0.8.7</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand Down Expand Up @@ -179,7 +183,7 @@
<plugin>
<groupId>com.exasol</groupId>
<artifactId>error-code-crawler-maven-plugin</artifactId>
<version>0.6.0</version>
<version>1.0.0</version>
<executions>
<execution>
<goals>
Expand All @@ -191,7 +195,7 @@
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.13</version>
<version>0.15</version>
<executions>
<execution>
<id>strip-jar</id>
Expand Down
Loading

0 comments on commit e32b553

Please sign in to comment.