Sha256: b182edb88022ab9129def22b23c2458f8de9a123bf5518c7e3f8fd88ed068936

Contents?: true

Size: 779 Bytes

Versions: 14

Compression:

Stored size: 779 Bytes

Contents

#!/bin/bash -eux

# https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html

REGION=$(curl -s 169.254.169.254/latest/meta-data/placement/availability-zone | sed s'/.$//')

if ! type python ; then
  apt-get update
  apt-get install -y python-pip
fi

# Install awslogs and the jq JSON parser
curl -s https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O

# in order to install awslogs non-interactively we need a filler configfile
mkdir -p /etc/awslogs
cat > /etc/awslogs/awslogs.conf <<- EOL
[general]
state_file = /var/awslogs/state/agent-state
## filler config file, will get replaced by configure.sh script
EOL

python ./awslogs-agent-setup.py --region "$REGION" --non-interactive --configfile=/etc/awslogs/awslogs.conf

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
forger-2.0.2 lib/forger/scripts/cloudwatch/install/ubuntu.sh
forger-2.0.1 lib/forger/scripts/cloudwatch/install/ubuntu.sh
forger-2.0.0 lib/forger/scripts/cloudwatch/install/ubuntu.sh
forger-1.6.0 lib/forger/scripts/cloudwatch/install/ubuntu.sh
forger-1.5.4 lib/forger/scripts/cloudwatch/install/ubuntu.sh
forger-1.5.3 lib/forger/scripts/cloudwatch/install/ubuntu.sh
forger-1.5.2 lib/forger/scripts/cloudwatch/install/ubuntu.sh
forger-1.5.1 lib/forger/scripts/cloudwatch/install/ubuntu.sh
forger-1.5.0 lib/forger/scripts/cloudwatch/install/ubuntu.sh
aws-ec2-1.4.9 lib/aws_ec2/scripts/cloudwatch/install/ubuntu.sh
aws-ec2-1.4.8 lib/aws_ec2/scripts/cloudwatch/install/ubuntu.sh
aws-ec2-1.4.7 lib/aws_ec2/scripts/cloudwatch/install/ubuntu.sh
aws-ec2-1.4.6 lib/aws_ec2/scripts/cloudwatch/install/ubuntu.sh
aws-ec2-1.4.5 lib/aws_ec2/scripts/cloudwatch/install/ubuntu.sh