github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/configuration/telemetry.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: telemetry Stanza - Agent Configuration
     4  sidebar_title: telemetry
     5  description: |-
     6    The "telemetry" stanza configures Nomad's publication of metrics and telemetry
     7    to third-party systems.
     8  ---
     9  
    10  # `telemetry` Stanza
    11  
    12  <Placement groups={['telemetry']} />
    13  
    14  The `telemetry` stanza configures Nomad's publication of metrics and telemetry
    15  to third-party systems.
    16  
    17  ```hcl
    18  telemetry {
    19    publish_allocation_metrics = true
    20    publish_node_metrics       = true
    21  }
    22  ```
    23  
    24  This section of the documentation only covers the configuration options for
    25  `telemetry` stanza. To understand the architecture and metrics themselves,
    26  please see the [Telemetry guide](/docs/telemetry).
    27  
    28  ## `telemetry` Parameters
    29  
    30  Due to the number of configurable parameters to the `telemetry` stanza,
    31  parameters on this page are grouped by the telemetry provider.
    32  
    33  ### Common
    34  
    35  The following options are available on all telemetry configurations.
    36  
    37  - `disable_hostname` `(bool: false)` - Specifies if gauge values should be
    38    prefixed with the local hostname.
    39  
    40  - `collection_interval` `(duration: 1s)` - Specifies the time interval at which
    41    the Nomad agent collects telemetry data.
    42  
    43  - `use_node_name` `(bool: false)` - Specifies if gauge values should be
    44    prefixed with the name of the node, instead of the hostname. If set it will
    45    override [disable_hostname](#disable_hostname) value.
    46  
    47  - `publish_allocation_metrics` `(bool: false)` - Specifies if Nomad should
    48    publish runtime metrics of allocations.
    49  
    50  - `publish_node_metrics` `(bool: false)` - Specifies if Nomad should publish
    51    runtime metrics of nodes.
    52  
    53  - `filter_default` `(bool: true)` - This controls whether to allow metrics that
    54    have not been specified by the filter. Defaults to true, which will allow all
    55    metrics when no filters are provided. When set to false with no filters, no
    56    metrics will be sent.
    57  
    58  - `prefix_filter` `(list: [])` - This is a list of filter rules to apply for
    59    allowing/blocking metrics by prefix. A leading "<b>+</b>" will enable any
    60    metrics with the given prefix, and a leading "<b>-</b>" will block them. If
    61    there is overlap between two rules, the more specific rule will take
    62    precedence. Blocking will take priority if the same prefix is listed multiple
    63    times.
    64  
    65  ```python
    66  ['-nomad.raft', '+nomad.raft.apply', '-nomad.memberlist']
    67  ```
    68  
    69  - `disable_dispatched_job_summary_metrics` `(bool: false)` - Specifies if Nomad
    70    should ignore jobs dispatched from a parameterized job when publishing job
    71    summary statistics. Since each job has a small memory overhead for tracking
    72    summary statistics, it is sometimes desired to trade these statistics for
    73    more memory when dispatching high volumes of jobs.
    74  
    75  ### `statsite`
    76  
    77  These `telemetry` parameters apply to
    78  [statsite](https://github.com/armon/statsite).
    79  
    80  - `statsite_address` `(string: "")` - Specifies the address of a statsite server
    81    to forward metrics data to.
    82  
    83  ```hcl
    84  telemetry {
    85    statsite_address = "statsite.company.local:8125"
    86  }
    87  ```
    88  
    89  ### `statsd`
    90  
    91  These `telemetry` parameters apply to
    92  [statsd](https://github.com/etsy/statsd).
    93  
    94  - `statsd_address` `(string: "")` - Specifies the address of a statsd server to
    95    forward metrics to.
    96  
    97  ```hcl
    98  telemetry {
    99    statsd_address = "statsd.company.local:8125"
   100  }
   101  ```
   102  
   103  ### `datadog`
   104  
   105  These `telemetry` parameters apply to
   106  [DataDog statsd](https://github.com/DataDog/datadog-agent).
   107  
   108  - `datadog_address` `(string: "")` - Specifies the address of a DataDog statsd
   109    server to forward metrics to.
   110  
   111  - `datadog_tags` `(list: [])` - Specifies a list of global tags that will be
   112    added to all telemetry packets sent to DogStatsD. It is a list of strings,
   113    where each string looks like "my_tag_name:my_tag_value".
   114  
   115  ```hcl
   116  telemetry {
   117    datadog_address = "dogstatsd.company.local:8125"
   118    datadog_tags = ["my_tag_name:my_tag_value"]
   119  }
   120  ```
   121  
   122  ### `prometheus`
   123  
   124  These `telemetry` parameters apply to [Prometheus](https://prometheus.io).
   125  
   126  - `prometheus_metrics` `(bool: false)` - Specifies whether the agent should
   127    make Prometheus formatted metrics available at `/v1/metrics?format=prometheus`.
   128  
   129  ### `circonus`
   130  
   131  These `telemetry` parameters apply to
   132  [Circonus](http://circonus.com/).
   133  
   134  - `circonus_api_token` `(string: "")` - Specifies a valid Circonus API Token
   135    used to create/manage check. If provided, metric management is enabled.
   136  
   137  - `circonus_api_app` `(string: "nomad")` - Specifies a valid app name associated
   138    with the API token.
   139  
   140  - `circonus_api_url` `(string: "https://api.circonus.com/v2")` - Specifies the
   141    base URL to use for contacting the Circonus API.
   142  
   143  - `circonus_submission_interval` `(string: "10s")` - Specifies the interval at
   144    which metrics are submitted to Circonus.
   145  
   146  - `circonus_submission_url` `(string: "")` - Specifies the
   147    `check.config.submission_url` field, of a Check API object, from a previously
   148    created HTTPTRAP check.
   149  
   150  - `circonus_check_id` `(string: "")` - Specifies the Check ID (**not check
   151    bundle**) from a previously created HTTPTRAP check. The numeric portion of the
   152    `check._cid` field in the Check API object.
   153  
   154  - `circonus_check_force_metric_activation` `(bool: false)` - Specifies if force
   155    activation of metrics which already exist and are not currently active. If
   156    check management is enabled, the default behavior is to add new metrics as
   157    they are encountered. If the metric already exists in the check, it will
   158    not be activated. This setting overrides that behavior.
   159  
   160  - `circonus_check_instance_id` `(string: "<hostname>:<application>")` - Serves
   161    to uniquely identify the metrics coming from this _instance_. It can be used
   162    to maintain metric continuity with transient or ephemeral instances as they
   163    move around within an infrastructure. By default, this is set to
   164    hostname:application name (e.g. "host123:nomad").
   165  
   166  - `circonus_check_search_tag` `(string: <service>:<application>)` - Specifies a
   167    special tag which, when coupled with the instance id, helps to narrow down the
   168    search results when neither a Submission URL or Check ID is provided. By
   169    default, this is set to service:app (e.g. "service:nomad").
   170  
   171  - `circonus_check_display_name` `(string: "")` - Specifies a name to give a
   172    check when it is created. This name is displayed in the Circonus UI Checks
   173    list.
   174  
   175  - `circonus_check_tags` `(string: "")` - Comma separated list of additional
   176    tags to add to a check when it is created.
   177  
   178  - `circonus_broker_id` `(string: "")` - Specifies the ID of a specific Circonus
   179    Broker to use when creating a new check. The numeric portion of `broker._cid`
   180    field in a Broker API object. If metric management is enabled and neither a
   181    Submission URL nor Check ID is provided, an attempt will be made to search for
   182    an existing check using Instance ID and Search Tag. If one is not found, a new
   183    HTTPTRAP check will be created. By default, this is a random
   184    Enterprise Broker is selected, or, the default Circonus Public Broker.
   185  
   186  - `circonus_broker_select_tag` `(string: "")` - Specifies a special tag which
   187    will be used to select a Circonus Broker when a Broker ID is not provided. The
   188    best use of this is to as a hint for which broker should be used based on
   189    _where_ this particular instance is running (e.g. a specific geographic location or
   190    datacenter, dc:sfo).