Created
November 11, 2015 09:31
-
-
Save larowlan/6b4b784a6f28de24921e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Focused dashboard,!Fine-grained permissions..?Repositoryne..!