mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-15 17:31:45 +08:00
c47eacaf97
resolve #3000
3.4 KiB
3.4 KiB
Summary
Name
server-info
is a plugin that reports basic server information to etcd periodically.
The meaning of each item in server information is following:
Name | Type | Description |
---|---|---|
up_time | integer | Elapsed time (in seconds) since APISIX instance was launched, value will be reset when you hot updating APISIX but is kept for intact if you just reloading APISIX. |
boot_time | integer | Bootstrap time (UNIX timestamp) of the APISIX instance, value will be reset when you hot updating APISIX but is kept for intact if you just reloading APISIX. |
last_report_time | integer | Last reporting time (UNIX timestamp). |
id | string | APISIX instance id. |
etcd_version | string | The etcd cluster version that APISIX is using, value will be "unknown" if the network (to etcd) is partitioned. |
version | string | APISIX version. |
hostname | string | Hostname of the machine/pod that APISIX is deployed. |
Attributes
None
API
None
How to Enable
Just configure server-info
in the plugin list of the configuration file conf/config.yaml
.
plugins: # plugin list
- example-plugin
- limit-req
- node-status
- server-info
- jwt-auth
- zipkin
......
How to customize the server info report configurations
We can change the report configurations in the plugin_attr
section of conf/config.yaml
.
Name | Type | Default | Description |
---|---|---|---|
report_interval | integer | 60 | the interval to report server info to etcd (unit: second, maximum: 3600, minimum: 60). |
report_ttl | integer | 7200 | the live time for server info in etcd (unit: second, maximum: 86400, minimum: 3600). |
Here is an example, which modifies the report_interval
to 10 minutes and sets the report_ttl
to one hour.
plugin_attr:
server-info:
report_interval: 600,
report_ttl: 3600
Test Plugin
The APISIX Dashboard will collects server info in etcd, after enabling this plugin, you may try to check them through Dashboard.
Disable Plugin
Remove server-info
in the plugin list of configure file conf/config.yaml
.
plugins: # plugin list
- example-plugin
- limit-req
- node-status
- jwt-auth
- zipkin
......