Skip to content

Latest commit

 

History

History

case01

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Oracle Cloud Infrastructure Monitoring Examples

Case01: Auto Scale with Monitoring Alarm + Notifications

Example of setting the CPU threshold and executing Auto Scaling when the threshold is exceeded, and at the same time firing an Alarm trigger and sending an email notification

How to run

  1. Set env-vars In this file, you should write necessary information (like below) in order to build cloud environments by terraform.
  • User Credentials (user_ocid, fingerprint ..etc)
  • Region
  • ssh_key files
  • and so on...

env-vars-sample is a good exaple.

  1. Load env-vars
$ source env-vars
  1. Run Terraform
# Init
$ terrafrom init

# Plan
$ terraform plan

# Apply
$ terraform apply
  1. Run CPU Load test
$ terraform apply -var 'exec_cpu_load=true'
  1. Check Monitoring, Alarm Status and Auto Scaling history

  2. Clean environments

$ terraform destroy