Best practices for creating management solutions in Azure (Preview)
This is preliminary documentation for creating management solutions in Azure which are currently in preview. Any schema described below is subject to change.
This article provides best practices for creating a management solution file in Azure. This information will be updated as additional best practices are identified.
Data sources can be configured with a Resource Manager template, but they should not be included in a solution file. The reason is that configuring data sources is not currently idempotent meaning that your solution could overwrite existing configuration in the user's workspace.
For example, your solution may require Warning and Error events from the Application event log. If you specify this as a data source in your solution, you risk removing Information events if the user had this configured in their workspace. If you included all events, then you may be collecting excessive Information events in the user's workspace.
If your solution requires data from one of the standard data sources, then you should define this as a prerequisite. State in documentation that the customer must configure the data source on their own.
- Add a Data Flow Verification message to any views in your solution to instruct the user on data sources that need to be configured for required data to be collected. This message is displayed on the tile of the view when required data is not found.
- Add an Automation schedule for each runbook in your solution that needs to run on a schedule.
- Include the IngestionAPI module in your solution to be used by runbooks writing data to the Log Analytics repository. Configure the solution to reference this resource so that it remains if the solution is removed. This allows multiple solutions to share the module.
- Use Automation variables to provide values to the solution that users may want to change later. Even if the solution is configured to contain the variable, it's value can still be changed.
- All solutions should include a single view that is displayed in the user's portal. The view can contain multiple visualization parts to illustrate different sets of data.
- Add a Data Flow Verification message to any views in your solution to instruct the user on data sources that need to be configured for required data to be collected.
- Configure the solution to contain the view so that it's removed if the solution is removed.
- Define the recipients list as a parameter in the solution file so the user can define them when they install the solution.
- Configure the solution to reference alert rules so that user's can change their configuration. They may want to make changes such as modifying the recipient list, changing the threshold of the alert, or disabling the alert rule.