-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloudwatchAgent on executors #408
Comments
Seems to be a valid use case to me. @npeyrussie Any chance to implement it here? |
Hello, Using version 4.24.1 of npalm/gitlab-runner/aws, I succeeded in configuring cloudwatch agent using :
And a dirty post install script as is : userdata_post_install = <<EOT
cat <<EOF > /root/runner_init.sh
#!/bin/sh
wget https://s3.eu-west-3.amazonaws.com/amazoncloudwatch-agent-eu-west-3/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
dpkg -i -E ./amazon-cloudwatch-agent.deb
mkdir -p /usr/share/collectd
touch /usr/share/collectd/types.db
cat <<'EOS' > /opt/aws/amazon-cloudwatch-agent/bin/config.json
{
"agent": {
"metrics_collection_interval": 60,
"run_as_user": "root"
},
"metrics": {
"append_dimensions": {
"AutoScalingGroupName": "DOLLAR{aws:AutoScalingGroupName}",
"ImageId": "DOLLAR{aws:ImageId}",
"InstanceId": "DOLLAR{aws:InstanceId}",
"InstanceType": "DOLLAR{aws:InstanceType}"
},
"metrics_collected": {
"collectd": {
"metrics_aggregation_interval": 60
},
"disk": {
"measurement": [
"used_percent"
],
"metrics_collection_interval": 60,
"resources": [
"*"
]
},
"mem": {
"measurement": [
"mem_used_percent"
],
"metrics_collection_interval": 60
},
"statsd": {
"metrics_aggregation_interval": 60,
"metrics_collection_interval": 10,
"service_address": ":8125"
}
}
}
}
EOS
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a start -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json
EOF
sed -i 's/DOLLAR/\$/g' /root/runner_init.sh
EOT Regards. |
Can we close the question? |
Hello @npalm , I think you can close it. Regards. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #347
Originally posted by npeyrussie July 21, 2021
Hello,
I am looking for a way to install CloudwatchAgent on the executors.
I seems that
userdata_pre_install
anduserdata_post_install
only apply to the runner and not to the executors.What type of detailed monitoring metrics are added thanks to
runner_instance_enable_monitoring
option ?I need to retrieve memory metrics in cloudwatch and need to have cloudwatch agent installed on executors.
Is there a way to achieve this ?
The text was updated successfully, but these errors were encountered: