Log Analytics

Overview

The Log Analytics builder is used to create Work space instances.

  • Log Analytics (Microsoft.OperationalInsights/workspaces)

Builder Keywords

KeywordPurpose
nameSets the name of the log analytics instance.
retention_periodSets the retention period for logs in days.
enable_ingestionEnables ingestion network traffic.
enable_queryEnables query network traffic.
daily_capSpecifies an upper limit on the amount of data to ingest daily.
add_tagsAdds a set of tags to the resource
add_tagAdds a tag to the resource

Configuration Members

MemberPurpose
CustomerIDGets the ARM expression path to the customer ID of this LogAnalytics instance.
CustomerIDGets the ARM expression path to the primary shared key of this LogAnalytics instance.

Example

open Farmer
open Farmer.Builders

let myAnalytics = logAnalytics {
    name "myloganalytics"
    retention_period 30<Days>
    enable_ingestion
    enable_query
    daily_cap 5<Gb>
    add_tag "tag1" "myTestResourceFarmer"
}

let deployment = arm {
    location Location.WestEurope
    add_resource myAnalytics
}