You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/latest/plugins/error-log-logger.md
+42-19Lines changed: 42 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,31 +30,38 @@ title: error-log-logger
30
30
31
31
## Name
32
32
33
-
`error-log-logger` is a plugin which pushes the log data of APISIX's error.log to TCP servers.
33
+
`error-log-logger` is a plugin which pushes the log data of APISIX's `error.log` to TCP servers or [Apache SkyWalking](https://skywalking.apache.org/).
34
34
35
-
This plugin will provide the ability to send the log data which selected by the level to Monitoring tools and other TCP servers.
35
+
This plugin will provide the ability to send the log data which selected by the level to Monitoring tools and other TCP servers, and SkyWalking over HTTP.
36
36
37
-
This plugin provides the ability as a batch to push the log data to your external TCP servers. If not receive the log data, don't worry, it will automatically send the logs after the timer function expires in our Batch Processor.
37
+
This plugin provides the ability as a batch to push the log data to your external TCP servers or monitoring tools. If not receive the log data, don't worry, it will automatically send the logs after the timer function expires in our Batch Processor.
38
38
39
39
For more info on Batch-Processor in Apache APISIX please refer.
40
40
[Batch-Processor](../batch-processor.md)
41
41
42
42
## Attributes
43
43
44
-
| Name | Type | Requirement | Default | Valid | Description |
| tcp.tls | boolean | optional | false || Control whether to perform SSL verification. |
49
+
| tcp.tls_server_name | string | optional ||| The server name for the new TLS extension SNI. |
50
+
| skywalking.endpoint_addr | string | optional |http://127.0.0.1:12900/v3/logs|| the http endpoint of Skywalking. |
51
+
| skywalking.service_name | string | optional | APISIX || service name for skywalking reporter |
52
+
| skywalking.service_instance_name | String | optional | APISIX Instance Name || Service instance name for skywalking reporter, set it to `$hostname` to get local hostname directly. |
53
+
| host | string | optional ||| (`Deprecated`, use `tcp.host` instead) IP address or the Hostname of the TCP server. |
54
+
| port | integer | optional ||[0,...]| (`Deprecated`, use `tcp.port` instead) Target upstream port. |
55
+
| tls | boolean | optional | false || (`Deprecated`, use `tcp.tls` instread) Control whether to perform SSL verification. |
56
+
| tls_server_name | string | optional ||| (`Deprecated`, use `tcp.tls_server_name` instead) The server name for the new TLS extension SNI. |
57
+
| timeout | integer | optional | 3 |[1,...]| Timeout for the upstream to connect and send, unit: second. |
58
+
| keepalive | integer | optional | 30 |[1,...]| Time for keeping the cosocket alive, unit: second. |
59
+
| level | string | optional | WARN || The filter's log level, default warn, choose the level in ["STDERR", "EMERG", "ALERT", "CRIT", "ERR", "ERROR", "WARN", "NOTICE", "INFO", "DEBUG"], the value ERR equals ERROR. |
60
+
| batch_max_size | integer | optional | 1000 |[1,...]| Max size of each batch. |
61
+
| inactive_timeout | integer | optional | 3 |[1,...]| Maximum age in seconds when the buffer will be flushed if inactive. |
62
+
| buffer_duration | integer | optional | 60 |[1,...]| Maximum age in seconds of the oldest entry in a batch before the batch must be processed. |
63
+
| max_retry_count | integer | optional | 0 |[0,...]| Maximum number of retries before removing from the processing pipe line. |
64
+
| retry_delay | integer | optional | 1 |[0,...]| Number of seconds the process execution should be delayed if the execution fails. |
58
65
59
66
## How To Enable And Disable
60
67
@@ -96,8 +103,24 @@ Step: update the attributes of the plugin
96
103
```shell
97
104
curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/error-log-logger -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
98
105
{
99
-
"host": "127.0.0.1",
100
-
"port": 1999,
106
+
"tcp": {
107
+
"host": "127.0.0.1",
108
+
"port": 1999
109
+
},
110
+
"inactive_timeout": 1
111
+
}'
112
+
```
113
+
114
+
## How to set the SkyWalking OAP server address
115
+
116
+
Step: update the attributes of the plugin
117
+
118
+
```shell
119
+
curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/error-log-logger -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
0 commit comments