diff options
-rw-r--r-- | sos/plugins/azure.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sos/plugins/azure.py b/sos/plugins/azure.py index 5198d1cf..e134457e 100644 --- a/sos/plugins/azure.py +++ b/sos/plugins/azure.py @@ -8,8 +8,8 @@ # # See the LICENSE file in the source distribution for further information. -from sos.plugins import Plugin, UbuntuPlugin, RedHatPlugin import os +from sos.plugins import Plugin, UbuntuPlugin, RedHatPlugin class Azure(Plugin, UbuntuPlugin): @@ -30,6 +30,15 @@ class Azure(Plugin, UbuntuPlugin): "/sys/module/hv_storvsc/parameters/storvsc_ringbuffer_size" ]) + # Adds all files under /var/log/azure to the sosreport + # os.walk is used because /var/log/azure is used by multiple Azure + # extensions and there is no standard log filename format + limit = self.get_option("log_size") + + for path, subdirs, files in os.walk("/var/log/azure"): + for name in files: + self.add_copy_spec(os.path.join(path, name), sizelimit=limit) + self.add_cmd_output(( 'curl -s -H Metadata:true ' '"http://169.254.169.254/metadata/instance?' |