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

     1  <!--startmeta
     2  custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/elasticsearch/integrations/opensearch.md"
     3  meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/elasticsearch/metadata.yaml"
     4  sidebar_label: "OpenSearch"
     5  learn_status: "Published"
     6  learn_rel_path: "Data Collection/Search Engines"
     7  most_popular: True
     8  message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
     9  endmeta-->
    10  
    11  # OpenSearch
    12  
    13  
    14  <img src="https://netdata.cloud/img/opensearch.svg" width="150"/>
    15  
    16  
    17  Plugin: go.d.plugin
    18  Module: elasticsearch
    19  
    20  <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
    21  
    22  ## Overview
    23  
    24  This collector monitors the performance and health of the Elasticsearch cluster.
    25  
    26  
    27  It uses [Cluster APIs](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html) to collect metrics.
    28  
    29  Used endpoints:
    30  
    31  | Endpoint               | Description          | API                                                                                                         |
    32  |------------------------|----------------------|-------------------------------------------------------------------------------------------------------------|
    33  | `/`                    | Node info            |                                                                                                             |
    34  | `/_nodes/stats`        | Nodes metrics        | [Nodes stats API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html) |
    35  | `/_nodes/_local/stats` | Local node metrics   | [Nodes stats API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html) |
    36  | `/_cluster/health`     | Cluster health stats | [Cluster health API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html)   |
    37  | `/_cluster/stats`      | Cluster metrics      | [Cluster stats API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html)     |
    38  
    39  
    40  This collector is supported on all platforms.
    41  
    42  This collector supports collecting metrics from multiple instances of this integration, including remote instances.
    43  
    44  
    45  ### Default Behavior
    46  
    47  #### Auto-Detection
    48  
    49  By default, it detects instances running on localhost by attempting to connect to port 9200:
    50  
    51  - http://127.0.0.1:9200
    52  - https://127.0.0.1:9200
    53  
    54  
    55  #### Limits
    56  
    57  By default, this collector monitors only the node it is connected to. To monitor all cluster nodes, set the `cluster_mode` configuration option to `yes`.
    58  
    59  
    60  #### Performance Impact
    61  
    62  The default configuration for this integration is not expected to impose a significant performance impact on the system.
    63  
    64  
    65  ## Metrics
    66  
    67  Metrics grouped by *scope*.
    68  
    69  The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
    70  
    71  
    72  
    73  ### Per node
    74  
    75  These metrics refer to the cluster node.
    76  
    77  Labels:
    78  
    79  | Label      | Description     |
    80  |:-----------|:----------------|
    81  | cluster_name | Name of the cluster. Based on the [Cluster name setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#cluster-name). |
    82  | node_name | Human-readable identifier for the node. Based on the [Node name setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#node-name). |
    83  | host | Network host for the node, based on the [Network host setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#network.host). |
    84  
    85  Metrics:
    86  
    87  | Metric | Dimensions | Unit |
    88  |:------|:----------|:----|
    89  | elasticsearch.node_indices_indexing | index | operations/s |
    90  | elasticsearch.node_indices_indexing_current | index | operations |
    91  | elasticsearch.node_indices_indexing_time | index | milliseconds |
    92  | elasticsearch.node_indices_search | queries, fetches | operations/s |
    93  | elasticsearch.node_indices_search_current | queries, fetches | operations |
    94  | elasticsearch.node_indices_search_time | queries, fetches | milliseconds |
    95  | elasticsearch.node_indices_refresh | refresh | operations/s |
    96  | elasticsearch.node_indices_refresh_time | refresh | milliseconds |
    97  | elasticsearch.node_indices_flush | flush | operations/s |
    98  | elasticsearch.node_indices_flush_time | flush | milliseconds |
    99  | elasticsearch.node_indices_fielddata_memory_usage | used | bytes |
   100  | elasticsearch.node_indices_fielddata_evictions | evictions | operations/s |
   101  | elasticsearch.node_indices_segments_count | segments | segments |
   102  | elasticsearch.node_indices_segments_memory_usage_total | used | bytes |
   103  | elasticsearch.node_indices_segments_memory_usage | terms, stored_fields, term_vectors, norms, points, doc_values, index_writer, version_map, fixed_bit_set | bytes |
   104  | elasticsearch.node_indices_translog_operations | total, uncommitted | operations |
   105  | elasticsearch.node_indices_translog_size | total, uncommitted | bytes |
   106  | elasticsearch.node_file_descriptors | open | fd |
   107  | elasticsearch.node_jvm_heap | inuse | percentage |
   108  | elasticsearch.node_jvm_heap_bytes | committed, used | bytes |
   109  | elasticsearch.node_jvm_buffer_pools_count | direct, mapped | pools |
   110  | elasticsearch.node_jvm_buffer_pool_direct_memory | total, used | bytes |
   111  | elasticsearch.node_jvm_buffer_pool_mapped_memory | total, used | bytes |
   112  | elasticsearch.node_jvm_gc_count | young, old | gc/s |
   113  | elasticsearch.node_jvm_gc_time | young, old | milliseconds |
   114  | elasticsearch.node_thread_pool_queued | generic, search, search_throttled, get, analyze, write, snapshot, warmer, refresh, listener, fetch_shard_started, fetch_shard_store, flush, force_merge, management | threads |
   115  | elasticsearch.node_thread_pool_rejected | generic, search, search_throttled, get, analyze, write, snapshot, warmer, refresh, listener, fetch_shard_started, fetch_shard_store, flush, force_merge, management | threads |
   116  | elasticsearch.node_cluster_communication_packets | received, sent | pps |
   117  | elasticsearch.node_cluster_communication_traffic | received, sent | bytes/s |
   118  | elasticsearch.node_http_connections | open | connections |
   119  | elasticsearch.node_breakers_trips | requests, fielddata, in_flight_requests, model_inference, accounting, parent | trips/s |
   120  
   121  ### Per cluster
   122  
   123  These metrics refer to the cluster.
   124  
   125  Labels:
   126  
   127  | Label      | Description     |
   128  |:-----------|:----------------|
   129  | cluster_name | Name of the cluster. Based on the [Cluster name setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#cluster-name). |
   130  
   131  Metrics:
   132  
   133  | Metric | Dimensions | Unit |
   134  |:------|:----------|:----|
   135  | elasticsearch.cluster_health_status | green, yellow, red | status |
   136  | elasticsearch.cluster_number_of_nodes | nodes, data_nodes | nodes |
   137  | elasticsearch.cluster_shards_count | active_primary, active, relocating, initializing, unassigned, delayed_unaasigned | shards |
   138  | elasticsearch.cluster_pending_tasks | pending | tasks |
   139  | elasticsearch.cluster_number_of_in_flight_fetch | in_flight_fetch | fetches |
   140  | elasticsearch.cluster_indices_count | indices | indices |
   141  | elasticsearch.cluster_indices_shards_count | total, primaries, replication | shards |
   142  | elasticsearch.cluster_indices_docs_count | docs | docs |
   143  | elasticsearch.cluster_indices_store_size | size | bytes |
   144  | elasticsearch.cluster_indices_query_cache | hit, miss | events/s |
   145  | elasticsearch.cluster_nodes_by_role_count | coordinating_only, data, data_cold, data_content, data_frozen, data_hot, data_warm, ingest, master, ml, remote_cluster_client, voting_only | nodes |
   146  
   147  ### Per index
   148  
   149  These metrics refer to the index.
   150  
   151  Labels:
   152  
   153  | Label      | Description     |
   154  |:-----------|:----------------|
   155  | cluster_name | Name of the cluster. Based on the [Cluster name setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#cluster-name). |
   156  | index | Name of the index. |
   157  
   158  Metrics:
   159  
   160  | Metric | Dimensions | Unit |
   161  |:------|:----------|:----|
   162  | elasticsearch.node_index_health | green, yellow, red | status |
   163  | elasticsearch.node_index_shards_count | shards | shards |
   164  | elasticsearch.node_index_docs_count | docs | docs |
   165  | elasticsearch.node_index_store_size | store_size | bytes |
   166  
   167  
   168  
   169  ## Alerts
   170  
   171  
   172  The following alerts are available:
   173  
   174  | Alert name  | On metric | Description |
   175  |:------------|:----------|:------------|
   176  | [ elasticsearch_node_indices_search_time_query ](https://github.com/netdata/netdata/blob/master/health/health.d/elasticsearch.conf) | elasticsearch.node_indices_search_time | search performance is degraded, queries run slowly. |
   177  | [ elasticsearch_node_indices_search_time_fetch ](https://github.com/netdata/netdata/blob/master/health/health.d/elasticsearch.conf) | elasticsearch.node_indices_search_time | search performance is degraded, fetches run slowly. |
   178  | [ elasticsearch_cluster_health_status_red ](https://github.com/netdata/netdata/blob/master/health/health.d/elasticsearch.conf) | elasticsearch.cluster_health_status | cluster health status is red. |
   179  | [ elasticsearch_cluster_health_status_yellow ](https://github.com/netdata/netdata/blob/master/health/health.d/elasticsearch.conf) | elasticsearch.cluster_health_status | cluster health status is yellow. |
   180  | [ elasticsearch_node_index_health_red ](https://github.com/netdata/netdata/blob/master/health/health.d/elasticsearch.conf) | elasticsearch.node_index_health | node index $label:index health status is red. |
   181  
   182  
   183  ## Setup
   184  
   185  ### Prerequisites
   186  
   187  No action required.
   188  
   189  ### Configuration
   190  
   191  #### File
   192  
   193  The configuration file name for this integration is `go.d/elasticsearch.conf`.
   194  
   195  
   196  You can edit the configuration file using the `edit-config` script from the
   197  Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory).
   198  
   199  ```bash
   200  cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
   201  sudo ./edit-config go.d/elasticsearch.conf
   202  ```
   203  #### Options
   204  
   205  The following options can be defined globally: update_every, autodetection_retry.
   206  
   207  
   208  <details><summary>Config options</summary>
   209  
   210  | Name | Description | Default | Required |
   211  |:----|:-----------|:-------|:--------:|
   212  | update_every | Data collection frequency. | 5 | no |
   213  | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |
   214  | url | Server URL. | http://127.0.0.1:9200 | yes |
   215  | cluster_mode | Controls whether to collect metrics for all nodes in the cluster or only for the local node. | false | no |
   216  | collect_node_stats | Controls whether to collect nodes metrics. | true | no |
   217  | collect_cluster_health | Controls whether to collect cluster health metrics. | true | no |
   218  | collect_cluster_stats | Controls whether to collect cluster stats metrics. | true | no |
   219  | collect_indices_stats | Controls whether to collect indices metrics. | false | no |
   220  | timeout | HTTP request timeout. | 5 | no |
   221  | username | Username for basic HTTP authentication. |  | no |
   222  | password | Password for basic HTTP authentication. |  | no |
   223  | proxy_url | Proxy URL. |  | no |
   224  | proxy_username | Username for proxy basic HTTP authentication. |  | no |
   225  | proxy_password | Password for proxy basic HTTP authentication. |  | no |
   226  | method | HTTP request method. | GET | no |
   227  | body | HTTP request body. |  | no |
   228  | headers | HTTP request headers. |  | no |
   229  | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no |
   230  | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no |
   231  | tls_ca | Certification authority that the client uses when verifying the server's certificates. |  | no |
   232  | tls_cert | Client TLS certificate. |  | no |
   233  | tls_key | Client TLS key. |  | no |
   234  
   235  </details>
   236  
   237  #### Examples
   238  
   239  ##### Basic single node mode
   240  
   241  A basic example configuration.
   242  
   243  ```yaml
   244  jobs:
   245    - name: local
   246      url: http://127.0.0.1:9200
   247  
   248  ```
   249  ##### Cluster mode
   250  
   251  Cluster mode example configuration.
   252  
   253  <details><summary>Config</summary>
   254  
   255  ```yaml
   256  jobs:
   257    - name: local
   258      url: http://127.0.0.1:9200
   259      cluster_mode: yes
   260  
   261  ```
   262  </details>
   263  
   264  ##### HTTP authentication
   265  
   266  Basic HTTP authentication.
   267  
   268  <details><summary>Config</summary>
   269  
   270  ```yaml
   271  jobs:
   272    - name: local
   273      url: http://127.0.0.1:9200
   274      username: username
   275      password: password
   276  
   277  ```
   278  </details>
   279  
   280  ##### HTTPS with self-signed certificate
   281  
   282  Elasticsearch with enabled HTTPS and self-signed certificate.
   283  
   284  <details><summary>Config</summary>
   285  
   286  ```yaml
   287  jobs:
   288    - name: local
   289      url: https://127.0.0.1:9200
   290      tls_skip_verify: yes
   291  
   292  ```
   293  </details>
   294  
   295  ##### Multi-instance
   296  
   297  > **Note**: When you define multiple jobs, their names must be unique.
   298  
   299  Collecting metrics from local and remote instances.
   300  
   301  
   302  <details><summary>Config</summary>
   303  
   304  ```yaml
   305  jobs:
   306    - name: local
   307      url: http://127.0.0.1:9200
   308  
   309    - name: remote
   310      url: http://192.0.2.1:9200
   311  
   312  ```
   313  </details>
   314  
   315  
   316  
   317  ## Troubleshooting
   318  
   319  ### Debug Mode
   320  
   321  To troubleshoot issues with the `elasticsearch` collector, run the `go.d.plugin` with the debug option enabled. The output
   322  should give you clues as to why the collector isn't working.
   323  
   324  - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
   325    your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
   326  
   327    ```bash
   328    cd /usr/libexec/netdata/plugins.d/
   329    ```
   330  
   331  - Switch to the `netdata` user.
   332  
   333    ```bash
   334    sudo -u netdata -s
   335    ```
   336  
   337  - Run the `go.d.plugin` to debug the collector:
   338  
   339    ```bash
   340    ./go.d.plugin -d -m elasticsearch
   341    ```
   342  
   343