Skip to content

Terraform configuration that installs dummy app in docker containers with prometheus/kibana monitoring

Notifications You must be signed in to change notification settings

hilafish/terraform-dummy-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-dummy-monitoring

Terraform configuration that installs dummy app in docker containers with prometheus/kibana monitoring

How to use this repository and install a fully working environment with dummy exporter, grafana, kibana, etc?

  1. git clone https://github.com/hilafish/terraform-dummy-monitoring.git

  2. cd terraform-dummy-monitoring

  3. terraform init (make sure you have terraform installed)

  4. terraform plan -var 'aws_access_key=access_key_here' -var 'aws_secret_key=secret_key_here' -var 'aws_private_key_path=path_to_private_key_here' -var 'aws_key_name=key_pair_name_here'

(if you want to know what's going to be installed.. it's a good practice to run plan first)

*** region = "us-east-2". If you would like to use other region, change it in the ec2.tf file.

  1. terraform apply -var 'aws_access_key=access_key_here' -var 'aws_secret_key=secret_key_here' -var 'aws_private_key_path=path_to_private_key_here' -var 'aws_key_name=key_pair_name_here' --auto-approve

*** Reminder: region = "us-east-2". If you would like to use other region, change it in the ec2.tf file.

  1. Wait and watch the magic happen or go do some other stuff :)

  2. Upon decision to remove the terraform managed resources created just now, run:

terraform destroy -var 'aws_access_key=access_key_here' -var 'aws_secret_key=secret_key_here' -var 'aws_private_key_path=path_to_private_key_here' -var 'aws_key_name=key_pair_name_here' --auto-approve

Once Terraform finished running, you should expect this output:

Apply complete! Resources: 25 added, 0 changed, 0 destroyed.

Outputs: kibana_grafana_public_dns = ec2-3-84-131-190.compute-1.amazonaws.com (for example)

Copy the URL you got.

Grafana:

  1. browse to http://the_copied_url:3000
  2. login with user admin, password admin
  3. you'll be prompt to change the password, please do so.
  4. If you'll get "unauthorized!" message after login, just refresh the page and it'll get sorted out.
  5. click on "Home" and then choose the "dummy_exporter_dashboard"
  6. enjoy viewing the data :)

Kibana:

  1. browse to http://the_copied_url:5601
  2. wait a minute or so to allow data to be gathered.
  3. go to "dashboard"
  4. click on "Dummy_exporter_dashboard"
  5. enjoy viewing the data :)

About

Terraform configuration that installs dummy app in docker containers with prometheus/kibana monitoring

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published