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

     1  <!--startmeta
     2  custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/vsphere/README.md"
     3  meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/vsphere/metadata.yaml"
     4  sidebar_label: "VMware vCenter Server"
     5  learn_status: "Published"
     6  learn_rel_path: "Data Collection/Containers and VMs"
     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  # VMware vCenter Server
    12  
    13  
    14  <img src="https://netdata.cloud/img/vmware.svg" width="150"/>
    15  
    16  
    17  Plugin: go.d.plugin
    18  Module: vsphere
    19  
    20  <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
    21  
    22  ## Overview
    23  
    24  This collector monitors hosts and vms performance statistics from `vCenter` servers.
    25  
    26  > **Warning**: The `vsphere` collector cannot re-login and continue collecting metrics after a vCenter reboot.
    27  > go.d.plugin needs to be restarted.
    28  
    29  
    30  
    31  
    32  This collector is supported on all platforms.
    33  
    34  This collector supports collecting metrics from multiple instances of this integration, including remote instances.
    35  
    36  
    37  ### Default Behavior
    38  
    39  #### Auto-Detection
    40  
    41  This integration doesn't support auto-detection.
    42  
    43  #### Limits
    44  
    45  The default configuration for this integration does not impose any limits on data collection.
    46  
    47  #### Performance Impact
    48  
    49  The default `update_every` is 20 seconds, and it doesn't make sense to decrease the value.
    50  **VMware real-time statistics are generated at the 20-second specificity**.
    51  
    52  It is likely that 20 seconds is not enough for big installations and the value should be tuned.
    53  
    54  To get a better view we recommend running the collector in debug mode and seeing how much time it will take to collect metrics.
    55  
    56  <details>
    57  <summary>Example (all not related debug lines were removed)</summary>
    58  
    59  ```
    60  [ilyam@pc]$ ./go.d.plugin -d -m vsphere
    61  [ DEBUG ] vsphere[vsphere] discover.go:94 discovering : starting resource discovering process
    62  [ DEBUG ] vsphere[vsphere] discover.go:102 discovering : found 3 dcs, process took 49.329656ms
    63  [ DEBUG ] vsphere[vsphere] discover.go:109 discovering : found 12 folders, process took 49.538688ms
    64  [ DEBUG ] vsphere[vsphere] discover.go:116 discovering : found 3 clusters, process took 47.722692ms
    65  [ DEBUG ] vsphere[vsphere] discover.go:123 discovering : found 2 hosts, process took 52.966995ms
    66  [ DEBUG ] vsphere[vsphere] discover.go:130 discovering : found 2 vms, process took 49.832979ms
    67  [ INFO  ] vsphere[vsphere] discover.go:140 discovering : found 3 dcs, 12 folders, 3 clusters (2 dummy), 2 hosts, 3 vms, process took 249.655993ms
    68  [ DEBUG ] vsphere[vsphere] build.go:12 discovering : building : starting building resources process
    69  [ INFO  ] vsphere[vsphere] build.go:23 discovering : building : built 3/3 dcs, 12/12 folders, 3/3 clusters, 2/2 hosts, 3/3 vms, process took 63.3µs
    70  [ DEBUG ] vsphere[vsphere] hierarchy.go:10 discovering : hierarchy : start setting resources hierarchy process
    71  [ INFO  ] vsphere[vsphere] hierarchy.go:18 discovering : hierarchy : set 3/3 clusters, 2/2 hosts, 3/3 vms, process took 6.522µs
    72  [ DEBUG ] vsphere[vsphere] filter.go:24 discovering : filtering : starting filtering resources process
    73  [ DEBUG ] vsphere[vsphere] filter.go:45 discovering : filtering : removed 0 unmatched hosts
    74  [ DEBUG ] vsphere[vsphere] filter.go:56 discovering : filtering : removed 0 unmatched vms
    75  [ INFO  ] vsphere[vsphere] filter.go:29 discovering : filtering : filtered 0/2 hosts, 0/3 vms, process took 42.973µs
    76  [ DEBUG ] vsphere[vsphere] metric_lists.go:14 discovering : metric lists : starting resources metric lists collection process
    77  [ INFO  ] vsphere[vsphere] metric_lists.go:30 discovering : metric lists : collected metric lists for 2/2 hosts, 3/3 vms, process took 275.60764ms
    78  [ INFO  ] vsphere[vsphere] discover.go:74 discovering : discovered 2/2 hosts, 3/3 vms, the whole process took 525.614041ms
    79  [ INFO  ] vsphere[vsphere] discover.go:11 starting discovery process, will do discovery every 5m0s
    80  [ DEBUG ] vsphere[vsphere] collect.go:11 starting collection process
    81  [ DEBUG ] vsphere[vsphere] scrape.go:48 scraping : scraped metrics for 2/2 hosts, process took 96.257374ms
    82  [ DEBUG ] vsphere[vsphere] scrape.go:60 scraping : scraped metrics for 3/3 vms, process took 57.879697ms
    83  [ DEBUG ] vsphere[vsphere] collect.go:23 metrics collected, process took 154.77997ms
    84  ```
    85  
    86  </details>
    87  
    88  There you can see that discovering took `525.614041ms`, and collecting metrics took `154.77997ms`. Discovering is a separate thread, it doesn't affect collecting.
    89  `update_every` and `timeout` parameters should be adjusted based on these numbers.
    90  
    91  
    92  
    93  ## Metrics
    94  
    95  Metrics grouped by *scope*.
    96  
    97  The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
    98  
    99  
   100  
   101  ### Per virtual machine
   102  
   103  These metrics refer to the Virtual Machine.
   104  
   105  Labels:
   106  
   107  | Label      | Description     |
   108  |:-----------|:----------------|
   109  | datacenter | Datacenter name |
   110  | cluster | Cluster name |
   111  | host | Host name |
   112  | vm | Virtual Machine name |
   113  
   114  Metrics:
   115  
   116  | Metric | Dimensions | Unit |
   117  |:------|:----------|:----|
   118  | vsphere.vm_cpu_utilization | used | percentage |
   119  | vsphere.vm_mem_utilization | used | percentage |
   120  | vsphere.vm_mem_usage | granted, consumed, active, shared | KiB |
   121  | vsphere.vm_mem_swap_usage | swapped | KiB |
   122  | vsphere.vm_mem_swap_io | in, out | KiB/s |
   123  | vsphere.vm_disk_io | read, write | KiB/s |
   124  | vsphere.vm_disk_max_latency | latency | milliseconds |
   125  | vsphere.vm_net_traffic | received, sent | KiB/s |
   126  | vsphere.vm_net_packets | received, sent | packets |
   127  | vsphere.vm_net_drops | received, sent | packets |
   128  | vsphere.vm_overall_status | green, red, yellow, gray | status |
   129  | vsphere.vm_system_uptime | uptime | seconds |
   130  
   131  ### Per host
   132  
   133  These metrics refer to the ESXi host.
   134  
   135  Labels:
   136  
   137  | Label      | Description     |
   138  |:-----------|:----------------|
   139  | datacenter | Datacenter name |
   140  | cluster | Cluster name |
   141  | host | Host name |
   142  
   143  Metrics:
   144  
   145  | Metric | Dimensions | Unit |
   146  |:------|:----------|:----|
   147  | vsphere.host_cpu_utilization | used | percentage |
   148  | vsphere.host_mem_utilization | used | percentage |
   149  | vsphere.host_mem_usage | granted, consumed, active, shared, sharedcommon | KiB |
   150  | vsphere.host_mem_swap_io | in, out | KiB/s |
   151  | vsphere.host_disk_io | read, write | KiB/s |
   152  | vsphere.host_disk_max_latency | latency | milliseconds |
   153  | vsphere.host_net_traffic | received, sent | KiB/s |
   154  | vsphere.host_net_packets | received, sent | packets |
   155  | vsphere.host_net_drops | received, sent | packets |
   156  | vsphere.host_net_errors | received, sent | errors |
   157  | vsphere.host_overall_status | green, red, yellow, gray | status |
   158  | vsphere.host_system_uptime | uptime | seconds |
   159  
   160  
   161  
   162  ## Alerts
   163  
   164  
   165  The following alerts are available:
   166  
   167  | Alert name  | On metric | Description |
   168  |:------------|:----------|:------------|
   169  | [ vsphere_vm_cpu_utilization ](https://github.com/netdata/netdata/blob/master/health/health.d/vsphere.conf) | vsphere.vm_cpu_utilization | Virtual Machine CPU utilization |
   170  | [ vsphere_vm_mem_usage ](https://github.com/netdata/netdata/blob/master/health/health.d/vsphere.conf) | vsphere.vm_mem_utilization | Virtual Machine memory utilization |
   171  | [ vsphere_host_cpu_utilization ](https://github.com/netdata/netdata/blob/master/health/health.d/vsphere.conf) | vsphere.host_cpu_utilization | ESXi Host CPU utilization |
   172  | [ vsphere_host_mem_utilization ](https://github.com/netdata/netdata/blob/master/health/health.d/vsphere.conf) | vsphere.host_mem_utilization | ESXi Host memory utilization |
   173  
   174  
   175  ## Setup
   176  
   177  ### Prerequisites
   178  
   179  No action required.
   180  
   181  ### Configuration
   182  
   183  #### File
   184  
   185  The configuration file name for this integration is `go.d/vsphere.conf`.
   186  
   187  
   188  You can edit the configuration file using the `edit-config` script from the
   189  Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory).
   190  
   191  ```bash
   192  cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
   193  sudo ./edit-config go.d/vsphere.conf
   194  ```
   195  #### Options
   196  
   197  The following options can be defined globally: update_every, autodetection_retry.
   198  
   199  
   200  <details><summary>Config options</summary>
   201  
   202  | Name | Description | Default | Required |
   203  |:----|:-----------|:-------|:--------:|
   204  | update_every | Data collection frequency. | 20 | no |
   205  | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |
   206  | url | vCenter server URL. |  | yes |
   207  | host_include | Hosts selector (filter). |  | no |
   208  | vm_include | Virtual machines selector (filter). |  | no |
   209  | discovery_interval | Hosts and VMs discovery interval. | 300 | no |
   210  | timeout | HTTP request timeout. | 20 | no |
   211  | username | Username for basic HTTP authentication. |  | no |
   212  | password | Password for basic HTTP authentication. |  | no |
   213  | proxy_url | Proxy URL. |  | no |
   214  | proxy_username | Username for proxy basic HTTP authentication. |  | no |
   215  | proxy_password | Password for proxy basic HTTP authentication. |  | no |
   216  | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no |
   217  | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no |
   218  | tls_ca | Certification authority that the client uses when verifying the server's certificates. |  | no |
   219  | tls_cert | Client TLS certificate. |  | no |
   220  | tls_key | Client TLS key. |  | no |
   221  
   222  ##### host_include
   223  
   224  Metrics of hosts matching the selector will be collected.
   225  
   226  - Include pattern syntax: "/Datacenter pattern/Cluster pattern/Host pattern".
   227  - Match pattern syntax: [simple patterns](https://github.com/netdata/netdata/tree/master/src/libnetdata/simple_pattern#simple-patterns).
   228  - Syntax:
   229  
   230    ```yaml
   231    host_include:
   232      - '/DC1/*'           # select all hosts from datacenter DC1
   233      - '/DC2/*/!Host2 *'  # select all hosts from datacenter DC2 except HOST2
   234      - '/DC3/Cluster3/*'  # select all hosts from datacenter DC3 cluster Cluster3
   235    ```
   236  
   237  
   238  ##### vm_include
   239  
   240  Metrics of VMs matching the selector will be collected.
   241  
   242  - Include pattern syntax: "/Datacenter pattern/Cluster pattern/Host pattern/VM pattern".
   243  - Match pattern syntax: [simple patterns](https://github.com/netdata/netdata/tree/master/src/libnetdata/simple_pattern#simple-patterns).
   244  - Syntax:
   245  
   246    ```yaml
   247    vm_include:
   248      - '/DC1/*'           # select all VMs from datacenter DC
   249      - '/DC2/*/*/!VM2 *'  # select all VMs from datacenter DC2 except VM2
   250      - '/DC3/Cluster3/*'  # select all VMs from datacenter DC3 cluster Cluster3
   251    ```
   252  
   253  
   254  </details>
   255  
   256  #### Examples
   257  
   258  ##### Basic
   259  
   260  A basic example configuration.
   261  
   262  ```yaml
   263  jobs:
   264    - name     : vcenter1
   265      url      : https://203.0.113.1
   266      username : admin@vsphere.local
   267      password : somepassword
   268  
   269  ```
   270  ##### Multi-instance
   271  
   272  > **Note**: When you define multiple jobs, their names must be unique.
   273  
   274  Collecting metrics from local and remote instances.
   275  
   276  
   277  <details><summary>Config</summary>
   278  
   279  ```yaml
   280  jobs:
   281    - name     : vcenter1
   282      url      : https://203.0.113.1
   283      username : admin@vsphere.local
   284      password : somepassword
   285  
   286    - name     : vcenter2
   287      url      : https://203.0.113.10
   288      username : admin@vsphere.local
   289      password : somepassword
   290  
   291  ```
   292  </details>
   293  
   294  
   295  
   296  ## Troubleshooting
   297  
   298  ### Debug Mode
   299  
   300  To troubleshoot issues with the `vsphere` collector, run the `go.d.plugin` with the debug option enabled. The output
   301  should give you clues as to why the collector isn't working.
   302  
   303  - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
   304    your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
   305  
   306    ```bash
   307    cd /usr/libexec/netdata/plugins.d/
   308    ```
   309  
   310  - Switch to the `netdata` user.
   311  
   312    ```bash
   313    sudo -u netdata -s
   314    ```
   315  
   316  - Run the `go.d.plugin` to debug the collector:
   317  
   318    ```bash
   319    ./go.d.plugin -d -m vsphere
   320    ```
   321  
   322