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