Skip to content

Instantly share code, notes, and snippets.

@larowlan
Created November 11, 2015 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larowlan/6b4b784a6f28de24921e to your computer and use it in GitHub Desktop.
Save larowlan/6b4b784a6f28de24921e to your computer and use it in GitHub Desktop.
--- mon-put-instance-data.pl.orig 2015-11-11 04:24:50.668994999 -0500
+++ mon-put-instance-data.pl 2015-11-11 04:27:18.760994999 -0500
@@ -115,6 +115,7 @@
my $report_disk_util;
my $report_disk_used;
my $report_disk_avail;
+my $instance_id;
my $mem_used_incl_cache_buff;
my @mount_path;
my $mem_units;
@@ -161,6 +162,7 @@
'verify' => \$verify,
'from-cron' => \$from_cron,
'verbose' => \$verbose,
+ 'instance_id:s' => \$instance_id,
'aws-credential-file:s' => \$aws_credential_file,
'aws-access-key-id:s' => \$aws_access_key_id,
'aws-secret-key:s' => \$aws_secret_key,
@@ -335,7 +337,9 @@
}
my $timestamp = CloudWatchClient::get_offset_time(NOW);
-my $instance_id = CloudWatchClient::get_instance_id();
+if (!$instance_id) {
+ $instance_id = CloudWatchClient::get_instance_id();
+}
if (!defined($instance_id) || length($instance_id) == 0) {
exit_with_error("Cannot obtain instance id from EC2 meta-data.");
Copy link

ghost commented Nov 11, 2015

Focused dashboard,!Fine-grained permissions..?Repositoryne..!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment