Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to collect data like cpu and than send it via email

Hi, i am only a beginner with GCP so please provide me some explanation. I dont know how to collect data about my instance in ubuntu terminal, than send this collected data like graph on my email, i hope you understand me)

Thanks in advance!

2 2 132
2 REPLIES 2

Hello @oleksandr7531  ,Welcome on Google Cloud Community.

You have to configure alerting policy with desired metric and notification channel with your email address or email address where such alert should be routed. Would be also good to install OpsAgent. So lets' brake this step by step:

1. Log in to your Ubuntu machine and follow steps from this tutorial: 

https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/installation#install-latest-ver...

2. Once installed, go to Monitoring ( type in Searchbox "Monitoring" ) 

DamianS_0-1721797061366.png

3. Go to Alerting -> EDIT NOTIFICATION CHANNELS -> Email -> ADD NEW. Provide details like your email and click SAVE

DamianS_1-1721797127167.png

DamianS_2-1721797160956.png

DamianS_3-1721797178488.png

4. Then again go to Alerting -> CREATE POLICY -> Select metric and pick whatever you need

DamianS_4-1721797265477.png

5. Configure alerting policy as you need by changing "Rolling window" or by adding filters. 
6. Then go to Configure trigger -> Pick your condition types and threshold

DamianS_5-1721797356648.png

7. Next go to Notifications and name -> Pick notification channel. Check "Notify on incident closure" 

DamianS_6-1721797405707.png

DamianS_7-1721797445316.png

8. Provide alert policy name. Severity and Documentation are optional, but it's good practice to fill out them. 

DamianS_8-1721797502891.png

9. Click CREATE POLICY. 
10. Congratz, your policy has been created 🙂

DamianS_9-1721797545109.png

Monitoring documentation : https://cloud.google.com/monitoring/docs/monitoring-overview

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost

Thank you so much, i’ll try)