wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


awslightsailcloudwatch
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
awslightsailcloudwatch [2025/07/14 06:20] – [Configure Cloudwatch Agent] sjoerdawslightsailcloudwatch [2025/10/25 18:06] (current) – external edit 127.0.0.1
Line 428: Line 428:
 == Journalctl == == Journalctl ==
  
-Traditionally, log files on a linux system were stored in the `/var/log` directory, but nowadays on systemd-based systems, the logs are stored in the systemd journal. You could check {{{cat /var/log/README}}} for confirmation. To still be able to send the logs to cloudwatch, we'll configure [[[https://vector.dev/ |Vector.dev]]], which is a tool from datadog, to send the journalctl entries to cloudwatch.+Traditionally, log files on a linux system were stored in the `/var/log` directory, but nowadays on systemd-based systems, the logs are stored in the systemd journal. You could check {{{cat /var/log/README}}} for confirmation. To still be able to send the logs to cloudwatch, we'll configure [[https://vector.dev/ |Vector.dev]], which is a tool from datadog, to send the journalctl entries to cloudwatch.
  
 === Setup IAM User === === Setup IAM User ===
Line 566: Line 566:
 <code json> <code json>
 { {
-  "Version": "2012-10-17", +    "Version": "2012-10-17", 
-  "Statement":+    "Statement":
-    +        
-      "Effect": "Allow", +            "Effect": "Allow", 
-      "Action":+            "Action":
-        "ec2:DescribeTags", +                "ec2:DescribeTags", 
-        "cloudwatch:GetMetricData" +                "cloudwatch:GetMetricData" 
-      ], +            ], 
-      "Resource": "*" +            "Resource": "*" 
-    }, +        }, 
-    +        
-      "Effect": "Allow", +            "Effect": "Allow", 
-      "Action":+            "Action":
-        "cloudwatch:GetInsightRuleReport", +                "cloudwatch:GetInsightRuleReport", 
-        "cloudwatch:DescribeAlarms", +                "cloudwatch:DescribeAlarms", 
-        "cloudwatch:GetDashboard" +                "cloudwatch:GetDashboard" 
-      ], +            ], 
-      "Resource":+            "Resource":
-        "arn:aws:cloudwatch::410123456772:dashboard/GetShiftingDashboard" +                "arn:aws:cloudwatch:eu-west-1:412008408272:alarm:Wiki - Full Root Disk", 
-      +                "arn:aws:cloudwatch::412008408272:dashboard/GetShiftingDashboard" 
-    }, +            
-    +        }, 
-      "Effect": "Allow", +        
-      "Action":+            "Effect": "Allow", 
-          "logs:FilterLogEvents", +            "Action":
-          "logs:StartQuery", +                "logs:FilterLogEvents", 
-          "logs:StopQuery", +                "logs:StartQuery", 
-          "logs:GetLogRecord", +                "logs:StopQuery", 
-          "logs:DescribeLogGroups" +                "logs:GetLogRecord", 
-      ], +                "logs:DescribeLogGroups" 
-      "Resource":+            ], 
-          "arn:aws:logs:eu-west-1:410123456772:log-group:apache/access:*", +            "Resource":
-          "arn:aws:logs:eu-west-1:410123456772:log-group:apache/error:*", +                "arn:aws:logs:eu-west-1:412008408272:log-group:apache/access:*", 
-          "arn:aws:logs:eu-west-1:410123456772:log-group:dpkg-logs:*", +                "arn:aws:logs:eu-west-1:412008408272:log-group:apache/error:*", 
-          "arn:aws:logs:eu-west-1:410123456772:log-group:systemd-journal:*" +                "arn:aws:logs:eu-west-1:412008408272:log-group:dpkg-logs:*", 
-      +                "arn:aws:logs:eu-west-1:412008408272:log-group:systemd-journal:*" 
-    }, +            
-    +        
-      "Effect": "Allow", +    ]
-      "Action": "cloudwatch:DescribeAlarms", +
-      "Resource": "*" +
-    } +
-  ]+
 } }
 </code> </code>
Line 684: Line 680:
 * [[https://aws.amazon.com/blogs/mt/simplifying-apache-server-logs-with-amazon-cloudwatch-logs-insights/ |Simplifying Apache server logs with Amazon CloudWatch Logs Insights]] * [[https://aws.amazon.com/blogs/mt/simplifying-apache-server-logs-with-amazon-cloudwatch-logs-insights/ |Simplifying Apache server logs with Amazon CloudWatch Logs Insights]]
 * [[https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-dashboard-sharing.html |Share CloudWatch dashboards with other AWS accounts]] * [[https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-dashboard-sharing.html |Share CloudWatch dashboards with other AWS accounts]]
 +
 +//This wiki has been made possible by://
 +
 +<HTML>
 +<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8613096447910897"
 +     crossorigin="anonymous"></script>
 +<!-- Wiki End of Page -->
 +<ins class="adsbygoogle"
 +     style="display:block"
 +     data-ad-client="ca-pub-8613096447910897"
 +     data-ad-slot="6221699236"
 +     data-ad-format="auto"
 +     data-full-width-responsive="true"></ins>
 +<script>
 +     (adsbygoogle = window.adsbygoogle || []).push({});
 +</script>
 +</HTML>
 +
 +
  
awslightsailcloudwatch.1752474047.txt.gz · Last modified: by sjoerd