GithubHelp home page GithubHelp logo

isabella232 / cloud-metricswatcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sap/cloud-metricswatcher

0.0 0.0 0.0 495 KB

Simple console Java notification application that will watch each metric for a critical state (of an app running on HCP), will notify you via email or SMS when such metrics are received, and will take actions to fix the issues caused by such metrics

License: Apache License 2.0

Java 100.00%

cloud-metricswatcher's Introduction

cloud-metricswatcher

REUSE status

Intro

With the current SAP BTP tools, you can configure email notifications for critical metrics of custom JMX checks and availability checks. This configuration is applicable for metrics of a running Java application. For more information, see Configuring Availability Checks from the Console Client and JMX Checks.

However, you might want to be notified for other critical metrics of running Java applications. Furthermore, you might need to perform healing operations when such metrics can cause issues such as low performance or crashes. This tutorial is to help you implement a notification application that will watch each metric for a critical state, will notify you via email or SMS when such metrics are received, and will take actions to fix the issues caused by such metrics. Furthermore, the Java applications that the notification application receives metrics from can be located in different accounts and data centers. The communication between this custom notification application and the Java applications is as follows:

  1. The notification application requests metrics of a Java application from SAP Monitoring service with a REST API call every minute. Note: The calls are sent per minute because the Java application metrics are refreshed each minute. For more information about the REST call, see Metrics API.

  2. SAP Monitoring service sends back a JSON response with a status code 200 OK. The response contains the metrics of the requested application and the states of these metrics.

  3. The notification application parses the JSON response and checks for critical metrics.

  4. The notification application notifies you by the following conditions:
    a. A metric is critical for the first time โ€“ you receive a notification email.
    b. A metric is critical three times โ€“ you receive an SMS.

  5. The notification application checks if metrics have been critical three times and takes actions for application self-healing (the Java application is restarted).

  6. The notification application repeats steps 1 to 5 for all other Java applications.

Configuration

Download this project locally and follow the instructions in Tutorial: Implementing a Notification Application.

Authors

Ivaylo Ruskov

Nikola Simeonov

Copyright and license

Copyright (c) 2015-2021 SAP SE

Except as provided below, this software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software 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.

Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

cloud-metricswatcher's People

Contributors

dependabot[bot] avatar iruskov avatar nikola-simeonov-77 avatar nikolasimeonov77 avatar sebastianwolf-sap avatar steinermatt avatar yamladenov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.