Config file example: Nginx HTTP Server
editConfig file example: Nginx HTTP Server
editInclude these sample settings in your standalone Elastic Agent elastic-agent.yml
configuration file to ingest data from Nginx HTTP Server.
Nginx HTTP Server logs
editoutputs: default: type: elasticsearch hosts: - '{elasticsearch-host-url}' username: '${ES_USERNAME}' password: '${ES_PASSWORD}' 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: nginx-1 type: logfile use_output: default data_stream: namespace: default streams: - id: "insert a unique identifier here" data_stream: dataset: nginx.access type: logs ignore_older: 72h paths: - /var/log/nginx/access.log* tags: - nginx-access exclude_files: - .gz$ processors: - add_locale: null - id: "insert a unique identifier here" data_stream: dataset: nginx.error type: logs ignore_older: 72h paths: - /var/log/nginx/error.log* tags: - nginx-error exclude_files: - .gz$ multiline: pattern: '^\d{4}\/\d{2}\/\d{2} ' negate: true match: after processors: - add_locale: null
For available output settings, refer to Configure outputs for standalone Elastic Agents. |
|
For settings specific to the Elasticsearch output, refer to Configure the Elasticsearch output. |
|
The URL of the Elasticsearch cluster where output should be sent, including the port number. For example |
|
For available download settings, refer to Configure download settings for standalone Elastic Agent upgrades. |
|
For available monitoring settings, refer to Configure monitoring for standalone Elastic Agents. |
|
For available input settings, refer to Configure inputs for standalone Elastic Agents. |
|
A user-defined ID to uniquely identify the input stream. |
|
For available input types, refer to Elastic Agent inputs. |
|
Learn about Data streams for time series data. |
|
Specify a unique ID for each individual input stream. Naming the ID by appending the associated |
|
Refer to Logs reference in the Nginx HTTP integration documentation for the logs available to ingest and exported fields. |
|
Path to the log files to be monitored. |
Nginx HTTP Server metrics
editoutputs: default: type: elasticsearch hosts: - '{elasticsearch-host-url}' username: '${ES_USERNAME}' password: '${ES_PASSWORD}' 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" type: nginx/metrics use_output: default data_stream: namespace: default streams: - id: "insert a unique identifier here" data_stream: dataset: nginx.stubstatus type: metrics metricsets: - stubstatus hosts: - 'http://127.0.0.1:80' period: 10s server_status_path: /nginx_status
For available output settings, refer to Configure outputs for standalone Elastic Agents. |
|
For settings specific to the Elasticsearch output, refer to Configure the Elasticsearch output. |
|
The URL of the Elasticsearch cluster where output should be sent, including the port number. For example |
|
For available download settings, refer to Configure download settings for standalone Elastic Agent upgrades. |
|
For available monitoring settings, refer to Configure monitoring for standalone Elastic Agents. |
|
For available input settings, refer to Configure inputs for standalone Elastic Agents. |
|
A user-defined ID to uniquely identify the input stream. |
|
For available input types, refer to Elastic Agent inputs. |
|
Learn about Data streams for time series data. |
|
Specify a unique ID for each individual input stream. Naming the ID by appending the associated |
|
A user-defined dataset. You can specify anything that makes sense to signify the source of the data. |
|
Refer to Metrics reference in the Nginx integration documentation for the type of metrics collected and exported fields. |