Skip to content

Latest commit

 

History

History

case02

Oracle Cloud Infrastructure Monitoring Examples

Case02: Streaming + Grafana

Example of detecting logs when Web server outputs Server Error, pushing to OCI streaming, and monitoring with monitoring visualization tool (Grafana)

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. Provision Environments
$ terraform apply -var 'provision=true'
  1. Run auto web requests (return 502 Error)
$ terraform apply -var 'exec_web_request=true'
  1. Check Monitoring, Alarm Status and Grafana Dashboard

  2. Clean environments

$ terraform destroy