I have a script running on a Linux machine that triggers a JAR file to run. I need to monitor this script using Google Cloud Platform (GCP) and receive an email alert if the script stops working. What are the All detailed steps to achieve this, both in the script and in GCP?
Specifically, I need help with:
- Sending custom metrics from the Linux script to GCP Monitoring.
- Setting up alerting policies in GCP based on these custom metrics.
Could someone provide a detailed guide or point me to relevant documentation or examples?
Thank you!
What I have tried so far:
- Created a bash script that checks if the main script and the JAR file are running.But didn’t work.