Skip to content

A service to monitor the health of OpenWhisk clusters. This application continuously checks the availability of your clusters by invoking a mock function to each registered cluster, then stores the response over time to calculate a weekly availability score. Changes in the availability score are tracked and logged accordingly.

License

Notifications You must be signed in to change notification settings

physics-faas/OpenWhisk-Cluster-Availability-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenWhisk Cluster Availability Monitor

A service to monitor the health of OpenWhisk clusters. This application continuously checks the availability of your clusters by invoking a mock function to each registered cluster, then stores the response over time to calculate a weekly availability score. Changes in the availability score are tracked and logged accordingly.

Getting Started

These instructions will help you set up and run the project on your local machine or in a Docker environment.

Prerequisites

  • Python 3.8 or later
  • Docker (if you wish to run the app in a container)

Installation

Local Installation

  1. Clone the repository to your local machine.
  2. Navigate to the project directory and install the necessary Python packages using the following command:
pip install -r requirements.txt

Ran Locally

Export environmental variable with Openwhisk URL and Credentials

CLUSTERS_CONFIG='{"cluster1": {"OW_URL": "<ow_url>","OW_CREDS": "<user>:<pass>"},"clusterN": {"OW_URL": "ow_url","OW_CREDS": "<ow_user>:<ow_pass>"}}'```

Start Monitoring

python3 app.py

Docker Installation

  1. Make sure Docker is installed on your system.
  2. Build the Docker image using the following command in the project directory:
docker build -t cluster-availability-monitor .

Ran Docker container

docker run -d -e CLUSTERS_CONFIG='{"cluster1": {"OW_URL": "<ow_url>","OW_CREDS": "<user>:<pass>"},"clusterN": {"OW_URL": "ow_url","OW_CREDS": "<ow_user>:<ow_pass>"}}' cluster-availability-monitor

Configuration

Before running the application, you must configure the OpenWhisk clusters to be monitored through the CLUSTERS_CONFIG environment variable. This JSON object should map cluster names to objects containing the OW_URL and OW_CREDS properties for each cluster.

Usage

Once installed, the application will start monitoring the availability of the specified OpenWhisk clusters with the availability scores every minute. It will log important information (i.e., updates in the scores) to the console.

It can be extended to update external services requiring such info.

To check the logs of the running Docker container, use the following command:

docker logs <CONTAINER_ID>

Acknowledgments

This project has been developed as part of the activities of the EU-funded PHYSICS project under grant agreement no 101017047.

About

A service to monitor the health of OpenWhisk clusters. This application continuously checks the availability of your clusters by invoking a mock function to each registered cluster, then stores the response over time to calculate a weekly availability score. Changes in the availability score are tracked and logged accordingly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published