bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/docs/system_configuration.md (about)

     1  ---
     2  layout: default
     3  title: Configuration
     4  order: 3
     5  ---
     6  
     7  <div class="row">
     8  <div class="col-sm-3" >
     9    <div class="sidebar" data-spy="affix" data-offset-top="0" data-offset-bottom="0" markdown="1">
    10  
    11   * Some TOC
    12   {:toc}
    13  
    14    </div>
    15  </div>
    16  
    17  <div class="doc-body col-sm-9" markdown="1">
    18  
    19  <p class="title h1">{{page.title}}</p>
    20  
    21  ## Changes Since 0.5.0
    22  Since 0.5.0, the config has been split into two different files.
    23  
    24  ### System
    25  System config is documented on the rest of this page, and has been moved
    26  into `bosun.toml` unless overriden on the command line. Changes to these
    27  settings require a Bosun restart in order to take effect. The TOML
    28  format is documented [here](https://github.com/toml-lang/toml).
    29  
    30  The [example config
    31  file](https://github.com/bosun-monitor/bosun/blob/master/cmd/bosun/bosun.example.toml)
    32  is a good place to start when writing a configuration.
    33  
    34  <div class="admonition">
    35  <p class="admonition-title">Warning</p>
    36  <p>The file does <em>not</em> follow the tradition of commenting out defaults,
    37  which are instead mostly documented below.</p>
    38  </div>
    39  
    40  ### Definitions
    41  This file is documented [here](/definitions). It includes settings that
    42  do not require a Bosun restart to take effect e.g. alerts, templates,
    43  notifications.
    44  
    45  ## Keys
    46  
    47  ### Hostname
    48  Bosun records state in a Redis store and much of this state is associated with particular host names.  This works 
    49  well when Bosun is run on a dedicated machine however if it's run within a container orchestration platform, 
    50  where instance names can change very frequently then it can lead to a low quality recording of state and 
    51  excessive disk and memory use (as a new copy of this state is created every time the hostname changes).  To overcome 
    52  this issue you can define a custom hostname and this will mean that even when a container instance is recreated Bosun 
    53  will continue to use the previously known state.
    54  
    55  This setting will also be used during the construction of links in any 
    56  [template functions](/definitions#template-functions) that need them.
    57  
    58  Example:
    59  `Hostname = "bosun.example.com"`
    60  
    61  ### Scheme
    62  The URL that Bosun uses to construct its links. The common use case
    63  is in any [template functions](/definitions#template-functions) that
    64  construct links. the default is "http"
    65  
    66  Example:
    67  `Scheme = "https"`
    68  
    69  ### HTTPListen
    70  HTTP IP and Port to listen on. The default if not specified is to
    71  listen on `:8070`. However, if `HTTPSListen` is defined and `HTTPListen`
    72  is not defined there will be no default, and Bosun will only listen on
    73  HTTPS.
    74  
    75  Example:
    76  `HTTPListen = ":8080"`
    77  
    78  ### HTTPSListen
    79  HTTPS (SSL) IP and Port to listen on. This requires that `TLSCertFile` and `TLSKeyFile` are defined.
    80  
    81  ### TLSCertFile
    82  Path to the PEM encoded certificate Bosun should use for
    83  `HTTPSListen`. May contain intermediate certificates followed by the
    84  leaf certificate to form a chain.
    85  
    86  Example:
    87  `TLSCertFile = "/etc/ssl/certs/bosun.example.com.crt"`
    88  
    89  ### TLSKeyFile
    90  Path to the PEM encoded private key that corresponds to the `TLSCertFile`.
    91  
    92  Example:
    93  `TLSKeyFile = "/etc/ssl/certs/bosun.example.com.key"`
    94  
    95  ### CheckFrequency
    96  Minimum interval that alert checks will run at on a schedule. The format
    97  of the value is the same as [Go's duration
    98  format](https://golang.org/pkg/time/#Duration.String). By default, alert
    99  checks are run at every `CheckFrequency` multiplied by the
   100  `DefaultRunEvery` value. This defaults to "5m".
   101  
   102  Example:
   103  `CheckFrequency = "1m"`
   104  
   105  ### DefaultRunEvery
   106  By default, alert checks are run at every
   107  [`CheckFrequency`](/system_configuration#checkevery) multiplied by the
   108  `DefaultRunEvery` value. This can be overridden in an alert definition
   109  with the [`runEvery` keyword](/definitions#runevery). This defaults to
   110  1.
   111  
   112  e.g. If `CheckFrequency = 1m` and a `DefaultRunEvery = 5`, alerts by
   113  default will run every 5 minutes. But you could have some run as
   114  frequent as every "1m", and others that run less often (any multiple of
   115  "1m").
   116  
   117  Example:
   118  `DefaultRunEvery = 5`
   119  
   120  ### AlertCheckDistribution
   121  Selects algorithm to distribute alert checks to decrease system load spikes.  There is no distribution by default. This means, if there are several checks with same period, they all will happen at the same points in time. This method is used if the option is not specified or equals to empty string.
   122  
   123  The single alternative option is `simple`. If specified, the alert checks with the same period will be uniformly distributed on second marks.
   124  
   125  Example: `AlertCheckDistribution = "simple"`
   126  
   127  ### RuleFilePath
   128  Path to the file containing definitions of alerts, macros, lookups,
   129  templates, notifications, and global variables which are [documented
   130  here](/definitions). If saving is enabled, this file can be written to
   131  by Bosun via the API or [Save UI](/usage#definition-rule-saving).
   132  Mandatory.
   133  
   134  Example: `RuleFilePath = "dev.sample.conf"`
   135  
   136  ### MaxRenderedTemplateAge
   137  If set, this will allow bosun to delete rendered templates from its' data store.
   138  It will remove all rendered templates for alerts that have been closed for longer than this time (in days).
   139  
   140  Example: `MaxRenderedTemplateAge = 30 # retain old templates for only 30 days`
   141  
   142  ### TimeAndDate
   143  Used to configure time zones that will be linked to in Bosun's
   144  dashboard. It is an array of timeanddate.com zones (the page that gets
   145  linked to from Bosun's UI.) It has no impact on what time zone Bosun
   146  operates in. Bosun is expected to use UTC and does support other
   147  timezones.
   148  
   149  Example:
   150  `TimeAndDate = [ 202, 75, 179, 136 ]`
   151  
   152  ### ShortURLKey
   153  Bosun's UI can generate short links using Google's goo.gl URL Shortener service. If you are hitting their API limits, you can get an API key and specify here, and that key will get used.
   154  
   155  Example:
   156  `ShortURLKey = "aKey"`
   157  
   158  ### MinGroupSize
   159  Bosun's dashboard will use grouping logic on the dashboard if there are many similar alerts (in name, or tag/key pairs). `MinGroupSize` sets the minimum number of alerts needed to create a group in the UI and defaults to `5`.
   160  
   161  If you have a lot of grouping, it often means you should refactor the alert to have a less granular scope. Therefore, it is recommended that this is used as a "protection mechanism" from flooding the dashboard with too many alerts.
   162  
   163  Example: `MinGroupSize = 5`
   164  
   165  ### Unknown Threshold
   166  Bosun will group all unknowns in a single check cycle (alerts on the same [`CheckFrequency`](/system_configuration#checkfrequency) and [`RunEvery`](/system_configuration#defaultrunevery)) into a single email. This sets how many unknowns would be sent in a single check cycle before a group is created. The default value is 5.
   167  
   168  This is done because unknowns are generally caused by the data "disappearing". So if your TSDB Provider is broken or behind, it can generate a lot of unknowns. This alleviates flooding in the specific case of unknowns.
   169  
   170  Example: `UnknownThreshold = 5`
   171  
   172  ### Ping
   173  If set to `true`, Bosun will ping every value of the host tag that it has indexed and record that value to your TSDB. It currently only support OpenTSDB style data input, which is means you must use either OpenTSDB or Influx with the OpenTSDB endpoint on Influx configured.
   174  
   175  Example:
   176  `Ping = true`
   177  
   178  ### PingDuration
   179  How long Bosun should wait before stopping to ping host tags it has
   180  seen. e.g. If the value is the default of `"24h"`, if Bosun has
   181  not indexed any data points for that `host` value, then it will stop
   182  attempting to ping that host until it again sees data points that have that
   183  tag.
   184  
   185  Example:
   186  `PingDuration = "24h"`
   187  
   188  ### SearchSince
   189  Controls how long autocomplete and items in UI will show up since being indexed by Bosun. The format of the value is the same as [Go's duration format](https://golang.org/pkg/time/#Duration.String) and the default is 3 days. The goal is to make it so you don't have old items showing up in the UI. However, if you are using OpenTSDB and graphing page, you can still query metrics that don't autocomplete if you remember what they were (or look them up using OpenTSDB's native UI autocomplete).
   190  
   191  Example: `SearchSince = "72h"`
   192  
   193  ### EnableSave
   194  Enables saving via the web UI. It is disabled by default. When enabled,
   195  users will be able to save the rule configuration file via the UI and
   196  Bosun will then write to that file on the user's behalf.
   197  
   198  Example: `EnableSave = true`
   199  
   200  ### ReloadEnabled
   201  Sets if reloading of the rule configuration should be enabled. If
   202  `EnableSave` is `true`, then reloading gets enabled regardless of this
   203  setting. Reloads can be triggered via [`/api/reload` in the REST
   204  API](/api#apireload) as well.
   205  
   206  Example:
   207  `EnableSave = true`
   208  
   209  ### CommandHookPath
   210  When enabling saving, and a user issues a save, you have the option to run a executable or script by specifying this parameter. This allows you to do things like backup the file on writes or commit the file to a git repo.
   211  
   212  This command is passed a filename, username, message, and vargs (vargs is currently not used). If the command exits a non-zero exit code, then the changes will be reverted (the file before the changes is copied back and Bosun doesn't restart). When the configuration is saved via the user interface, any messages to standard error will be shown to the user when there is a non-zero exit code.
   213  
   214  Example:
   215  `CommandHookPath = "/Users/kbrandt/src/hook/hook"`
   216  
   217  ### GetInternetProxy
   218  Current code documentation says:
   219  ```
   220  // GetInternetProxy sets a proxy for outgoing network requests from Bosun. Currently it
   221  // only impacts requests made for shortlinks to https://goo.gl/
   222  ```
   223  But not sure I trust that.
   224  
   225  ## Configuration Sections
   226  All your key value pairs must be defined before any sections are defined. Sections are used for things that have multiple values to configure them. In particular the various time series database providers.
   227  
   228  ### RuleVars
   229  Allows definition of variables that will be turned into [global
   230  variables](/definitions#global-variables) available to definitions under
   231  `$sys.`. This is designed for when you have some secrets you don't want
   232  exposed in the definitions file. The values of these variables *can*
   233  still be accessed from Bosun's rule editor and expression UI. This
   234  merely hides them so you don't accidentally include them in
   235  screenshots or when copying and pasting your config.
   236  
   237  Example:
   238  
   239  ```
   240  [RuleVars]
   241      CHAT = "https://chat.example.com/1?key=mySecretKey"
   242      foo = "baz"
   243  ```
   244  
   245  The above could then be used in the rule configuration like:
   246  
   247  ```
   248  notification chat {
   249      post = ${sys.CHAT}
   250      runOnActions = false
   251  }
   252  ```
   253  
   254  They can also be accessed in templates with the [`V()` function](/definitions#vstring-string)
   255  
   256  ### DBConf
   257  Defines what internal storage Bosun should use. There are currently two
   258  choices, a built-in redis-like server called ledis or redis. Redis is
   259  recommended for production setups.
   260  
   261  The default is to use ledis. If Both Redis and ledis are defined, Redis will take preference and the ledis configuration will be ignored. Ledis is the default, so if `RedisHost` is not specified ledis will be used even if you have no `DBConf` configuration defined.
   262  
   263  <div class="admonition warning">
   264  <p class="admonition-title">Warning</p>
   265  <p>Upgrading the database to newer versions only works with redis. With ledis you will have to delete the database to use a new version that involves a migration (schema upgrade) to the db.</p>
   266  </div>
   267  
   268  #### RedisHost
   269  The Redis hostname and port.
   270  
   271  #### RedisDb
   272  Optional integer database to store bosun data.  Defaults to 0.
   273  
   274  #### RedisPassword
   275  Optional password to use when connecting to Redis.
   276  
   277  #### RedisClentSetName
   278  Optional key defining the sending of client's name `bosun` to Redis. Defaults to true.
   279  If you use Netflix/dynomite then RedisClentSetName must be set to false.
   280  
   281  #### RedisSentinels
   282  The redis sentinels list. Redis sentinel list will be used only if parameter `RedisMasterName` was set as well 
   283  
   284  #### RedisMasterName
   285  The redis master name within sentinel. If it is set bosun will use sentinel to receive information about cuurrent redis master.
   286  
   287  #### LedisDir
   288  Directory in which ledis will store data. Default: `LedisDir = "ledis_data"`
   289  
   290  #### LedisBind
   291  Ledis host and port. Default: `LedisBindAddr = "127.0.0.1:9565"`.
   292  
   293  #### Examples
   294  
   295  Redis Configuration:
   296  
   297  ```
   298  [DBConf]
   299  	RedisHost = "localhost:6389"
   300  ```
   301  
   302  Ledis Configuration:
   303  
   304  ```
   305  [DBConf]
   306  	RedisHost = "localhost:6389"
   307  	LedisDir = "ledis_data"
   308  	LedisBindAddr = "127.0.0.1:9565"
   309  ```
   310  
   311  ### SMTPConf
   312  SMTP server configuration for email sending.
   313  
   314  #### EmailFrom
   315  Address from which emails will be sent.
   316  
   317  #### Host
   318  Outgoing SMTP server hostname or IP address.
   319  
   320  #### Username
   321  SMTP username
   322  
   323  #### Password
   324  SMTP password
   325  
   326  #### Example
   327  
   328  ```
   329  [SMTPConf]
   330  	EmailFrom = "bosun@example.com"
   331  	Host = "mail.example.com"
   332  	Username = "username"
   333  	Password = "fe8h392wh"
   334  ```
   335  
   336  ### AzureMonitorConf
   337  AzureConf enables [Azure Monitor specific functions](/expressions#azure-monitor-query-functions) in the expression language. Multiple clients may be defined allowing you to query different subscriptions and tenants from a single Bosun instance.
   338  
   339  #### AzureMonitorConf.default
   340  Default Azure client to use when the Prefix key is absent or is there and set to "default". When ysing multiple clients the string `default` can change to whatever you want to use in expressions to access this particular client.
   341  
   342  #### SubscriptionId
   343  The Azure Subscription GUID for the client. See [Getting your Azure Subscription GUID (new portal)](https://blogs.msdn.microsoft.com/mschray/2016/03/18/getting-your-azure-subscription-guid-new-portal/) for instructions on finding this with [Azure's portal](https://portal.azure.com).
   344  
   345  #### TenantId
   346  The Azure Tenant GUID for the client. To get the tenant you can access it via "Azure Active Directory > Properties > Directory ID in the Azure portal" as per Azure's [How to get an Azure Active Directory tenant documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-howto-tenant).
   347  
   348  #### ClientId
   349  The Azure Client GUID for the client. This will be the GUID listed as the "Application ID" when you get when create the app registration under Azure Active Directory.
   350  
   351  #### ClientSecret
   352  The Azure generated secret for tor the client. This will be under Settings :: Keys for the application as referenced in ClientID above.
   353  
   354  #### Concurrency
   355  For expressions that need to make multiple http requests like `azmulti()`, this sets the amount of concurrent http requests that will be made at a time. In other words, the number of request workers.
   356  
   357  This is an optional parameter, If not set or set to `0` then it will be the default value of `10` workers. A value of `1` means no concurrency since there will only be one worker.
   358  
   359  #### DebugRequest
   360  If set to `true` then HTTP requests to the Azure API's will be logged to stdout. This is an optional parameter with a default of `false`.
   361  
   362  #### DebugResponse
   363  If set to `true` then HTTP responses from Azure API's will be logged to stdout. This is an optional parameter with a default of `false`.
   364  
   365  #### Example
   366  
   367  ```
   368  [AzureMonitorConf]
   369  # Default instance will be queries when the prefix key is absent or is there and set to "default". If only defining one client for azure you would use this.
   370  [AzureMonitorConf.default]
   371      SubscriptionId = "52c5bef7-d925-4d0e-9bcd-969dbdbb1068"
   372      TenantId = "60730c79-4f4c-4782-9eca-3325638b8f9c"
   373      ClientId = "2a434dc4-48df-43b8-ad0e-020798bcb36c"
   374      ClientSecret = "AzureMakes+Aweso//meSecrets="
   375      Concurrency = 5
   376  
   377  [AzureMonitorConf.foo]
   378      SubscriptionId = "4b5922c6-0c5a-462f-876f-07072e842ade"
   379      TenantId = "2e8abf15-1328-458b-8762-192139857055"
   380      ClientId = "3a6d47ca-53eb-4a18-aa77-d3e2d764ba31"
   381      ClientSecret = "AzureCreate+Grea/tSecrets="
   382  ```
   383  
   384  ### OpenTSDBConf
   385  Enables an OpenTSDB provider, and also enables [OpenTSDB specific
   386  functions](/expressions#opentsdb-query-functions) in the expression
   387  language. This also enables the Graph tab in Bosun's UI as that is
   388  OpenTSDB specific. However, you can still graph other time series DBs in
   389  Bosun's UI by using the Expression tab.
   390  
   391  #### Host
   392  OpenTSDB hostname and port to connect to.
   393  Since 0.9.0 this can be specified with a scheme.
   394  e.g. https://tsdb-querier:4242
   395  
   396  #### Version
   397  Either 2.1 or 2.2. Default: 2.1. If set to 2.2, certain features that
   398  correspond to new OpenTDSB features are enabled e.g. [filter
   399  support](http://opentsdb.net/docs/build/html/user_guide/query/filters.html).
   400  
   401  #### ResponseLimit
   402  Causes requests to error if the OpenTSDB response is larger than
   403  this setting in bytes. This is useful to catch alerts that are pulling
   404  in more data then they need to (i.e. maybe downsampling can be used.)
   405  
   406  This does not cancel the query with OpenTSDB, but Bosun will stop processing the response.
   407  
   408  #### Example
   409  
   410  ```
   411  [OpenTSDBConf]
   412  	Host = "https://ny-tsdb01:4242"
   413  	Version = 2.2
   414  	ResponseLimit = 25000000
   415  ```
   416  
   417  ### ElasticConf
   418  Enables querying multiple Elastic clusters. The [elastic expression
   419  functions](/expressions#elastic-query-functions) become available when
   420  this is defined. The functions are designed more to be used for querying
   421  log formatted data and stats from those logs.
   422  
   423  The functions that would allow you to use Elastic effectively as a
   424  time-series based backend do not currently exist.
   425  
   426  #### ElasticConf.default
   427  Default cluster to query when [PrefixKey](/expressions#prefixkey) is not
   428  passed to the [elastic expression
   429  functions](/expressions#elastic-query-functions).
   430  
   431  #### Hosts
   432  List of hosts that are members of the cluster. Elastic uses these hosts
   433  to discover all the other hosts in the cluster, so you don't have to
   434  specify every host in the cluster. [This article
   435  on Sniffing](https://github.com/olivere/elastic/wiki/Sniffing) describes
   436  how this discovery functions.
   437  
   438  #### SimpleClient
   439  Boolean determining when setting true periodic health checks and
   440  sniffing will be disabled. This is useful when you want to query from a
   441  single or fixed number of Elastic nodes.
   442  
   443  #### ClientOptions
   444  Advanced [Elastic](http://olivere.github.io/elastic/) client options
   445  e.g. basic authentication, http schema etc.
   446  
   447  #### Example
   448  
   449  ```
   450  [ElasticConf]
   451      [ElasticConf.default]
   452          Hosts = ["http://ny-lselastic01.example.com:9200", "http://ny-lselastic02.example.com:9200"]
   453  
   454      [ElasticConf.foo]
   455          Hosts = ["http://ny-lselastic01.example.com:9200", "http://ny-lselastic02.example.com:9200"]
   456          SimpleClient = true
   457  
   458      [ElasticConf.bar]
   459          Hosts = ["http://ny-lselastic01.example.com:9200", "http://ny-lselastic02.example.com:9200"]
   460  
   461          [ElasticConf.bar.ClientOptions]
   462             Enabled = true
   463             BasicAuthUsername = "admin"
   464             BasicAuthPassword = "testing"
   465             Scheme = "https" => default http
   466             SnifferEnabled = false => default true
   467             SnifferTimeoutStartup = 10 => default 5s
   468             HealthcheckEnabled = false
   469  ```
   470  
   471  ### GraphiteConf
   472  Enables querying Graphite server and exposes its query functions to the
   473  expression language.
   474  
   475  #### Host
   476  Graphite connection host and port, e.g. `Host = "localhost:80"`.
   477  
   478  #### GraphiteConf.Headers
   479  Headers as key / value pairs (one per line) that will be sent with each
   480  Graphite request.
   481  
   482  #### Example
   483  
   484  ```
   485  [GraphiteConf]
   486  	Host = "localhost:80"
   487  	[GraphiteConf.Headers]
   488  		X-Meow = "Mix"
   489  ```
   490  
   491  ### PromConf
   492  Enables querying multiple [Prometheus TSDBs](https://prometheus.io/docs/introduction/overview/) via the Prometheus HTTP v1 endpoint. The [Prometheus Query Expression
   493  Functions](/expressions#prometheus-query-functions) become available when this is defined.
   494  
   495  #### PromConf.default
   496  Default cluster to query when [PrefixKey](/expressions#prefixkey-2) is not passed to the [prometheus query functions](/expressions#prometheus-query-functions).
   497  
   498  #### Example
   499  
   500  ```
   501  [PromConf]
   502      [PromConf.default]
   503          URL = "https://prometheus.kubea.example.com"
   504      [PromConf.kubeb]
   505          URL = "https://prometheus.kubeb.example.com"
   506  ```
   507  
   508  ### AnnotateConf
   509  Embeds the annotation service. This enables the ability to submit and
   510  edit annotations via the UI or API. It also enables the annotation
   511  related expression functions. Currently the only supported database for
   512  annotate is Elastic. It can be the same cluster as the one defined in
   513  `ElasticConf` or a different one.
   514  
   515  <div class="admonition warning">
   516  <p class="admonition-title">Warning</p>
   517  <p>The format of annotation configuration may change before the final 0.6.0 release.</a>.</p>
   518  </div>
   519  
   520  #### Hosts
   521  As for ElasticConf.
   522  
   523  #### SimpleClient
   524  As for ElasticConf.
   525  
   526  #### ClientOptions
   527  As for ElasticConf.
   528  
   529  #### Index
   530  The Elastic index to store annotations in. If not set the default is "annotate".
   531  
   532  #### Example
   533  ```
   534  [AnnotateConf]
   535      Hosts = ["http://ny-lselastic01.example.com:9200", "http://ny-lselastic02.example.com:9200"]
   536      Index = myAnnotate
   537  ```
   538  
   539  ```
   540  [AnnotateConf]
   541      Hosts = ["http://ny-lselastic01.example.com:9200", "http://ny-lselastic02.example.com:9200"]
   542      SimpleClient = true
   543      Index = myAnnotate
   544  ```
   545  
   546  ```
   547  [AnnotateConf]
   548      Hosts = ["http://ny-lselastic01.example.com:9200", "http://ny-lselastic02.example.com:9200"]
   549      Index = myAnnotate
   550      [AnnotateConf.ClientOptions]
   551             Enabled = true
   552             BasicAuthUsername = "admin"
   553             BasicAuthPassword = "testing"
   554             Scheme = "https" => default http
   555             SnifferEnabled = false => default true
   556             SnifferTimeoutStartup = 10 => default 5s
   557             HealthcheckEnabled = false
   558  ```
   559  
   560  ### InfluxConf
   561  Enables the Influx TSDBProvider and makes its query functions available via the API.
   562  
   563  #### URL
   564  Full URL that Influx should use to connect to. e.g. `URL = "https://myInfluxServer:1234"`
   565  
   566  #### Timeout
   567  Timeout for Influx queries, formatted as per the [Go
   568  duration format](https://golang.org/pkg/time/#Duration.String). e.g. `Timeout = "5m"`
   569  
   570  #### UnsafeSSL
   571  Setting to `true` allows you to connect to a Influx server even if the
   572  https certificate is not validated correctly.
   573  
   574  #### Username
   575  Influx connection username.
   576  
   577  #### Password
   578  Influx connection password.
   579  
   580  #### UserAgent
   581  User agent that Bosun should identify itself as when querying Influx.
   582  
   583  #### Example:
   584  
   585  ```
   586  [InfluxConf]
   587  	URL = "https://myInfluxServer:1234"
   588  	Timeout = "5m"
   589  	UnsafeSSL = true
   590  ```
   591  
   592  ### CloudWatchConf
   593   Enables querying CloudWatch metrics and exposes the query functions to the expression language.
   594   This functionality relies on bosun having assumed an iam role with the following capabilities
   595   ```
   596   ListMetrics
   597   GetMetricData
   598   ```
   599   You can supply credentials using any of the standard methods such as passing an iam role to the ec2 instance bosun is running on, 
   600   in the aws shared credentials file or via environment variables.
   601  
   602    For complete details see the `Specifying Credentials` section of the [aws documentation](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html)
   603  
   604   
   605  #### Enabled
   606   Should the cloudwatch functionality be loaded.
   607  
   608  #### PagesLimit
   609   If wildcards are used in a dimension string bosun must call the [ListMetrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) api to try and find
   610   matches. This parameter controls how many pages of results bosun will iterate through before giving up and throwing an error.
   611   1 page corresponds to 500 metrics
   612   
   613  #### ExpansionLimit
   614   When using wildcards, the expansion limit controls the maximum number of metrics that will be requested using the 
   615   [getMetricData()](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) api.
   616   For example if you have a large infrastructure which uses spot instances and make a query with a dimension of `InstanceId:*` 
   617   it would match 1000s of metrics. This will both be slow and expensive as you will be billed for each series you request from
   618   the cloudwatch API. The PagesLimit and ExpansionLimit act as a safety valves to stop users inadvertently making very large requests.
   619  
   620  #### Concurrency
   621   The number of simultaneous queries to make to the cloudwatch api.
   622  #### Example:
   623  
   624    ```
   625  [CloudWatchConf]
   626         Enabled = true
   627         PagesLimit = 10
   628         ExpansionLimit = 500
   629         Concurrency = 2
   630   ```
   631  
   632  ### AuthConf
   633  Bosun authentication settings. If not specified, your instance will have
   634  no authentication, and will be open to anybody. When using Auth, TLS
   635  should be used so credentials are not sent in clear text.
   636  
   637  #### CookieSecret
   638  A secret string used to encrypt cookies Bosun sets in client browsers to prevent token forgery. We recommend a longish random string here.
   639  
   640  #### TokenSecret
   641  Supplying this will activate "token authentication", where you can generate api tokens that external apps and services can use to interact with Bosun. Should be a long random string.
   642  
   643  #### AuthDisabled
   644  Disable authentication. Set to true to allow any user to access and change Bosun. The main use case for using this vs omitting `AuthConf` altogether is setting to true,
   645  and also enabling token auth to generate tokens before fully activating Authentication.
   646  
   647  #### AuthConf.LDAP
   648  LDAP authentication configuration.
   649  
   650  ##### AuthConf.LDAP.Domain
   651  LDAP Domain name.
   652  
   653  ##### AuthConf.LDAP.LdapAddr
   654  Host and port of LDAP server
   655  
   656  ##### AuthConf.LDAP.AllowInsecure
   657  Set to true to skip certificate validation if you are running self-signed certs, for example.
   658  
   659  ##### AuthConf.LDAP.DefaultPermission
   660  Default permissions that will be applied to any user who can authenticate to LDAP.
   661  
   662  ##### AuthConf.LDAP.RootSearchPath
   663  Base search path for searching group and user memberships. Not needed if not specifying Group level permissions. Usually just `DC=myOrg,DC=com` is sufficient.
   664  
   665  ##### AuthConf.LDAP.Groups
   666  Allows you to set permission levels per LDAP group. See example for usage.
   667  
   668  ##### AuthConf.LDAP.Users
   669  Allows you to grant permissions to individual users. See example for usage.
   670  
   671  #### Permissions
   672  Various parts of the config allow you to specify permissions. These
   673  fields accept a comma seperated list of roles or permissions. Available
   674  roles and permissions are defined [in the Bosun
   675  source](https://github.com/bosun-monitor/bosun/blob/master/cmd/bosun/web/roles.go#L33).
   676  Any of the description values can be used as a permission in the config.
   677  See example for some examples. If a user matches multiple Group or User permissions, they will have the aggregate of all permissions granted to those groups and users, as well as the defaults.
   678  
   679  #### Example:
   680  ```
   681  [AuthConf]
   682    CookieSecret = "MAPpHDIjciqzTg708Ef0AXLeid0o9ghrwKReyj57RPUCk80QffmLvVVHqc4w+A=="
   683    TokenSecret =  "hEgeP7DJn0e2RmhOEQLaNItzNN0fm8fWyyX1F3PB3qUbD9859xFxdL1JPLknuQ=="
   684    [AuthConf.LDAP]
   685      Domain = "mycompany"
   686      LdapAddr = "ldap.mycompany.com:3269"
   687      DefaultPermission = "Reader"
   688      RootSearchPath = "DC=ds,DC=mycompany,DC=com"
   689      [[AuthConf.LDAP.Groups]]
   690        Path = "CN=Sysadmins,OU=Security Groups,DC=mycompany,DC=com"
   691        Role = "Admin"
   692      [[AuthConf.LDAP.Groups]]
   693        Path = "CN=Developers,OU=Security Groups,DC=mycompany,DC=com"
   694        Role = "Writer"
   695      [AuthConf.LDAP.Users]
   696        jSmith = "Actions,Create Annotations,Silence"
   697  ```
   698  
   699  </div>
   700  </div>