Huge extension.log files from Microsoft.OSTCExtensions.LinuxDiagnostic | mdsd-lde
See original GitHub issueOn multiple Ubuntu xenial hosts in private-peered Azure, behind a proxy, we are seeing excessive logging to extension.log.
Besides the root cause(s) of that, there seems to be no way to turn off the verbose logging, and there seems to be no related logrotate script.
$ sudo find /var/log/ -size +102400k -exec ls -ltrh {} \;
# -rw-r--r-- 1 root root 1.5G Mar 5 03:13 /var/log/azure/Microsoft.OSTCExtensions.LinuxDiagnostic/2.3.9027/extension.log
# -rw-r--r-- 1 root root 16G Jun 26 23:01 /var/log/azure/Microsoft.OSTCExtensions.LinuxDiagnostic/2.3.9029/extension.log
# -rw-r--r-- 1 root root 166M Jun 26 23:00 /var/log/azure/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux/1.4.60.2/extension.log
This is despite:
$ grep -i "log" /etc/waagent.conf
# Enable verbose logging (y|n)
Logs.Verbose=n
There are a couple of errors in there (but that’s not my primary point here):
$ sudo tail -f /var/log/azure/Microsoft.OSTCExtensions.LinuxDiagnostic/2.3.9029/extension.log
2018/07/19 19:24:52 [Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029] RunCmd ps -ef | grep mysql | grep -v grep
2018/07/19 19:24:52 ERROR:CalledProcessError. Error Code is 1
2018/07/19 19:24:52 ERROR:CalledProcessError. Command string was ps -ef | grep mysql | grep -v grep
2018/07/19 19:24:52 ERROR:CalledProcessError. Command result was
2018/07/19 19:24:52 [Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029] Return 1:
2018/07/19 19:24:52 [Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029] RunCmd ps -ef | grep -E 'httpd|apache2' | grep -v grep
2018/07/19 19:24:52 ERROR:CalledProcessError. Error Code is 1
2018/07/19 19:24:52 ERROR:CalledProcessError. Command string was ps -ef | grep -E 'httpd|apache2' | grep -v grep
2018/07/19 19:24:52 ERROR:CalledProcessError. Command result was
2018/07/19 19:24:52 [Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029] Return 1:
2018/07/19 19:24:52 [Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029] RunCmd /opt/omi/bin/service_control is-running
2018/07/19 19:24:52 ERROR:CalledProcessError. Error Code is 1
2018/07/19 19:24:52 ERROR:CalledProcessError. Command string was /opt/omi/bin/service_control is-running
2018/07/19 19:24:52 ERROR:CalledProcessError. Command result was
2018/07/19 19:24:52 [Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029] Return 1:
2018/07/19 19:24:52 [Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029] RunCmd /var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/bin/mdsd -v -c /var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/./xmlCfg.xml
...
2018/07/19 19:27:52 [Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029] RunCmd /var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/bin/mdsd -v -c /var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/./xmlCfg.xml
...
2018/07/19 19:28:12 ERROR:CalledProcessError. Error Code is 1
2018/07/19 19:28:12 ERROR:CalledProcessError. Command string was /var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/bin/mdsd -v -c /var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/./xmlCfg.xml
2018/07/19 19:28:12 ERROR:CalledProcessError. Command result was 2018-07-19T19:27:52.4373460Z: Not all GCS env vars are defined. Missing 5: MONITORING_GCS_ENVIRONMENT MONITORING_GCS_ACCOUNT MONITORING_GCS_REGION MONITORING_GCS_CERT_CERTFILE MONITORING_GCS_CERT_KEYFILE. GCS won't be used.
2018/07/19 19:28:12 ERROR:Parse reported these messages:
2018/07/19 19:28:12 ERROR:/var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/./xmlCfg.xml(3) Error: Storage credential validation for table storage failed: Error resolving address
2018/07/19 19:28:12 ERROR:/var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/./xmlCfg.xml(32) Fatal: AddMonikerEventInfo() failed: No default credential is found.
2018/07/19 19:28:12 ERROR:/var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/./xmlCfg.xml(38) Error: No default credentials were defined
2018/07/19 19:28:12 ERROR:/var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.3.9029/./xmlCfg.xml(43) Error: No default credentials were defined
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:19
Top Results From Across the Web
LinuxDiagnostic extension log - MSDN - Microsoft
Good day all,. I have installed Microsoft.OSTCExtensions - LinuxDiagnostic - 2.3.9025 extension. and then have enabled Monitoring ...
Read more >Very large Microsoft.OSTCExtensions - LinuxDiagnostic ...
I just ran into the same problem. My extension.log file was at around 25GB, which filled up the storage on my VM and...
Read more >924463 - stretch-pu: package waagent/2.2.34-3~deb9u1
Debian Bug report logs - #924463 ... 2012R2 environment + +* VM Extension + * Inject component authored by Microsoft and Partners into...
Read more >Configure the Azure Diagnostic Extension for Storing Linux ...
To configure what log file to store in an Azure table, ... Use the following command to deploy the Linux diagnostic extension into...
Read more >Troubleshooting with Extension and Service Creation Logs
For information about the domain installation or database creation, you can review the extension logs. For Windows, you can view the extension script...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know Azure wants to sell us more storage space but this is a bit ridiculous:
I’m with OP that this package needs logrotate configs
Thanks for the reminder-- I found that one later but never updated this issue. Here’s the complete list of the others I’ve added to log rotation (in addition to my earlier comment):
I don’t think these files are from the agent corresponding to the GitHub repo hosting this issue, but as end users we don’t really care which agent all the things filling up /var come from. Microsoft has a ton of agents that need to have their logs managed.