Type to search.

Config file example: Apache HTTP Server

Serverless

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Serverless interfaces and procedures might differ from classic Elastic Stack deployments.

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Include these sample settings in your standalone Elastic Agent elastic-agent.yml configuration file to ingest data from Apache HTTP server.

YAML
outputs:
  default:
    type: elasticsearch
    hosts:
      - '{elasticsearch-host-url}'
    api_key: "my_api_key"
agent:
  download:
    sourceURI: 'https://artifacts.elastic.co/downloads/'
  monitoring:
    enabled: true
    use_output: default
    namespace: default
    logs: true
    metrics: true
inputs:
  - id: "insert a unique identifier here"
    name: apache-1
    type: logfile
    use_output: default
    data_stream:
      namespace: default
    streams:
      - id: "insert a unique identifier here"
        data_stream:
          dataset: apache.access
          type: logs
        paths:
          - /var/log/apache2/access.log*
          - /var/log/apache2/other_vhosts_access.log*
          - /var/log/httpd/access_log*
        tags:
          - apache-access
        exclude_files:
          - .gz$
      - id: "insert a unique identifier here"
        data_stream:
          dataset: apache.error
          type: logs
        paths:
          - /var/log/apache2/error.log*
          - /var/log/httpd/error_log*
        exclude_files:
          - .gz$
        tags:
          - apache-error
        processors:
          - add_locale: null
  1. For available output settings, refer to Configure outputs for standalone Elastic Agents.
  2. For settings specific to the Elasticsearch output, refer to Configure the Elasticsearch output.
  3. The URL of the Elasticsearch cluster where output should be sent, including the port number. For example https://12345ab6789cd12345ab6789cd.us-central1.gcp.cloud.es.io:443.
  4. An API key used to authenticate with the Elasticsearch cluster.
  5. For available download settings, refer to Configure download settings for standalone Elastic Agent upgrades.
  6. For available monitoring settings, refer to Configure monitoring for standalone Elastic Agents.
  7. For available input settings, refer to Configure inputs for standalone Elastic Agents.
  8. Specify a unique ID for the input.
  9. For available input types, refer to Elastic Agent inputs.
  10. Learn about Data streams for time series data.
  11. Specify a unique ID for each individual input stream. Naming the ID by appending the associated data_stream dataset (for example {{user-defined-unique-id}}-apache.access or {{user-defined-unique-id}}-apache.error) is a recommended practice, but any unique ID will work.
  12. Refer to Logs in the Apache HTTP Server integration documentation for the logs available to ingest and exported fields.
  13. Path to the log files to be monitored.
YAML
outputs:
  default:
    type: elasticsearch
    hosts:
      - '{elasticsearch-host-url}'
    api_key: "my_api_key"
agent:
  download:
    sourceURI: 'https://artifacts.elastic.co/downloads/'
  monitoring:
    enabled: true
    use_output: default
    namespace: default
    logs: true
    metrics: true
inputs:
    type: apache/metrics
    use_output: default
    data_stream:
      namespace: default
    streams:
      - id: "insert a unique identifier here"
        data_stream:
          dataset: apache.status
          type: metrics
        metricsets:
          - status
        hosts:
          - 'http://127.0.0.1'
        period: 30s
        server_status_path: /server-status
  1. For available output settings, refer to Configure outputs for standalone Elastic Agents.
  2. For settings specific to the Elasticsearch output, refer to Configure the Elasticsearch output.
  3. The URL of the Elasticsearch cluster where output should be sent, including the port number. For example https://12345ab6789cd12345ab6789cd.us-central1.gcp.cloud.es.io:443.
  4. An API key used to authenticate with the Elasticsearch cluster.
  5. For available download settings, refer to Configure download settings for standalone Elastic Agent upgrades.
  6. For available monitoring settings, refer to Configure monitoring for standalone Elastic Agents.
  7. For available input settings, refer to Configure inputs for standalone Elastic Agents.
  8. For available input types, refer to Elastic Agent inputs.
  9. Learn about Data streams for time series data.
  10. Specify a unique ID for each individual input stream. Naming the ID by appending the associated data_stream dataset (for example {{user-defined-unique-id}}-apache.status) is a recommended practice, but any unique ID will work.
  11. A user-defined dataset. You can specify anything that makes sense to signify the source of the data.
  12. Refer to Metrics in the Apache HTTP Server integration documentation for the type of metrics collected and exported fields.