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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5560582b50baf27e28aac6b3b9d3ae01b34a57b6860a1a4f4dea8c8174d63964
4
- data.tar.gz: f0e2be852cfc48ec8c1d49ad34d299695c6f959fc7decd43e4babda4691df897
3
+ metadata.gz: d442b6604282a2348109a44d78ff9f1e9ecc2bcf73761575f9bb5da1d522eefe
4
+ data.tar.gz: 64028e1f0a9689427ca076707e9dd9cd601be9f31df695ac22e846a7d1447187
5
5
  SHA512:
6
- metadata.gz: 675fe8d9e1e71a472132d21ca58a0272c7629852b8b0ef90b591e1c01cb4abb6752c462026620ab5441f41ed9f8d9e9ef70d0b90b473022608afb678317f4568
7
- data.tar.gz: e7d16c84a8cdf3ee21664655d7e194e83c65b88734c09989c2cb80389bee0f14e736fa94dc9a32c339972d0ddc020370f7d4f653053dbf97a002732f8be6a0f1
6
+ metadata.gz: bbffaf1544f51801165d44adcb40b0c5bfb95db733cdadb062d9dc947861be2fdaa373d1440c29ea675e4020c8449d1ab2f9ff3b04761d0f95df9f198f1e5aa9
7
+ data.tar.gz: c7f919272fd4c804d7659499c8480914068dc005975ec469bc7412a170e9d90b8f60c6aa331490c7b3653d52c4864bc24f1af3ed1d45c050711de4abd04270d7
@@ -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 > /etc/awslogs/awslogs.conf <<- EOF
22
+ cat > $CONFIG_FILE <<- EOF
15
23
  [general]
16
- state_file = /var/lib/awslogs/agent-state
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
- region=$(curl 169.254.169.254/latest/meta-data/placement/availability-zone | sed s'/.$//')
74
- sed -i -e "s/region = us-east-1/region = $region/g" /etc/awslogs/awscli.conf
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
@@ -1,3 +1,3 @@
1
1
  module AwsEc2
2
- VERSION = "1.4.1"
2
+ VERSION = "1.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen