This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/apisix-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 7e25cf3 Deploy to GitHub pages
7e25cf3 is described below
commit 7e25cf3001f07723dabc60588d2263017653ce9b
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Nov 30 09:04:41 2020 +0000
Deploy to GitHub pages
---
apisix/plugins/error-log-logger.html | 110 +++++++++++++++++++++++
apisix/plugins/error-log-logger/index.html | 110 +++++++++++++++++++++++
apisix/plugins/prometheus.html | 17 +++-
apisix/plugins/prometheus/index.html | 17 +++-
apisix/zh-cn/plugins/error-log-logger.html | 109 ++++++++++++++++++++++
apisix/zh-cn/plugins/error-log-logger/index.html | 109 ++++++++++++++++++++++
apisix/zh-cn/plugins/prometheus.html | 17 +++-
apisix/zh-cn/plugins/prometheus/index.html | 17 +++-
sitemap.xml | 2 +-
9 files changed, 503 insertions(+), 5 deletions(-)
diff --git a/apisix/plugins/error-log-logger.html
b/apisix/plugins/error-log-logger.html
new file mode 100644
index 0000000..b567494
--- /dev/null
+++ b/apisix/plugins/error-log-logger.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta
http-equiv="X-UA-Compatible"
content="IE=edge"/><title>apisix/plugins/error-log-logger · Apache
APISIX™</title><meta name="viewport" content="width=device-width"/><meta
name="generator" content="Docusaurus"/><meta name="description"
content="<!--"/><meta name="docsearch:language" content="en"/><meta
property="og:title" content="apisix/plugins/error-log-logger · Apache
APISIX™"/><meta property="og:type" content="website" [...]
+ document.addEventListener('DOMContentLoaded', function() {
+ addBackToTop(
+ {"zIndex":100}
+ )
+ });
+ </script><script src="/js/scrollSpy.js"></script><link
rel="stylesheet" href="/css/main.css"/><script
src="/js/codetabs.js"></script></head><body class="sideNavVisible
separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper
wrapper"><header><a href="/"><img class="logo" src="/img/logo.png" alt="Apache
APISIX™"/><h2 class="headerTitleWithLogo">Apache APISIX™</h2></a><div
class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul
class="nav-site n [...]
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+<ul>
+<li><a href="/apisix/zh-cn/plugins/error-log-logger">中文</a></li>
+</ul>
+<h1><a class="anchor" aria-hidden="true" id="summary"></a><a href="#summary"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1- [...]
+<ul>
+<li><a href="#name"><strong>Name</strong></a></li>
+<li><a href="#attributes"><strong>Attributes</strong></a></li>
+<li><a href="#how-to-enable-and-disable"><strong>How To Enable And
Disable</strong></a></li>
+<li><a href="#how-to-update"><strong>How To Update</strong></a></li>
+</ul>
+<h2><a class="anchor" aria-hidden="true" id="name"></a><a href="#name"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
+<p><code>error-log-logger</code> is a plugin which pushes the log data of
APISIX's error.log to TCP servers.</p>
+<p>This plugin will provide the ability to send the log data which selected by
the level to Monitoring tools and other TCP servers.</p>
+<p>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.</p>
+<p>For more info on Batch-Processor in Apache APISIX please refer.
+<a href="/apisix/batch-processor">Batch-Processor</a></p>
+<h2><a class="anchor" aria-hidden="true" id="attributes"></a><a
href="#attributes" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1
[...]
+<table>
+<thead>
+<tr><th>Name</th><th>Type</th><th>Requirement</th><th>Default</th><th>Valid</th><th>Description</th></tr>
+</thead>
+<tbody>
+<tr><td>host</td><td>string</td><td>required</td><td></td><td></td><td>IP
address or the Hostname of the TCP server.</td></tr>
+<tr><td>port</td><td>integer</td><td>required</td><td></td><td>[0,...]</td><td>Target
upstream port.</td></tr>
+<tr><td>timeout</td><td>integer</td><td>optional</td><td>3</td><td>[1,...]</td><td>Timeout
for the upstream to connect and send, unit: second.</td></tr>
+<tr><td>keepalive</td><td>integer</td><td>optional</td><td>30</td><td>[1,...]</td><td>Time
for keeping the cosocket alive, unit: second.</td></tr>
+<tr><td>level</td><td>string</td><td>optional</td><td>WARN</td><td></td><td>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.</td></tr>
+<tr><td>tls</td><td>boolean</td><td>optional</td><td>false</td><td></td><td>Control
whether to perform SSL verification</td></tr>
+<tr><td>tls_server_name</td><td>string</td><td>optional</td><td></td><td></td><td>The
server name for the new TLS extension SNI</td></tr>
+<tr><td>batch_max_size</td><td>integer</td><td>optional</td><td>1000</td><td>[1,...]</td><td>Max
size of each batch</td></tr>
+<tr><td>inactive_timeout</td><td>integer</td><td>optional</td><td>3</td><td>[1,...]</td><td>Maximum
age in seconds when the buffer will be flushed if inactive</td></tr>
+<tr><td>buffer_duration</td><td>integer</td><td>optional</td><td>60</td><td>[1,...]</td><td>Maximum
age in seconds of the oldest entry in a batch before the batch must be
processed</td></tr>
+<tr><td>max_retry_count</td><td>integer</td><td>optional</td><td>0</td><td>[0,...]</td><td>Maximum
number of retries before removing from the processing pipe line</td></tr>
+<tr><td>retry_delay</td><td>integer</td><td>optional</td><td>1</td><td>[0,...]</td><td>Number
of seconds the process execution should be delayed if the execution
fails</td></tr>
+</tbody>
+</table>
+<h2><a class="anchor" aria-hidden="true" id="how-to-enable-and-disable"></a><a
href="#how-to-enable-and-disable" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c [...]
+<p>The error-log-logger is a global plugin of APISIX.</p>
+<h3><a class="anchor" aria-hidden="true" id="enable-plugin"></a><a
href="#enable-plugin" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>Enable the plug-in <code>error-log-logger</code> in
<code>conf/config.yaml</code>, then this plugin can work fine.
+It does not need to be bound in any route or service.</p>
+<p>Here is an example of <code>conf/config.yaml</code>:</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugins:</span> <span
class="hljs-comment"># plugin list</span>
+ <span class="hljs-string">...</span> <span class="hljs-string">...</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">request-id</span>
+ <span class="hljs-bullet">-</span> <span class="hljs-string">hmac-auth</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">api-breaker</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">error-log-logger</span> <span
class="hljs-comment"># enable plugin `error-log-logger</span>
+</code></pre>
+<h3><a class="anchor" aria-hidden="true" id="disable-plugin"></a><a
href="#disable-plugin" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
+<p>Remove or comment out the plugin <code>error-log-logger</code> from
<code>conf/config.yaml</code>.</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugins:</span> <span
class="hljs-comment"># plugin list</span>
+ <span class="hljs-string">...</span> <span class="hljs-string">...</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">request-id</span>
+ <span class="hljs-bullet">-</span> <span class="hljs-string">hmac-auth</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">api-breaker</span>
+ <span class="hljs-comment">#- error-log-logger # enable plugin
`error-log-logger</span>
+</code></pre>
+<h2><a class="anchor" aria-hidden="true"
id="how-to-set-the-tcp-server-address"></a><a
href="#how-to-set-the-tcp-server-address" aria-hidden="true"
class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16"
version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4
9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S1 [...]
+<p>Step: update the attributes of the plugin</p>
+<pre><code class="hljs css language-shell">curl
http://127.0.0.1:9080//apisix/admin/plugin_metadata/error-log-logger -H
'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+ "host": "127.0.0.1",
+ "port": 1999,
+ "inactive_timeout": 1
+}'
+</code></pre>
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#name">Name</a></li><li><a href="#attributes">Attributes</a></li><li><a
href="#how-to-enable-and-disable">How To Enable And Disable</a><ul
class="toc-headings"><li><a href="#enable-plugin">Enable plugin</a></li><li><a
href="#disable-plugin">Disable plugin</a></li></ul></li><li><a
href="#how-to-set-the-tcp-server-address">How to set the TCP server address<
[...]
+ document.addEventListener('keyup', function(e) {
+ if (e.target !== document.body) {
+ return;
+ }
+ // keyCode for '/' (slash)
+ if (e.keyCode === 191) {
+ const search =
document.getElementById('search_input_react');
+ search && search.focus();
+ }
+ });
+ </script><script>
+ var search = docsearch({
+ appId: 'ZHVP417Y1Y',
+ apiKey: '79e72fedcf3719ba85c552f710ade8a3',
+ indexName: 'apache-apisix-website',
+ inputSelector: '#search_input_react'
+ });
+ </script></body></html>
\ No newline at end of file
diff --git a/apisix/plugins/error-log-logger/index.html
b/apisix/plugins/error-log-logger/index.html
new file mode 100644
index 0000000..b567494
--- /dev/null
+++ b/apisix/plugins/error-log-logger/index.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta
http-equiv="X-UA-Compatible"
content="IE=edge"/><title>apisix/plugins/error-log-logger · Apache
APISIX™</title><meta name="viewport" content="width=device-width"/><meta
name="generator" content="Docusaurus"/><meta name="description"
content="<!--"/><meta name="docsearch:language" content="en"/><meta
property="og:title" content="apisix/plugins/error-log-logger · Apache
APISIX™"/><meta property="og:type" content="website" [...]
+ document.addEventListener('DOMContentLoaded', function() {
+ addBackToTop(
+ {"zIndex":100}
+ )
+ });
+ </script><script src="/js/scrollSpy.js"></script><link
rel="stylesheet" href="/css/main.css"/><script
src="/js/codetabs.js"></script></head><body class="sideNavVisible
separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper
wrapper"><header><a href="/"><img class="logo" src="/img/logo.png" alt="Apache
APISIX™"/><h2 class="headerTitleWithLogo">Apache APISIX™</h2></a><div
class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul
class="nav-site n [...]
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+<ul>
+<li><a href="/apisix/zh-cn/plugins/error-log-logger">中文</a></li>
+</ul>
+<h1><a class="anchor" aria-hidden="true" id="summary"></a><a href="#summary"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1- [...]
+<ul>
+<li><a href="#name"><strong>Name</strong></a></li>
+<li><a href="#attributes"><strong>Attributes</strong></a></li>
+<li><a href="#how-to-enable-and-disable"><strong>How To Enable And
Disable</strong></a></li>
+<li><a href="#how-to-update"><strong>How To Update</strong></a></li>
+</ul>
+<h2><a class="anchor" aria-hidden="true" id="name"></a><a href="#name"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
+<p><code>error-log-logger</code> is a plugin which pushes the log data of
APISIX's error.log to TCP servers.</p>
+<p>This plugin will provide the ability to send the log data which selected by
the level to Monitoring tools and other TCP servers.</p>
+<p>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.</p>
+<p>For more info on Batch-Processor in Apache APISIX please refer.
+<a href="/apisix/batch-processor">Batch-Processor</a></p>
+<h2><a class="anchor" aria-hidden="true" id="attributes"></a><a
href="#attributes" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1
[...]
+<table>
+<thead>
+<tr><th>Name</th><th>Type</th><th>Requirement</th><th>Default</th><th>Valid</th><th>Description</th></tr>
+</thead>
+<tbody>
+<tr><td>host</td><td>string</td><td>required</td><td></td><td></td><td>IP
address or the Hostname of the TCP server.</td></tr>
+<tr><td>port</td><td>integer</td><td>required</td><td></td><td>[0,...]</td><td>Target
upstream port.</td></tr>
+<tr><td>timeout</td><td>integer</td><td>optional</td><td>3</td><td>[1,...]</td><td>Timeout
for the upstream to connect and send, unit: second.</td></tr>
+<tr><td>keepalive</td><td>integer</td><td>optional</td><td>30</td><td>[1,...]</td><td>Time
for keeping the cosocket alive, unit: second.</td></tr>
+<tr><td>level</td><td>string</td><td>optional</td><td>WARN</td><td></td><td>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.</td></tr>
+<tr><td>tls</td><td>boolean</td><td>optional</td><td>false</td><td></td><td>Control
whether to perform SSL verification</td></tr>
+<tr><td>tls_server_name</td><td>string</td><td>optional</td><td></td><td></td><td>The
server name for the new TLS extension SNI</td></tr>
+<tr><td>batch_max_size</td><td>integer</td><td>optional</td><td>1000</td><td>[1,...]</td><td>Max
size of each batch</td></tr>
+<tr><td>inactive_timeout</td><td>integer</td><td>optional</td><td>3</td><td>[1,...]</td><td>Maximum
age in seconds when the buffer will be flushed if inactive</td></tr>
+<tr><td>buffer_duration</td><td>integer</td><td>optional</td><td>60</td><td>[1,...]</td><td>Maximum
age in seconds of the oldest entry in a batch before the batch must be
processed</td></tr>
+<tr><td>max_retry_count</td><td>integer</td><td>optional</td><td>0</td><td>[0,...]</td><td>Maximum
number of retries before removing from the processing pipe line</td></tr>
+<tr><td>retry_delay</td><td>integer</td><td>optional</td><td>1</td><td>[0,...]</td><td>Number
of seconds the process execution should be delayed if the execution
fails</td></tr>
+</tbody>
+</table>
+<h2><a class="anchor" aria-hidden="true" id="how-to-enable-and-disable"></a><a
href="#how-to-enable-and-disable" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c [...]
+<p>The error-log-logger is a global plugin of APISIX.</p>
+<h3><a class="anchor" aria-hidden="true" id="enable-plugin"></a><a
href="#enable-plugin" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>Enable the plug-in <code>error-log-logger</code> in
<code>conf/config.yaml</code>, then this plugin can work fine.
+It does not need to be bound in any route or service.</p>
+<p>Here is an example of <code>conf/config.yaml</code>:</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugins:</span> <span
class="hljs-comment"># plugin list</span>
+ <span class="hljs-string">...</span> <span class="hljs-string">...</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">request-id</span>
+ <span class="hljs-bullet">-</span> <span class="hljs-string">hmac-auth</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">api-breaker</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">error-log-logger</span> <span
class="hljs-comment"># enable plugin `error-log-logger</span>
+</code></pre>
+<h3><a class="anchor" aria-hidden="true" id="disable-plugin"></a><a
href="#disable-plugin" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
+<p>Remove or comment out the plugin <code>error-log-logger</code> from
<code>conf/config.yaml</code>.</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugins:</span> <span
class="hljs-comment"># plugin list</span>
+ <span class="hljs-string">...</span> <span class="hljs-string">...</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">request-id</span>
+ <span class="hljs-bullet">-</span> <span class="hljs-string">hmac-auth</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">api-breaker</span>
+ <span class="hljs-comment">#- error-log-logger # enable plugin
`error-log-logger</span>
+</code></pre>
+<h2><a class="anchor" aria-hidden="true"
id="how-to-set-the-tcp-server-address"></a><a
href="#how-to-set-the-tcp-server-address" aria-hidden="true"
class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16"
version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4
9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S1 [...]
+<p>Step: update the attributes of the plugin</p>
+<pre><code class="hljs css language-shell">curl
http://127.0.0.1:9080//apisix/admin/plugin_metadata/error-log-logger -H
'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+ "host": "127.0.0.1",
+ "port": 1999,
+ "inactive_timeout": 1
+}'
+</code></pre>
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#name">Name</a></li><li><a href="#attributes">Attributes</a></li><li><a
href="#how-to-enable-and-disable">How To Enable And Disable</a><ul
class="toc-headings"><li><a href="#enable-plugin">Enable plugin</a></li><li><a
href="#disable-plugin">Disable plugin</a></li></ul></li><li><a
href="#how-to-set-the-tcp-server-address">How to set the TCP server address<
[...]
+ document.addEventListener('keyup', function(e) {
+ if (e.target !== document.body) {
+ return;
+ }
+ // keyCode for '/' (slash)
+ if (e.keyCode === 191) {
+ const search =
document.getElementById('search_input_react');
+ search && search.focus();
+ }
+ });
+ </script><script>
+ var search = docsearch({
+ appId: 'ZHVP417Y1Y',
+ apiKey: '79e72fedcf3719ba85c552f710ade8a3',
+ indexName: 'apache-apisix-website',
+ inputSelector: '#search_input_react'
+ });
+ </script></body></html>
\ No newline at end of file
diff --git a/apisix/plugins/prometheus.html b/apisix/plugins/prometheus.html
index d937922..077c9fc 100644
--- a/apisix/plugins/prometheus.html
+++ b/apisix/plugins/prometheus.html
@@ -70,6 +70,21 @@ these metric data.</p>
<p>And we can check the status at prometheus console:</p>
<p><img src="https://apisix.apache.org/images/plugin/prometheus01.png"
alt=""></p>
<p><img src="https://apisix.apache.org/images/plugin/prometheus02.png"
alt=""></p>
+<h2><a class="anchor" aria-hidden="true" id="how-to-specify-export-uri"></a><a
href="#how-to-specify-export-uri" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c [...]
+<p>We can change the default export uri in the <code>plugin_attr</code>
section of <code>conf/config.yaml</code>.</p>
+<table>
+<thead>
+<tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr>
+</thead>
+<tbody>
+<tr><td>export_uri</td><td>string</td><td>"/apisix/prometheus/metrics"</td><td>uri
to get the prometheus metrics</td></tr>
+</tbody>
+</table>
+<p>Here is an example:</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugin_attr:</span>
+ <span class="hljs-attr">prometheus:</span>
+ <span class="hljs-attr">export_uri:</span> <span
class="hljs-string">/apisix/metrics</span>
+</code></pre>
<h3><a class="anchor" aria-hidden="true" id="grafana-dashboard"></a><a
href="#grafana-dashboard" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<p>Metrics exported by the plugin can be graphed in Grafana using a drop in
dashboard.</p>
<p>Downloads <a href="../json/apisix-grafana-dashboard.json">Grafana dashboard
meta</a> and imports it to Grafana。</p>
@@ -130,7 +145,7 @@ APISIX plugins are hot-reloaded, therefore no need to
restart APISIX.</p>
}
}'
</code></pre>
-</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#attributes">Attributes</a></li><li><a href="#api">API</a></li><li><a
href="#how-to-enable-it">How to enable it</a></li><li><a
href="#how-to-fetch-the-metric-data">How to fetch the metric data</a><ul
class="toc-headings"><li><a href="#grafana-dashboard">Grafana
dashboard</a></li><li><a href="#available-metrics">Available
metrics</a></li></ul></li><li><a h [...]
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#attributes">Attributes</a></li><li><a href="#api">API</a></li><li><a
href="#how-to-enable-it">How to enable it</a></li><li><a
href="#how-to-fetch-the-metric-data">How to fetch the metric
data</a></li><li><a href="#how-to-specify-export-uri">How to specify export
uri</a><ul class="toc-headings"><li><a href="#grafana-dashboard">Grafana
dashboard</a></li><l [...]
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
diff --git a/apisix/plugins/prometheus/index.html
b/apisix/plugins/prometheus/index.html
index d937922..077c9fc 100644
--- a/apisix/plugins/prometheus/index.html
+++ b/apisix/plugins/prometheus/index.html
@@ -70,6 +70,21 @@ these metric data.</p>
<p>And we can check the status at prometheus console:</p>
<p><img src="https://apisix.apache.org/images/plugin/prometheus01.png"
alt=""></p>
<p><img src="https://apisix.apache.org/images/plugin/prometheus02.png"
alt=""></p>
+<h2><a class="anchor" aria-hidden="true" id="how-to-specify-export-uri"></a><a
href="#how-to-specify-export-uri" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c [...]
+<p>We can change the default export uri in the <code>plugin_attr</code>
section of <code>conf/config.yaml</code>.</p>
+<table>
+<thead>
+<tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr>
+</thead>
+<tbody>
+<tr><td>export_uri</td><td>string</td><td>"/apisix/prometheus/metrics"</td><td>uri
to get the prometheus metrics</td></tr>
+</tbody>
+</table>
+<p>Here is an example:</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugin_attr:</span>
+ <span class="hljs-attr">prometheus:</span>
+ <span class="hljs-attr">export_uri:</span> <span
class="hljs-string">/apisix/metrics</span>
+</code></pre>
<h3><a class="anchor" aria-hidden="true" id="grafana-dashboard"></a><a
href="#grafana-dashboard" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<p>Metrics exported by the plugin can be graphed in Grafana using a drop in
dashboard.</p>
<p>Downloads <a href="../json/apisix-grafana-dashboard.json">Grafana dashboard
meta</a> and imports it to Grafana。</p>
@@ -130,7 +145,7 @@ APISIX plugins are hot-reloaded, therefore no need to
restart APISIX.</p>
}
}'
</code></pre>
-</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#attributes">Attributes</a></li><li><a href="#api">API</a></li><li><a
href="#how-to-enable-it">How to enable it</a></li><li><a
href="#how-to-fetch-the-metric-data">How to fetch the metric data</a><ul
class="toc-headings"><li><a href="#grafana-dashboard">Grafana
dashboard</a></li><li><a href="#available-metrics">Available
metrics</a></li></ul></li><li><a h [...]
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#attributes">Attributes</a></li><li><a href="#api">API</a></li><li><a
href="#how-to-enable-it">How to enable it</a></li><li><a
href="#how-to-fetch-the-metric-data">How to fetch the metric
data</a></li><li><a href="#how-to-specify-export-uri">How to specify export
uri</a><ul class="toc-headings"><li><a href="#grafana-dashboard">Grafana
dashboard</a></li><l [...]
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
diff --git a/apisix/zh-cn/plugins/error-log-logger.html
b/apisix/zh-cn/plugins/error-log-logger.html
new file mode 100644
index 0000000..ad4cf13
--- /dev/null
+++ b/apisix/zh-cn/plugins/error-log-logger.html
@@ -0,0 +1,109 @@
+<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta
http-equiv="X-UA-Compatible"
content="IE=edge"/><title>apisix/zh-cn/plugins/error-log-logger · Apache
APISIX™</title><meta name="viewport" content="width=device-width"/><meta
name="generator" content="Docusaurus"/><meta name="description"
content="<!--"/><meta name="docsearch:language" content="en"/><meta
property="og:title" content="apisix/zh-cn/plugins/error-log-logger · Apache
APISIX™"/><meta property="og:type" conte [...]
+ document.addEventListener('DOMContentLoaded', function() {
+ addBackToTop(
+ {"zIndex":100}
+ )
+ });
+ </script><script src="/js/scrollSpy.js"></script><link
rel="stylesheet" href="/css/main.css"/><script
src="/js/codetabs.js"></script></head><body class="sideNavVisible
separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper
wrapper"><header><a href="/"><img class="logo" src="/img/logo.png" alt="Apache
APISIX™"/><h2 class="headerTitleWithLogo">Apache APISIX™</h2></a><div
class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul
class="nav-site n [...]
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+<ul>
+<li><a href="/apisix/plugins/error-log-logger">English</a></li>
+</ul>
+<h1><a class="anchor" aria-hidden="true" id="摘要"></a><a href="#摘要"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
+<ul>
+<li><a href="#定义"><strong>定义</strong></a></li>
+<li><a href="#属性列表"><strong>属性列表</strong></a></li>
+<li><a href="#如何开启和禁用"><strong>如何开启和禁用</strong></a></li>
+<li><a href="#如何更新"><strong>如何更新</strong></a></li>
+</ul>
+<h2><a class="anchor" aria-hidden="true" id="定义"></a><a href="#定义"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
+<p><code>error-log-logger</code> 是用于按用户设定的 log 级别对 APISIX 的 error.log
进行筛选,继而将筛选的数据发送到 TCP 服务的插件。</p>
+<p>以实现将 error.log 中的数据进行筛选并发送到监控工具或其它 TCP 服务的能力。</p>
+<p>该插件提供了将日志数据作为批处理推送到外部 TCP
服务器的功能。如果您没有收到日志数据,请放心一些时间,它会在我们的批处理处理器中的计时器功能到期后自动发送日志。</p>
+<p>有关 Apache APISIX 中 Batch-Processor 的更多信息,请参考。
+<a href="/apisix/zh-cn/batch-processor">Batch-Processor</a></p>
+<h2><a class="anchor" aria-hidden="true" id="属性列表"></a><a href="#属性列表"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
+<table>
+<thead>
+<tr><th>名称</th><th>类型</th><th>必选项</th><th>默认值</th><th>有效值</th><th>描述</th></tr>
+</thead>
+<tbody>
+<tr><td>host</td><td>string</td><td>必须</td><td></td><td></td><td>TCP
服务的IP地址或主机名</td></tr>
+<tr><td>port</td><td>integer</td><td>必须</td><td></td><td>[0,...]</td><td>目标端口</td></tr>
+<tr><td>timeout</td><td>integer</td><td>可选</td><td>3</td><td>[1,...]</td><td>连接和发送数据超时间(以秒为单位)</td></tr>
+<tr><td>keepalive</td><td>integer</td><td>可选</td><td>30</td><td>[1,...]</td><td>复用连接时,连接保持的时间(以秒为单位)</td></tr>
+<tr><td>level</td><td>string</td><td>可选</td><td>WARN</td><td></td><td>进行错误日志筛选的级别,缺省WARN,取值["STDERR",
"EMERG", "ALERT", "CRIT", "ERR",
"ERROR", "WARN", "NOTICE", "INFO",
"DEBUG"],其中 ERR 与 ERROR 级别一致</td></tr>
+<tr><td>tls</td><td>boolean</td><td>可选</td><td>false</td><td></td><td>用于控制是否执行SSL验证</td></tr>
+<tr><td>tls_server_name</td><td>string</td><td>可选</td><td></td><td></td><td>TLS
服务名称标记</td></tr>
+<tr><td>inactive_timeout</td><td>integer</td><td>可选</td><td>3</td><td>[1,...]</td><td>刷新缓冲区的最大时间(以秒为单位)</td></tr>
+<tr><td>batch_max_size</td><td>integer</td><td>可选</td><td>1000</td><td>[1,...]</td><td>每批的最大大小</td></tr>
+<tr><td>buffer_duration</td><td>integer</td><td>可选</td><td>60</td><td>[1,...]</td><td>必须先处理批次中最旧条目的最长期限(以秒为单位)</td></tr>
+<tr><td>max_retry_count</td><td>integer</td><td>可选</td><td>0</td><td>[0,...]</td><td>从处理管道中移除之前的最大重试次数</td></tr>
+<tr><td>retry_delay</td><td>integer</td><td>可选</td><td>1</td><td>[0,...]</td><td>如果执行失败,则应延迟执行流程的秒数</td></tr>
+</tbody>
+</table>
+<h2><a class="anchor" aria-hidden="true" id="如何开启和禁用"></a><a href="#如何开启和禁用"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1- [...]
+<p>本插件属于 APISIX 全局性插件。</p>
+<h3><a class="anchor" aria-hidden="true" id="开启插件"></a><a href="#开启插件"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
+<p>在 <code>conf/config.yaml</code> 中启用插件 <code>error-log-logger</code>
即可,不需要在任何 route 或 service 中绑定。
+下面是一个在<code>conf/config.yaml</code> 中添加插件信息的例子:</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugins:</span> <span
class="hljs-comment"># plugin list</span>
+ <span class="hljs-string">...</span> <span class="hljs-string">...</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">request-id</span>
+ <span class="hljs-bullet">-</span> <span class="hljs-string">hmac-auth</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">api-breaker</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">error-log-logger</span> <span
class="hljs-comment"># enable plugin `error-log-logger</span>
+</code></pre>
+<h3><a class="anchor" aria-hidden="true" id="禁用插件"></a><a href="#禁用插件"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
+<p>在 <code>conf/config.yaml</code> 中删除或注释掉插件
<code>error-log-logger</code>即可。</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugins:</span> <span
class="hljs-comment"># plugin list</span>
+ <span class="hljs-string">...</span> <span class="hljs-string">...</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">request-id</span>
+ <span class="hljs-bullet">-</span> <span class="hljs-string">hmac-auth</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">api-breaker</span>
+ <span class="hljs-comment">#- error-log-logger # enable plugin
`error-log-logger</span>
+</code></pre>
+<h2><a class="anchor" aria-hidden="true" id="如何设置接收日志的-tcp-服务器"></a><a
href="#如何设置接收日志的-tcp-服务器" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
+<p>步骤:更新插件属性</p>
+<pre><code class="hljs css language-shell">curl
http://127.0.0.1:9080//apisix/admin/plugin_metadata/error-log-logger -H
'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+ "host": "127.0.0.1",
+ "port": 1999,
+ "inactive_timeout": 1
+}'
+</code></pre>
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#定义">定义</a></li><li><a
href="#属性列表">属性列表</a></li><li><a href="#如何开启和禁用">如何开启和禁用</a><ul
class="toc-headings"><li><a href="#开启插件">开启插件</a></li><li><a
href="#禁用插件">禁用插件</a></li></ul></li><li><a href="#如何设置接收日志的-tcp-服务器">如何设置接收日志的
TCP 服务器</a></li></ul></nav></div><footer class="nav-footer"
id="footer"><section class="sitemap"><a href="/" class="nav-home"></a> [...]
+ document.addEventListener('keyup', function(e) {
+ if (e.target !== document.body) {
+ return;
+ }
+ // keyCode for '/' (slash)
+ if (e.keyCode === 191) {
+ const search =
document.getElementById('search_input_react');
+ search && search.focus();
+ }
+ });
+ </script><script>
+ var search = docsearch({
+ appId: 'ZHVP417Y1Y',
+ apiKey: '79e72fedcf3719ba85c552f710ade8a3',
+ indexName: 'apache-apisix-website',
+ inputSelector: '#search_input_react'
+ });
+ </script></body></html>
\ No newline at end of file
diff --git a/apisix/zh-cn/plugins/error-log-logger/index.html
b/apisix/zh-cn/plugins/error-log-logger/index.html
new file mode 100644
index 0000000..ad4cf13
--- /dev/null
+++ b/apisix/zh-cn/plugins/error-log-logger/index.html
@@ -0,0 +1,109 @@
+<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta
http-equiv="X-UA-Compatible"
content="IE=edge"/><title>apisix/zh-cn/plugins/error-log-logger · Apache
APISIX™</title><meta name="viewport" content="width=device-width"/><meta
name="generator" content="Docusaurus"/><meta name="description"
content="<!--"/><meta name="docsearch:language" content="en"/><meta
property="og:title" content="apisix/zh-cn/plugins/error-log-logger · Apache
APISIX™"/><meta property="og:type" conte [...]
+ document.addEventListener('DOMContentLoaded', function() {
+ addBackToTop(
+ {"zIndex":100}
+ )
+ });
+ </script><script src="/js/scrollSpy.js"></script><link
rel="stylesheet" href="/css/main.css"/><script
src="/js/codetabs.js"></script></head><body class="sideNavVisible
separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper
wrapper"><header><a href="/"><img class="logo" src="/img/logo.png" alt="Apache
APISIX™"/><h2 class="headerTitleWithLogo">Apache APISIX™</h2></a><div
class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul
class="nav-site n [...]
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+<ul>
+<li><a href="/apisix/plugins/error-log-logger">English</a></li>
+</ul>
+<h1><a class="anchor" aria-hidden="true" id="摘要"></a><a href="#摘要"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
+<ul>
+<li><a href="#定义"><strong>定义</strong></a></li>
+<li><a href="#属性列表"><strong>属性列表</strong></a></li>
+<li><a href="#如何开启和禁用"><strong>如何开启和禁用</strong></a></li>
+<li><a href="#如何更新"><strong>如何更新</strong></a></li>
+</ul>
+<h2><a class="anchor" aria-hidden="true" id="定义"></a><a href="#定义"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
+<p><code>error-log-logger</code> 是用于按用户设定的 log 级别对 APISIX 的 error.log
进行筛选,继而将筛选的数据发送到 TCP 服务的插件。</p>
+<p>以实现将 error.log 中的数据进行筛选并发送到监控工具或其它 TCP 服务的能力。</p>
+<p>该插件提供了将日志数据作为批处理推送到外部 TCP
服务器的功能。如果您没有收到日志数据,请放心一些时间,它会在我们的批处理处理器中的计时器功能到期后自动发送日志。</p>
+<p>有关 Apache APISIX 中 Batch-Processor 的更多信息,请参考。
+<a href="/apisix/zh-cn/batch-processor">Batch-Processor</a></p>
+<h2><a class="anchor" aria-hidden="true" id="属性列表"></a><a href="#属性列表"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
+<table>
+<thead>
+<tr><th>名称</th><th>类型</th><th>必选项</th><th>默认值</th><th>有效值</th><th>描述</th></tr>
+</thead>
+<tbody>
+<tr><td>host</td><td>string</td><td>必须</td><td></td><td></td><td>TCP
服务的IP地址或主机名</td></tr>
+<tr><td>port</td><td>integer</td><td>必须</td><td></td><td>[0,...]</td><td>目标端口</td></tr>
+<tr><td>timeout</td><td>integer</td><td>可选</td><td>3</td><td>[1,...]</td><td>连接和发送数据超时间(以秒为单位)</td></tr>
+<tr><td>keepalive</td><td>integer</td><td>可选</td><td>30</td><td>[1,...]</td><td>复用连接时,连接保持的时间(以秒为单位)</td></tr>
+<tr><td>level</td><td>string</td><td>可选</td><td>WARN</td><td></td><td>进行错误日志筛选的级别,缺省WARN,取值["STDERR",
"EMERG", "ALERT", "CRIT", "ERR",
"ERROR", "WARN", "NOTICE", "INFO",
"DEBUG"],其中 ERR 与 ERROR 级别一致</td></tr>
+<tr><td>tls</td><td>boolean</td><td>可选</td><td>false</td><td></td><td>用于控制是否执行SSL验证</td></tr>
+<tr><td>tls_server_name</td><td>string</td><td>可选</td><td></td><td></td><td>TLS
服务名称标记</td></tr>
+<tr><td>inactive_timeout</td><td>integer</td><td>可选</td><td>3</td><td>[1,...]</td><td>刷新缓冲区的最大时间(以秒为单位)</td></tr>
+<tr><td>batch_max_size</td><td>integer</td><td>可选</td><td>1000</td><td>[1,...]</td><td>每批的最大大小</td></tr>
+<tr><td>buffer_duration</td><td>integer</td><td>可选</td><td>60</td><td>[1,...]</td><td>必须先处理批次中最旧条目的最长期限(以秒为单位)</td></tr>
+<tr><td>max_retry_count</td><td>integer</td><td>可选</td><td>0</td><td>[0,...]</td><td>从处理管道中移除之前的最大重试次数</td></tr>
+<tr><td>retry_delay</td><td>integer</td><td>可选</td><td>1</td><td>[0,...]</td><td>如果执行失败,则应延迟执行流程的秒数</td></tr>
+</tbody>
+</table>
+<h2><a class="anchor" aria-hidden="true" id="如何开启和禁用"></a><a href="#如何开启和禁用"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1- [...]
+<p>本插件属于 APISIX 全局性插件。</p>
+<h3><a class="anchor" aria-hidden="true" id="开启插件"></a><a href="#开启插件"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
+<p>在 <code>conf/config.yaml</code> 中启用插件 <code>error-log-logger</code>
即可,不需要在任何 route 或 service 中绑定。
+下面是一个在<code>conf/config.yaml</code> 中添加插件信息的例子:</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugins:</span> <span
class="hljs-comment"># plugin list</span>
+ <span class="hljs-string">...</span> <span class="hljs-string">...</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">request-id</span>
+ <span class="hljs-bullet">-</span> <span class="hljs-string">hmac-auth</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">api-breaker</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">error-log-logger</span> <span
class="hljs-comment"># enable plugin `error-log-logger</span>
+</code></pre>
+<h3><a class="anchor" aria-hidden="true" id="禁用插件"></a><a href="#禁用插件"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
+<p>在 <code>conf/config.yaml</code> 中删除或注释掉插件
<code>error-log-logger</code>即可。</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugins:</span> <span
class="hljs-comment"># plugin list</span>
+ <span class="hljs-string">...</span> <span class="hljs-string">...</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">request-id</span>
+ <span class="hljs-bullet">-</span> <span class="hljs-string">hmac-auth</span>
+ <span class="hljs-bullet">-</span> <span
class="hljs-string">api-breaker</span>
+ <span class="hljs-comment">#- error-log-logger # enable plugin
`error-log-logger</span>
+</code></pre>
+<h2><a class="anchor" aria-hidden="true" id="如何设置接收日志的-tcp-服务器"></a><a
href="#如何设置接收日志的-tcp-服务器" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
+<p>步骤:更新插件属性</p>
+<pre><code class="hljs css language-shell">curl
http://127.0.0.1:9080//apisix/admin/plugin_metadata/error-log-logger -H
'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+ "host": "127.0.0.1",
+ "port": 1999,
+ "inactive_timeout": 1
+}'
+</code></pre>
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#定义">定义</a></li><li><a
href="#属性列表">属性列表</a></li><li><a href="#如何开启和禁用">如何开启和禁用</a><ul
class="toc-headings"><li><a href="#开启插件">开启插件</a></li><li><a
href="#禁用插件">禁用插件</a></li></ul></li><li><a href="#如何设置接收日志的-tcp-服务器">如何设置接收日志的
TCP 服务器</a></li></ul></nav></div><footer class="nav-footer"
id="footer"><section class="sitemap"><a href="/" class="nav-home"></a> [...]
+ document.addEventListener('keyup', function(e) {
+ if (e.target !== document.body) {
+ return;
+ }
+ // keyCode for '/' (slash)
+ if (e.keyCode === 191) {
+ const search =
document.getElementById('search_input_react');
+ search && search.focus();
+ }
+ });
+ </script><script>
+ var search = docsearch({
+ appId: 'ZHVP417Y1Y',
+ apiKey: '79e72fedcf3719ba85c552f710ade8a3',
+ indexName: 'apache-apisix-website',
+ inputSelector: '#search_input_react'
+ });
+ </script></body></html>
\ No newline at end of file
diff --git a/apisix/zh-cn/plugins/prometheus.html
b/apisix/zh-cn/plugins/prometheus.html
index 523f744..2bc6869 100644
--- a/apisix/zh-cn/plugins/prometheus.html
+++ b/apisix/zh-cn/plugins/prometheus.html
@@ -68,6 +68,21 @@
<p>我们也可以在 prometheus 控制台中去检查状态:</p>
<p><img src="https://apisix.apache.org/images/plugin/prometheus01.png"
alt=""></p>
<p><img src="https://apisix.apache.org/images/plugin/prometheus02.png"
alt=""></p>
+<h2><a class="anchor" aria-hidden="true" id="如何修改暴露指标的uri"></a><a
href="#如何修改暴露指标的uri" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83. [...]
+<p>我们可以在 <code>conf/config.yaml</code> 的 <code>plugin_attr</code> 修改默认的uri</p>
+<table>
+<thead>
+<tr><th>名称</th><th>类型</th><th>默认值</th><th>描述</th></tr>
+</thead>
+<tbody>
+<tr><td>export_uri</td><td>string</td><td>"/apisix/prometheus/metrics"</td><td>暴露指标的uri</td></tr>
+</tbody>
+</table>
+<p>配置示例:</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugin_attr:</span>
+ <span class="hljs-attr">prometheus:</span>
+ <span class="hljs-attr">export_uri:</span> <span
class="hljs-string">/apisix/metrics</span>
+</code></pre>
<h3><a class="anchor" aria-hidden="true" id="grafana-面板"></a><a
href="#grafana-面板" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1
[...]
<p>插件导出的指标可以在 Grafana 进行图形化绘制显示。</p>
<p>下载 <a href="../../json/apisix-grafana-dashboard.json">Grafana dashboard
元数据</a> 并导入到 Grafana 中。</p>
@@ -127,7 +142,7 @@ apisix_nginx_metric_errors_total <span
class="hljs-number">0</span>
}
}'
</code></pre>
-</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#属性">属性</a></li><li><a
href="#接口">接口</a></li><li><a href="#如何开启插件">如何开启插件</a></li><li><a
href="#如何提取指标数据">如何提取指标数据</a><ul class="toc-headings"><li><a
href="#grafana-面板">Grafana 面板</a></li><li><a
href="#可有的指标">可有的指标</a></li></ul></li><li><a
href="#禁用插件">禁用插件</a></li></ul></nav></div><footer class="nav-footer"
id="footer"><section class="sitemap"><a href="/ [...]
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#属性">属性</a></li><li><a
href="#接口">接口</a></li><li><a href="#如何开启插件">如何开启插件</a></li><li><a
href="#如何提取指标数据">如何提取指标数据</a></li><li><a
href="#如何修改暴露指标的uri">如何修改暴露指标的uri</a><ul class="toc-headings"><li><a
href="#grafana-面板">Grafana 面板</a></li><li><a
href="#可有的指标">可有的指标</a></li></ul></li><li><a
href="#禁用插件">禁用插件</a></li></ul></nav></div><footer class="nav-footer [...]
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
diff --git a/apisix/zh-cn/plugins/prometheus/index.html
b/apisix/zh-cn/plugins/prometheus/index.html
index 523f744..2bc6869 100644
--- a/apisix/zh-cn/plugins/prometheus/index.html
+++ b/apisix/zh-cn/plugins/prometheus/index.html
@@ -68,6 +68,21 @@
<p>我们也可以在 prometheus 控制台中去检查状态:</p>
<p><img src="https://apisix.apache.org/images/plugin/prometheus01.png"
alt=""></p>
<p><img src="https://apisix.apache.org/images/plugin/prometheus02.png"
alt=""></p>
+<h2><a class="anchor" aria-hidden="true" id="如何修改暴露指标的uri"></a><a
href="#如何修改暴露指标的uri" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83. [...]
+<p>我们可以在 <code>conf/config.yaml</code> 的 <code>plugin_attr</code> 修改默认的uri</p>
+<table>
+<thead>
+<tr><th>名称</th><th>类型</th><th>默认值</th><th>描述</th></tr>
+</thead>
+<tbody>
+<tr><td>export_uri</td><td>string</td><td>"/apisix/prometheus/metrics"</td><td>暴露指标的uri</td></tr>
+</tbody>
+</table>
+<p>配置示例:</p>
+<pre><code class="hljs css language-yaml"><span
class="hljs-attr">plugin_attr:</span>
+ <span class="hljs-attr">prometheus:</span>
+ <span class="hljs-attr">export_uri:</span> <span
class="hljs-string">/apisix/metrics</span>
+</code></pre>
<h3><a class="anchor" aria-hidden="true" id="grafana-面板"></a><a
href="#grafana-面板" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1
[...]
<p>插件导出的指标可以在 Grafana 进行图形化绘制显示。</p>
<p>下载 <a href="../../json/apisix-grafana-dashboard.json">Grafana dashboard
元数据</a> 并导入到 Grafana 中。</p>
@@ -127,7 +142,7 @@ apisix_nginx_metric_errors_total <span
class="hljs-number">0</span>
}
}'
</code></pre>
-</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#属性">属性</a></li><li><a
href="#接口">接口</a></li><li><a href="#如何开启插件">如何开启插件</a></li><li><a
href="#如何提取指标数据">如何提取指标数据</a><ul class="toc-headings"><li><a
href="#grafana-面板">Grafana 面板</a></li><li><a
href="#可有的指标">可有的指标</a></li></ul></li><li><a
href="#禁用插件">禁用插件</a></li></ul></nav></div><footer class="nav-footer"
id="footer"><section class="sitemap"><a href="/ [...]
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#属性">属性</a></li><li><a
href="#接口">接口</a></li><li><a href="#如何开启插件">如何开启插件</a></li><li><a
href="#如何提取指标数据">如何提取指标数据</a></li><li><a
href="#如何修改暴露指标的uri">如何修改暴露指标的uri</a><ul class="toc-headings"><li><a
href="#grafana-面板">Grafana 面板</a></li><li><a
href="#可有的指标">可有的指标</a></li></ul></li><li><a
href="#禁用插件">禁用插件</a></li></ul></nav></div><footer class="nav-footer [...]
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
diff --git a/sitemap.xml b/sitemap.xml
index e3a9ef0..8511c8f 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://apisix.apache.org/help</loc><changefreq>weekly</changefreq><priority>0.5</priority><x
[...]
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://apisix.apache.org/help</loc><changefreq>weekly</changefreq><priority>0.5</priority><x
[...]
\ No newline at end of file