/CloudFoundryMonitoring

Python Utility to monitor apps in Cloud Foundry and also to monitor non Cloud Foundry apps using HTTP Codes :rocket::rocket:

Primary LanguagePython

CloudMonitoring

CloudMonitoring is built using Python 3. CloudMonitoring code interacts with Cloud Foundry Client meaning it doesnt interact with the CF installed on your local machine.

CloudMonitoring tool downloads the necessary dependencies automatically when you run the setup. CloudMonitoring tool uses Chrome browser driver V2.33 to test the web application urls using Splinter V0.77 in a headless mode and captures the HTTP States.

CloudMonitoring tool can be customized for your monitoring purposes, by default the tool is scheduled to run for every 15 minutes but this can be modified in the JSON. During each schedule CloudMonitoring tool checks the Summary & Stats of the apps, if any of the app which is set for monitoring is STOPPED it tries to bring back the servers to RUNNING state.

Email Notifications:

CloudMonitoring tool sends eMail notifications using SMTP client. Emails are sent in the below scenarios

  • When a monitored app is STOPPED
  • Whena a STOPPED app is successfully brought to RUNNING state
  • When Cloud Monitor tool fails to bring the app to RUNNING state in 3 attempts

Prerequisites to run the tool:

  • Chrome Browser

Run CloudMonitoring tool:

Download the tool & configure cloudmonitoring_config.json with your application details. Once you are done with finalizing the JSON file double click on CloudMonitoringTool.exe to start the CloudMonitoring tool.

Logs & Health data:

Logs are written to monitor.log and a CSV file is written with name CloudMonitoring.csv where you can find the health data of the application and status of the application during the monitor schedule time Note: While the tool is running dont open the CSV file, copy the CSV & paste it now open the copied CSV file so that it doesnt interrupt the tool execution

Project Contributors: Thanks to Sampath Kotra, Sriharsha Bhasuru