-
Notifications
You must be signed in to change notification settings - Fork 324
Expand file tree
/
Copy pathlocalstack-init.sh
More file actions
executable file
·42 lines (35 loc) · 1.07 KB
/
localstack-init.sh
File metadata and controls
executable file
·42 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
set -e
echo "Seeding CloudWatch test data..."
# Create test metrics in Test/Application namespace
awslocal cloudwatch put-metric-data \
--namespace "Test/Application" \
--metric-name "CPUUtilization" \
--dimensions "ServiceName=test-service" \
--value 45.5 \
--unit Percent
awslocal cloudwatch put-metric-data \
--namespace "Test/Application" \
--metric-name "MemoryUtilization" \
--dimensions "ServiceName=test-service" \
--value 1024 \
--unit Megabytes
awslocal cloudwatch put-metric-data \
--namespace "Test/Application" \
--metric-name "RequestCount" \
--dimensions "ServiceName=api-gateway" \
--value 100 \
--unit Count
# Create test metrics in AWS/EC2 namespace
awslocal cloudwatch put-metric-data \
--namespace "AWS/EC2" \
--metric-name "CPUUtilization" \
--dimensions "InstanceId=i-12345678" \
--value 25.0 \
--unit Percent
awslocal cloudwatch put-metric-data \
--namespace "AWS/EC2" \
--metric-name "NetworkIn" \
--dimensions "InstanceId=i-12345678" \
--value 1000000 \
--unit Bytes
echo "CloudWatch test data seeded successfully"