forked from CompositionalIT/farmer
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from CompositionalIT/pr/TheRSP/466-merge-from-m…
…aster Pr/the rsp/466 merge from master
- Loading branch information
Showing
157 changed files
with
3,430 additions
and
493 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
title: " Diagnostic Settings " | ||
date: 2020-12-02T12:10:03 +00:00 | ||
chapter: false | ||
weight: 4 | ||
--- | ||
|
||
#### Overview | ||
|
||
The Diagnostic Settings builder is used to create diagnostic settings instances to send platform logs and metrics to different destinations (storage, event hub and log analytics). Support for Farmer builders and external resources is supported. | ||
|
||
- Diagnostic Settings (`providers/diagnosticSettings`) | ||
|
||
#### Builder Keywords | ||
|
||
| Keyword | Purpose| | ||
|-|-| | ||
| name | Sets the name of the Diagnostic Settings resource. | | ||
| metrics_source | The resource that will be used for the source of logging and metrics information. Can be any Builder, or you can supply a ResourceId for an external resource. | | ||
| capture_metrics | Specifies the list of Metrics to capture from the source resource. | | ||
| capture_logs | Specifies the list of Log Categories to capture from the source resource. | | ||
| add_destination | Adds a destination for all logs and metrics, either a storage account, log analytics workspacce, event hub or a Resource ID pointing to any valid Resource for those three resource types. | | ||
| event_hub_destination_name | Allows you to override the event hub name to use. | | ||
| loganalytics_output_type | If a Log Analytics Workspace is specified as output, specifies whether to use the default Azure Diagnostics grouping or a dedicated grouping for logging and metrics. | | ||
|
||
#### Example | ||
The example below illustrates how to create a web application and set up a diagnostics setting against it, | ||
whilst setting up three destinations for the diagnostics (storage, event hub and log analytics). Also notice | ||
the using of the `Logging.` namespace, which contains all documented Logging categories. | ||
|
||
```fsharp | ||
open Farmer | ||
open Farmer.Builders | ||
open Farmer.DiagnosticSettings | ||
let data = storageAccount { name "isaacsuperdata" } | ||
let hub = eventHub { name "isaacsuperhub" } | ||
let logs = logAnalytics { name "isaacsuperlogs" } | ||
let web = webApp { name "isaacdiagsuperweb"; app_insights_off } | ||
let mydiagnosticSetting = diagnosticSettings { | ||
name "myDiagnosticSetting" | ||
metrics_source web | ||
add_destination data | ||
add_destination logs | ||
add_destination hub | ||
loganalytics_output_type Dedicated | ||
capture_metrics [ "AllMetrics" ] | ||
capture_logs [ | ||
Logging.Web.Sites.AppServicePlatformLogs | ||
Logging.Web.Sites.AppServiceAntivirusScanAuditLogs | ||
] | ||
} | ||
let deployment = arm { | ||
add_resources [ data; web; hub; logs; mydiagnosticSetting ] | ||
} | ||
``` |
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
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
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
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
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
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
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
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
Oops, something went wrong.