The aim of this document is to showcase some interesting capabilities of the declarative infrastructure monitoring powers of IOX.
ap-south-1
with the following components:
Create a file iox/aws_components_ap-south-1.hcl
extends aws_rds_logical_cloudwatch "app1_rds_logical" {
source_uri = "<https://github.com/last9/iox-registry/releases/download/v0.0.27/aws_rds_cloudwatch.hcl>"
vars = {
using = "ap-south-1"
inputs = <<-EOF
[
{
"DBInstanceIdentifier": "main-instance-1",
"namespace": "example.io",
"service": "service1"
},
{
"DBInstanceIdentifier": "reader-instance-1",
"namespace": "example.io",
"service": "service-1"
}
]
EOF
}
}
extends aws_rds_physical_cloudwatch "app1_rds_physical" {
source_uri = "<https://github.com/last9/iox-registry/releases/download/v0.0.27/aws_rds_cloudwatch.hcl>"
vars = {
using = "ap-south-1"
inputs = <<-EOF
[
{
"DBInstanceIdentifier": "main-instance-1",
"namespace": "example.io",
"service": "service1"
},
{
"DBInstanceIdentifier": "reader-instance-1",
"namespace": "example.io",
"service": "service-1"
}
]
EOF
}
}
Create a credential file config.hcl
Check-in this file to master.
This will trigger a CI/CD automation, which will (seamlessly) lead to observing the following infra on your Last9 dashboard. We have blurred out the service name prefix
service-1
and namespace example.io
. If you want to change the way you want to view them or move reader-instance-1
- the change is just a json edit away.Replace the contents of iox/aws_components_ap-south-1.hcl
extends aws_rds_logical_cloudwatch "app1_rds_logical" {
source_uri = "<https://github.com/last9/iox-registry/releases/download/v0.0.27/aws_rds_cloudwatch.hcl>"
vars = {
using = "cloudwatch_ap-south-1"
tag_filter = "Team='db'"
namespace = "example.io"
service = "service1"
}
}
Check-in, commit to master and Last9 CI/CD will update the dashboard.
The above snippet assumes that your RDS clusters are tagged with Team=db
. This can be any tag. IOX will auto-discover the corresponding tagged infra and keep on updating the infrastructure views as and when new components are added.
What happens to deleted components? We keep their data for 7 days and if no metrics are received beyond that period, they will disappear from the dashboard.