github.com/netdata/go.d.plugin@v0.58.1/modules/traefik/integrations/traefik.md (about)

     1  <!--startmeta
     2  custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/traefik/README.md"
     3  meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/traefik/metadata.yaml"
     4  sidebar_label: "Traefik"
     5  learn_status: "Published"
     6  learn_rel_path: "Data Collection/Web Servers and Web Proxies"
     7  most_popular: False
     8  message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
     9  endmeta-->
    10  
    11  # Traefik
    12  
    13  
    14  <img src="https://netdata.cloud/img/traefik.svg" width="150"/>
    15  
    16  
    17  Plugin: go.d.plugin
    18  Module: traefik
    19  
    20  <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
    21  
    22  ## Overview
    23  
    24  This collector monitors Traefik servers.
    25  
    26  
    27  
    28  
    29  This collector is supported on all platforms.
    30  
    31  This collector supports collecting metrics from multiple instances of this integration, including remote instances.
    32  
    33  
    34  ### Default Behavior
    35  
    36  #### Auto-Detection
    37  
    38  This integration doesn't support auto-detection.
    39  
    40  #### Limits
    41  
    42  The default configuration for this integration does not impose any limits on data collection.
    43  
    44  #### Performance Impact
    45  
    46  The default configuration for this integration is not expected to impose a significant performance impact on the system.
    47  
    48  
    49  ## Metrics
    50  
    51  Metrics grouped by *scope*.
    52  
    53  The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
    54  
    55  
    56  
    57  ### Per entrypoint, protocol
    58  
    59  These metrics refer to the endpoint.
    60  
    61  This scope has no labels.
    62  
    63  Metrics:
    64  
    65  | Metric | Dimensions | Unit |
    66  |:------|:----------|:----|
    67  | traefik.entrypoint_requests | 1xx, 2xx, 3xx, 4xx, 5xx | requests/s |
    68  | traefik.entrypoint_request_duration_average | 1xx, 2xx, 3xx, 4xx, 5xx | milliseconds |
    69  | traefik.entrypoint_open_connections | a dimension per HTTP method | connections |
    70  
    71  
    72  
    73  ## Alerts
    74  
    75  There are no alerts configured by default for this integration.
    76  
    77  
    78  ## Setup
    79  
    80  ### Prerequisites
    81  
    82  #### Enable built-in Prometheus exporter
    83  
    84  To enable see [Prometheus exporter](https://doc.traefik.io/traefik/observability/metrics/prometheus/) documentation.
    85  
    86  
    87  
    88  ### Configuration
    89  
    90  #### File
    91  
    92  The configuration file name for this integration is `go.d/traefik.conf`.
    93  
    94  
    95  You can edit the configuration file using the `edit-config` script from the
    96  Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory).
    97  
    98  ```bash
    99  cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
   100  sudo ./edit-config go.d/traefik.conf
   101  ```
   102  #### Options
   103  
   104  The following options can be defined globally: update_every, autodetection_retry.
   105  
   106  
   107  <details><summary>All options</summary>
   108  
   109  | Name | Description | Default | Required |
   110  |:----|:-----------|:-------|:--------:|
   111  | update_every | Data collection frequency. | 1 | no |
   112  | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |
   113  | url | Server URL. | http://127.0.0.1:8082/metrics | yes |
   114  | timeout | HTTP request timeout. | 1 | no |
   115  | username | Username for basic HTTP authentication. |  | no |
   116  | password | Password for basic HTTP authentication. |  | no |
   117  | proxy_url | Proxy URL. |  | no |
   118  | proxy_username | Username for proxy basic HTTP authentication. |  | no |
   119  | proxy_password | Password for proxy basic HTTP authentication. |  | no |
   120  | method | HTTP request method. | GET | no |
   121  | body | HTTP request body. |  | no |
   122  | headers | HTTP request headers. |  | no |
   123  | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no |
   124  | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no |
   125  | tls_ca | Certification authority that the client uses when verifying the server's certificates. |  | no |
   126  | tls_cert | Client TLS certificate. |  | no |
   127  | tls_key | Client TLS key. |  | no |
   128  
   129  </details>
   130  
   131  #### Examples
   132  
   133  ##### Basic
   134  
   135  An example configuration.
   136  
   137  <details><summary>Config</summary>
   138  
   139  ```yaml
   140  jobs:
   141    - name: local
   142      url: http://127.0.0.1:8082/metrics
   143  
   144  ```
   145  </details>
   146  
   147  ##### Basic HTTP auth
   148  
   149  Local server with basic HTTP authentication.
   150  
   151  <details><summary>Config</summary>
   152  
   153  ```yaml
   154  jobs:
   155    - name: local
   156      url: http://127.0.0.1:8082/metrics
   157      username: foo
   158      password: bar
   159  
   160  ```
   161  </details>
   162  
   163  ##### Multi-instance
   164  
   165  > **Note**: When you define multiple jobs, their names must be unique.
   166  
   167  Local and remote instances.
   168  
   169  
   170  <details><summary>Config</summary>
   171  
   172  ```yaml
   173  jobs:
   174    - name: local
   175      http://127.0.0.1:8082/metrics
   176  
   177    - name: remote
   178      http://192.0.2.0:8082/metrics
   179  
   180  ```
   181  </details>
   182  
   183  
   184  
   185  ## Troubleshooting
   186  
   187  ### Debug Mode
   188  
   189  To troubleshoot issues with the `traefik` collector, run the `go.d.plugin` with the debug option enabled. The output
   190  should give you clues as to why the collector isn't working.
   191  
   192  - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
   193    your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
   194  
   195    ```bash
   196    cd /usr/libexec/netdata/plugins.d/
   197    ```
   198  
   199  - Switch to the `netdata` user.
   200  
   201    ```bash
   202    sudo -u netdata -s
   203    ```
   204  
   205  - Run the `go.d.plugin` to debug the collector:
   206  
   207    ```bash
   208    ./go.d.plugin -d -m traefik
   209    ```
   210  
   211