Integrating Grafana with Amazon CloudWatch enables you to effortlessly monitor your AWS resources and metrics in real time.
Install Grafana
Install Grafana on your server.You could follow our documentation here.
Then,access the Grafana web interface after installation. Grafana comes with builtin support for CloudWatch.
Configure the data source
1. Select Connections from the left-side menu.
2. Navigate to Your connections and select Data sources.
3. Type CloudWatch into the search bar.
4. Click Cloud Watch.
Configure AWS authentication
Grafana plugin initiates requests to AWS on behalf of an AWS Identity and Access Management (IAM) role or IAM user. To conduct particular API actions, the IAM user or role must have the associated policies.
To read Cloud Watch metrics and EC2 tags, instances, regions, and alerts, you must provide Grafana IAM access. You can assign these permissions to the IAM role/ IAM user that you defined in AWS authentication.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowReadingMetricsFromCloudWatch",
"Effect": "Allow",
"Action": [
"cloudwatch:DescribeAlarmsForMetric",
"cloudwatch:DescribeAlarmHistory",
"cloudwatch:DescribeAlarms",
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricData",
"cloudwatch:GetInsightRuleReport"
],
"Resource": "*"
},
{
"Sid": "AllowReadingLogsFromCloudWatch",
"Effect": "Allow",
"Action": [
"logs:DescribeLogGroups",
"logs:GetLogGroupFields",
"logs:StartQuery",
"logs:StopQuery",
"logs:GetQueryResults",
"logs:GetLogEvents"
],
"Resource": "*"
},
{
"Sid": "AllowReadingTagsInstancesRegionsFromEC2",
"Effect": "Allow",
"Action": ["ec2:DescribeTags", "ec2:DescribeInstances", "ec2:DescribeRegions"],
"Resource": "*"
},
{
"Sid": "AllowReadingResourcesForTags",
"Effect": "Allow",
"Action": "tag:GetResources",
"Resource": "*"
}
]
}
Set up matrics
After setting the data source, you can begin querying metrics from Cloud Watch. You can use the built-in query editor or construct your own queries using Cloud Watch syntax.
Create dashboard
Afterward configuring the data source and querying metrics, you can use Grafana to construct dashboards that visualize your Cloud Watch metrics.You may monitor your AWS resources by adding graphs, charts, and other visualization components.
Monitor and analyze
Grafana integrated with Cloud Watch allows you to monitor your AWS resources, analyse performance trends, and take proactive actions to improve your infrastructure.
Our Technical Team will be available to assist you with Grafana integration with Cloud Watch that can make your job a lot easier. Get in Touch with Skynats if you have any queries.