Sha256: d5436ef79934f00c473fbf5d446677d2b99d46c96e5720ffdd60e937c116f347
Contents?: true
Size: 774 Bytes
Versions: 6
Compression:
Stored size: 774 Bytes
Contents
#!/bin/bash # 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
6 entries across 6 versions & 1 rubygems