BK cloud / systemen Notities
NL
English ENDeutsch DEEspañol ES中文 ZHFrançais FRPortuguês (Brasil) PT-BR日本語 JAहिन्दी HINederlands NL
Laten we kennismaken ↗
← Terug naar praktijknotities

AWS::EC2: eigen meetwaarden inschakelen

Archiefnotitie: dit artikel beschrijft de oudere CloudWatch-monitoringscripts die in 2019 werden gebruikt.

Door het model van gedeelde verantwoordelijkheid kan AWS het gastbesturingssysteem niet van buiten de hypervisor inspecteren. Meetwaarden zoals geheugen- en schijfgebruik vragen daarom om configuratie binnen het besturingssysteem.

De beste bron die ik destijds vond, staat hier: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html

Hier is de korte versie voor een Amazon Linux AMI:

sudo yum install -y perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https perl-Digest-SHA.x86_64

curl https://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.2.zip -O
unzip CloudWatchMonitoringScripts-1.2.2.zip 

crontab -e

Voeg de volgende regel toe aan de crontab:

*/5 * * * * /root/aws-scripts-mon/mon-put-instance-data.pl --mem-used-incl-cache-buff --mem-util --disk-space-util --disk-path=/ --from-cron