This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
Collect basic metrics when enabling vm diagnostics #2395
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this patch, enabling diagnostics with
azure vm enable-diag
without specifying awadcfg
file (with--config-file
) will use a default generatedwadcfg
config file that will collect basic metrics.You can have a preview in the attached zip file on what default wadcfg looks like on Windows and what it looks like on Linux; this is not something I invented: this is the default configuration that is set when you enable the diagnostics from the new portal. With this, you will be able to collect and see
basic metrics
and view charts from the new portal and you will be able to use Azure Insights.I have also updated the default Windows and Linux extension to the latest version available (Windows 1.5 and Linux 2.2).
Linux:
![linux_basic_metrics](https://cloud.githubusercontent.com/assets/2183293/11987009/c575bec0-a9d7-11e5-89e5-1d732ec14103.png)
Windows:
![windows_basic_metrics](https://cloud.githubusercontent.com/assets/2183293/11987012/d2a1a5aa-a9d7-11e5-96d8-5c3c5af377d7.png)
Default wadcfg files:
linux_windows_basic_metrics_wadcfg.zip
I did a quick test on latest images currently available (and supported by Azure) and it seems all ok (Ubuntu, Debian, CentOS, Oracle Linux, OpenSuse and Windows Server; I managed to make it work even on CoreOS but this OS is not currently supported by the diagnostics extension).
I noticed that there is some sort of confusion in the code about the
name
of the extension and the thetype
of the extension. Currently in the code there is no distinction between these. We are using theextensionType
as theextensionName
. This is something to be fixed up to me (I can work on it), problems can arise cause of this.As an example: when you enable the diagnostics extension from the new portal, the extension given name is
Microsoft.Insights.VMDiagnosticsSettings
both on Windows and Linux. If you first enable the diagnostics extension from the portal, you will be not able to update because of "Multiple VMExtensions per handler not supported"; you have to remove and then reinstall the extension to update. The same is happening if you first enable from the cli: updating from the portal won't work. See attached files. This is due to the fact that when we install or update the extension from the cli, the given name for the extension is the same name of the extension type (on Windows this isMicrosoft.Azure.Diagnostics.IaaSDiagnostics
and on LinuxMicrosoft.OSTCExtensions.LinuxDiagnostic
). We should let the user set extension name in bothazure vm enable-diag
andazure vm extension set
commands and set default diagnostics extension name as the portal set:Microsoft.Insights.VMDiagnosticsSettings
. In the code there is already some unused--reference-name
option and I can guess what it was meant to be - this seems to be used on asm mode only.When you enable from the portal, extension name is
![microsoft_insights_vmdiagnosticssettings](https://cloud.githubusercontent.com/assets/2183293/11987057/b4628e6e-a9d8-11e5-8f30-949b23c52d5f.png)
Microsoft.Insights.VMDiagnosticsSettings
:This happens when you try to update:
![diag_extension_name_portal](https://cloud.githubusercontent.com/assets/2183293/11987058/b9a26b1a-a9d8-11e5-93f2-c0ec2a820e6f.png)