aws-ec2 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/aws_ec2/scripts/cloudwatch/configure.sh +14 -4
- data/lib/aws_ec2/scripts/cloudwatch/install/ubuntu.sh +0 -9
- data/lib/aws_ec2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d442b6604282a2348109a44d78ff9f1e9ecc2bcf73761575f9bb5da1d522eefe
|
4
|
+
data.tar.gz: 64028e1f0a9689427ca076707e9dd9cd601be9f31df695ac22e846a7d1447187
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbffaf1544f51801165d44adcb40b0c5bfb95db733cdadb062d9dc947861be2fdaa373d1440c29ea675e4020c8449d1ab2f9ff3b04761d0f95df9f198f1e5aa9
|
7
|
+
data.tar.gz: c7f919272fd4c804d7659499c8480914068dc005975ec469bc7412a170e9d90b8f60c6aa331490c7b3653d52c4864bc24f1af3ed1d45c050711de4abd04270d7
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [1.4.2]
|
7
|
+
- fix cloudwatch for ubuntu
|
8
|
+
|
6
9
|
## [1.4.1]
|
7
10
|
- fix cloudwatch support check and add add_to_clipboard url
|
8
11
|
- fix copy_to_clipboard
|
@@ -10,10 +10,18 @@ if [ $# -eq 0 ]; then
|
|
10
10
|
fi
|
11
11
|
LOG_GROUP_NAME=$1
|
12
12
|
|
13
|
+
if [ "$OS" == "ubuntu" ]; then
|
14
|
+
CONFIG_FILE=/var/awslogs/etc/awslogs.conf
|
15
|
+
STATE_FILE=/var/awslogs/state/agent-state
|
16
|
+
else # amazonlinux2
|
17
|
+
CONFIG_FILE=/etc/awslogs/awslogs.conf
|
18
|
+
STATE_FILE=/var/lib/awslogs/agent-state
|
19
|
+
fi
|
20
|
+
|
13
21
|
# Inject the CloudWatch Logs configuration file contents
|
14
|
-
cat >
|
22
|
+
cat > $CONFIG_FILE <<- EOF
|
15
23
|
[general]
|
16
|
-
state_file =
|
24
|
+
state_file = $STATE_FILE
|
17
25
|
|
18
26
|
[/var/log/dmesg]
|
19
27
|
file = /var/log/dmesg
|
@@ -70,5 +78,7 @@ datetime_format =
|
|
70
78
|
|
71
79
|
EOF
|
72
80
|
|
73
|
-
|
74
|
-
|
81
|
+
if [ -f /etc/awslogs/awscli.conf ]; then
|
82
|
+
region=$(curl 169.254.169.254/latest/meta-data/placement/availability-zone | sed s'/.$//')
|
83
|
+
sed -i -e "s/region = us-east-1/region = $region/g" /etc/awslogs/awscli.conf
|
84
|
+
fi
|
@@ -17,13 +17,4 @@ state_file = /var/awslogs/state/agent-state
|
|
17
17
|
## filler config file, will get replaced by configure.sh script
|
18
18
|
EOL
|
19
19
|
|
20
|
-
# yum install -y awslogs jq also creates this file. We're creating it so that
|
21
|
-
# configure.sh is consistent.
|
22
|
-
cat > /etc/awslogs/awscli.conf <<- EOL
|
23
|
-
[plugins]
|
24
|
-
cwlogs = cwlogs
|
25
|
-
[default]
|
26
|
-
region = us-west-2
|
27
|
-
EOL
|
28
|
-
|
29
20
|
python ./awslogs-agent-setup.py --region "$REGION" --non-interactive --configfile=/etc/awslogs/awslogs.conf
|
data/lib/aws_ec2/version.rb
CHANGED