|
1 | 1 | { |
2 | 2 | "AWSTemplateFormatVersion": "2010-09-09", |
3 | | - "Description": "QS(0039) HashiCorp Consul License: Apache 2.0 (Please do not remove) Nov,14,2016", |
| 3 | + "Description": "QS(0039) HashiCorp Consul License: Apache 2.0 (Please do not remove) Nov,22,2016", |
4 | 4 | "Parameters": { |
5 | 5 | "KeyPair": { |
6 | 6 | "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances", |
|
255 | 255 | } |
256 | 256 | ], |
257 | 257 | "MetricName": "MemoryUtilization", |
258 | | - "Namespace": "AWS/EC2", |
| 258 | + "Namespace": "System/Linux", |
259 | 259 | "Statistic": "Average", |
260 | 260 | "Period": "60", |
261 | 261 | "EvaluationPeriods": "3", |
|
281 | 281 | } |
282 | 282 | ], |
283 | 283 | "MetricName": "MemoryUtilization", |
284 | | - "Namespace": "AWS/EC2", |
| 284 | + "Namespace": "System/Linux", |
285 | 285 | "Statistic": "Average", |
286 | 286 | "Period": "60", |
287 | 287 | "EvaluationPeriods": "3", |
|
347 | 347 | "logs:CreateLogStream", |
348 | 348 | "logs:PutLogEvents", |
349 | 349 | "logs:DescribeLogStreams" |
| 350 | + |
350 | 351 | ], |
351 | 352 | "Resource": [ |
352 | 353 | "arn:aws:logs:*:*:*" |
353 | 354 | ] |
| 355 | + }, |
| 356 | + { |
| 357 | + "Effect": "Allow", |
| 358 | + "Action": [ |
| 359 | + "cloudwatch:PutMetricData", |
| 360 | + "cloudwatch:GetMetricStatistics", |
| 361 | + "cloudwatch:ListMetrics" |
| 362 | + |
| 363 | + ], |
| 364 | + "Resource": [ |
| 365 | + "*" |
| 366 | + ] |
354 | 367 | } |
355 | 368 | ] |
356 | 369 | } |
|
392 | 405 | "/usr/local": "http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip" |
393 | 406 | }, |
394 | 407 | "files": { |
395 | | - "/etc/cron.hourly/cloudwatch-monitoring": { |
396 | | - "content": [ |
397 | | - "*/5 * * * * /usr/local/aws-scripts-mon/mon-put-instance-data.pl --mem-util --mem-used --from-cron" |
398 | | - ], |
| 408 | + "/etc/cron.hourly/cloudwatch-monitoring.sh": { |
| 409 | + "source": "https://s3.amazonaws.com/quickstart-reference/hashicorp/vault/latest/scripts/cloudwatch-monitoring.sh", |
399 | 410 | "mode": "000700", |
400 | 411 | "owner": "root", |
401 | 412 | "group": "root" |
|
422 | 433 | }, |
423 | 434 | "02_make_mon_put_instance_data_exececutable": { |
424 | 435 | "command": "chmod +x /usr/local/aws-scripts-mon/mon-put-instance-data.pl" |
| 436 | + }, |
| 437 | + "03_install_crontab": { |
| 438 | + "command": "crontab /etc/cron.hourly/cloudwatch-monitoring.sh" |
425 | 439 | } |
426 | 440 | } |
427 | 441 | }, |
|
626 | 640 | "/usr/local": "http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip" |
627 | 641 | }, |
628 | 642 | "files": { |
629 | | - "/etc/cron.hourly/cloudwatch-monitoring": { |
630 | | - "content": [ |
631 | | - "*/5 * * * * /usr/local/aws-scripts-mon/mon-put-instance-data.pl --mem-util --mem-used --from-cron" |
632 | | - ], |
| 643 | + "/etc/cron.hourly/cloudwatch-monitoring.sh": { |
| 644 | + "source": "https://s3.amazonaws.com/quickstart-reference/hashicorp/vault/latest/scripts/cloudwatch-monitoring.sh", |
633 | 645 | "mode": "000700", |
634 | 646 | "owner": "root", |
635 | 647 | "group": "root" |
|
656 | 668 | }, |
657 | 669 | "02_make_mon_put_instance_data_exececutable": { |
658 | 670 | "command": "chmod +x /usr/local/aws-scripts-mon/mon-put-instance-data.pl" |
| 671 | + }, |
| 672 | + "03_install_crontab": { |
| 673 | + "command": "crontab /etc/cron.hourly/cloudwatch-monitoring.sh" |
659 | 674 | } |
660 | 675 | } |
661 | 676 | }, |
|
674 | 689 | "source": "https://s3.amazonaws.com/quickstart-reference/hashicorp/vault/latest/scripts/vault-upstart.conf", |
675 | 690 | "mode": "000700", |
676 | 691 | "owner": "root", |
677 | | - "group": "root", |
678 | | - "command": "echo 'export VAULT_ADDR=http://127.0.0.1:8200' > /etc/profile.d/vault.sh" |
| 692 | + "group": "root" |
679 | 693 | } |
680 | 694 | }, |
681 | 695 | "commands": { |
|
0 commit comments