Skip to content

Filebeats Collector Configuration Manual

Before using this collector, you must install 'Filebeats' and ensure it is running properly

1. Configuration Example

1.1 Configure the Filebeats collector URL in the script file

Python
1
2
# Configure the Filebeats collector URL
FILEBEATS_URL = 'http://localhost:5067/stats?pretty'

Access address:

Text Only
1
2
# Users need to configure the corresponding port; multiple instances share one collector
curl http://localhost:5067/stats?pretty

1.2 Create a Guance Connector

In 「Manage / Experimental Features」, enable 「Guance Connector」

Go to 「Development / Connectors / Add Connector」, select type 「Guance」, and fill in the relevant configuration parameters as prompted in the input box (this script requires the ID value to be "Guance").

For information about selecting nodes for the Guance connector, refer to: Manual / Interface and Operations / Guance Nodes

2. Data Reporting Format

After data synchronization is normal, you can view the data in the 「Metrics / Metrics Analysis」 section of TrueWatch.

An example of reported data is as follows:

JSON
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
    "fields": {
      "filebeat_output_read_errors" : 123,
      "filebeat_output_write_errors": 123,
      "filebeat_pipeline_failed"    : 123
    },
    "measurement": "filebeats",
    "tags": {
      "host": "xxx",
      "port": "5067"
    }
}

Descriptions of some fields are as follows:

Field Type Description
filebeat_output_read_errors Integer Number of output read errors in Filebeats
filebeat_output_write_errors Integer Number of output write errors in Filebeats
filebeat_pipeline_failed Integer Number of pipeline failures in Filebeats

3. Common Errors

Text Only
1
2
[2023-xx-xx xx:xx:xx.xxx] [+0ms] >>>>>>>>>>>>> Warning: Connector configuration error! Please modify the connector configuration <<<<<<<<<<<<<<<<
[2023-xx-xx xx:xx:xx.xxx] [+0ms] Connector not found: `Guance`

Please check if the connector configuration is correct; refer to 1.2 to create a Guance connector