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

     1  <!--startmeta
     2  custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/apache/integrations/httpd.md"
     3  meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/apache/metadata.yaml"
     4  sidebar_label: "HTTPD"
     5  learn_status: "Published"
     6  learn_rel_path: "Data Collection/Web Servers and Web Proxies"
     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  # HTTPD
    12  
    13  
    14  <img src="https://netdata.cloud/img/apache.svg" width="150"/>
    15  
    16  
    17  Plugin: go.d.plugin
    18  Module: apache
    19  
    20  <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
    21  
    22  ## Overview
    23  
    24  This collector monitors the activity and performance of Apache servers, and collects metrics such as the number of connections, workers, requests and more.
    25  
    26  
    27  It sends HTTP requests to the Apache location [server-status](https://httpd.apache.org/docs/2.4/mod/mod_status.html), 
    28  which is a built-in location that provides metrics about the Apache server.
    29  
    30  
    31  This collector is supported on all platforms.
    32  
    33  This collector supports collecting metrics from multiple instances of this integration, including remote instances.
    34  
    35  
    36  ### Default Behavior
    37  
    38  #### Auto-Detection
    39  
    40  By default, it detects Apache instances running on localhost that are listening on port 80.
    41  On startup, it tries to collect metrics from:
    42  
    43  - http://localhost/server-status?auto
    44  - http://127.0.0.1/server-status?auto
    45  
    46  
    47  #### Limits
    48  
    49  The default configuration for this integration does not impose any limits on data collection.
    50  
    51  #### Performance Impact
    52  
    53  The default configuration for this integration is not expected to impose a significant performance impact on the system.
    54  
    55  
    56  ## Metrics
    57  
    58  Metrics grouped by *scope*.
    59  
    60  The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
    61  
    62  All metrics available only if [ExtendedStatus](https://httpd.apache.org/docs/2.4/mod/core.html#extendedstatus) is on.
    63  
    64  
    65  ### Per Apache instance
    66  
    67  These metrics refer to the entire monitored application.
    68  
    69  This scope has no labels.
    70  
    71  Metrics:
    72  
    73  | Metric | Dimensions | Unit | Basic | Extended |
    74  |:------|:----------|:----|:---:|:---:|
    75  | apache.connections | connections | connections | • | • |
    76  | apache.conns_async | keepalive, closing, writing | connections | • | • |
    77  | apache.workers | idle, busy | workers | • | • |
    78  | apache.scoreboard | waiting, starting, reading, sending, keepalive, dns_lookup, closing, logging, finishing, idle_cleanup, open | connections | • | • |
    79  | apache.requests | requests | requests/s |   | • |
    80  | apache.net | sent | kilobit/s |   | • |
    81  | apache.reqpersec | requests | requests/s |   | • |
    82  | apache.bytespersec | served | KiB/s |   | • |
    83  | apache.bytesperreq | size | KiB |   | • |
    84  | apache.uptime | uptime | seconds |   | • |
    85  
    86  
    87  
    88  ## Alerts
    89  
    90  There are no alerts configured by default for this integration.
    91  
    92  
    93  ## Setup
    94  
    95  ### Prerequisites
    96  
    97  #### Enable Apache status support
    98  
    99  - Enable and configure [status_module](https://httpd.apache.org/docs/2.4/mod/mod_status.html).
   100  - Ensure that you have [ExtendedStatus](https://httpd.apache.org/docs/2.4/mod/mod_status.html#troubleshoot) set on (enabled by default since Apache v2.3.6).
   101  
   102  
   103  
   104  ### Configuration
   105  
   106  #### File
   107  
   108  The configuration file name for this integration is `go.d/apache.conf`.
   109  
   110  
   111  You can edit the configuration file using the `edit-config` script from the
   112  Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory).
   113  
   114  ```bash
   115  cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
   116  sudo ./edit-config go.d/apache.conf
   117  ```
   118  #### Options
   119  
   120  The following options can be defined globally: update_every, autodetection_retry.
   121  
   122  
   123  <details><summary>Config options</summary>
   124  
   125  | Name | Description | Default | Required |
   126  |:----|:-----------|:-------|:--------:|
   127  | update_every | Data collection frequency. | 1 | no |
   128  | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |
   129  | url | Server URL. | http://127.0.0.1/server-status?auto | yes |
   130  | timeout | HTTP request timeout. | 1 | no |
   131  | username | Username for basic HTTP authentication. |  | no |
   132  | password | Password for basic HTTP authentication. |  | no |
   133  | proxy_url | Proxy URL. |  | no |
   134  | proxy_username | Username for proxy basic HTTP authentication. |  | no |
   135  | proxy_password | Password for proxy basic HTTP authentication. |  | no |
   136  | method | HTTP request method. | GET | no |
   137  | body | HTTP request body. |  | no |
   138  | headers | HTTP request headers. |  | no |
   139  | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no |
   140  | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no |
   141  | tls_ca | Certification authority that the client uses when verifying the server's certificates. |  | no |
   142  | tls_cert | Client TLS certificate. |  | no |
   143  | tls_key | Client TLS key. |  | no |
   144  
   145  </details>
   146  
   147  #### Examples
   148  
   149  ##### Basic
   150  
   151  A basic example configuration.
   152  
   153  ```yaml
   154  jobs:
   155    - name: local
   156      url: http://127.0.0.1/server-status?auto
   157  
   158  ```
   159  ##### HTTP authentication
   160  
   161  Basic HTTP authentication.
   162  
   163  <details><summary>Config</summary>
   164  
   165  ```yaml
   166  jobs:
   167    - name: local
   168      url: http://127.0.0.1/server-status?auto
   169      username: username
   170      password: password
   171  
   172  ```
   173  </details>
   174  
   175  ##### HTTPS with self-signed certificate
   176  
   177  Apache with enabled HTTPS and self-signed certificate.
   178  
   179  <details><summary>Config</summary>
   180  
   181  ```yaml
   182  jobs:
   183    - name: local
   184      url: https://127.0.0.1/server-status?auto
   185      tls_skip_verify: yes
   186  
   187  ```
   188  </details>
   189  
   190  ##### Multi-instance
   191  
   192  > **Note**: When you define multiple jobs, their names must be unique.
   193  
   194  Collecting metrics from local and remote instances.
   195  
   196  
   197  <details><summary>Config</summary>
   198  
   199  ```yaml
   200  jobs:
   201    - name: local
   202      url: http://127.0.0.1/server-status?auto
   203  
   204    - name: remote
   205      url: http://192.0.2.1/server-status?auto
   206  
   207  ```
   208  </details>
   209  
   210  
   211  
   212  ## Troubleshooting
   213  
   214  ### Debug Mode
   215  
   216  To troubleshoot issues with the `apache` collector, run the `go.d.plugin` with the debug option enabled. The output
   217  should give you clues as to why the collector isn't working.
   218  
   219  - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
   220    your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
   221  
   222    ```bash
   223    cd /usr/libexec/netdata/plugins.d/
   224    ```
   225  
   226  - Switch to the `netdata` user.
   227  
   228    ```bash
   229    sudo -u netdata -s
   230    ```
   231  
   232  - Run the `go.d.plugin` to debug the collector:
   233  
   234    ```bash
   235    ./go.d.plugin -d -m apache
   236    ```
   237  
   238