From d32308586cf38945d1f7bf0d4bf12faac2d2b853 Mon Sep 17 00:00:00 2001 From: henryzhx8 Date: Tue, 28 Mar 2023 09:27:44 +0000 Subject: [PATCH 1/2] improve doc --- docs/cn/SUMMARY.md | 3 ++- .../{elasticsearch.md => flusher-elasticsearch.md} | 2 +- .../cn/data-pipeline/processor/processor-cloudmeta.md | 6 +++++- docs/cn/data-pipeline/processor/processor-regex.md | 11 +++++++---- .../processor/processor-split-log-regex.md | 10 +++++++--- 5 files changed, 22 insertions(+), 10 deletions(-) rename docs/cn/data-pipeline/flusher/{elasticsearch.md => flusher-elasticsearch.md} (99%) diff --git a/docs/cn/SUMMARY.md b/docs/cn/SUMMARY.md index c6f19be947..92b872ae2e 100644 --- a/docs/cn/SUMMARY.md +++ b/docs/cn/SUMMARY.md @@ -71,6 +71,7 @@ * [分隔符](data-pipeline/processor/processor-delimiter.md) * [键值对](data-pipeline/processor/processor-split-key-value.md) * [多行切分](data-pipeline/processor/processor-split-log-regex.md) + * [云平台元数据](data-pipeline/processor/processor-cloudmeta.md) * [聚合](data-pipeline/aggregator/README.md) * [基础](data-pipeline/aggregator/aggregator-base.md) * [上下文](data-pipeline/aggregator/aggregator-context.md) @@ -83,7 +84,7 @@ * [ElasticSearch](data-pipeline/flusher/flusher-elasticsearch.md) * [SLS](data-pipeline/flusher/flusher-sls.md) * [标准输出/文件](data-pipeline/flusher/flusher-stdout.md) - * [OTLP日志](data-pipeline/flusher/flusher-otlp-log.md) + * [OTLP日志](data-pipeline/flusher/flusher-otlp.md) * [Pulsar](data-pipeline/flusher/flusher-pulsar.md) * [HTTP](data-pipeline/flusher/flusher-http.md) * [加速](data-pipeline/accelerator/README.md) diff --git a/docs/cn/data-pipeline/flusher/elasticsearch.md b/docs/cn/data-pipeline/flusher/flusher-elasticsearch.md similarity index 99% rename from docs/cn/data-pipeline/flusher/elasticsearch.md rename to docs/cn/data-pipeline/flusher/flusher-elasticsearch.md index 8e13e563a8..f113d9dc33 100644 --- a/docs/cn/data-pipeline/flusher/elasticsearch.md +++ b/docs/cn/data-pipeline/flusher/flusher-elasticsearch.md @@ -6,7 +6,7 @@ ## 版本 -Alpha +[Alpha](../stability-level.md) ## 配置参数 diff --git a/docs/cn/data-pipeline/processor/processor-cloudmeta.md b/docs/cn/data-pipeline/processor/processor-cloudmeta.md index 31876ff831..4a599bc8e4 100644 --- a/docs/cn/data-pipeline/processor/processor-cloudmeta.md +++ b/docs/cn/data-pipeline/processor/processor-cloudmeta.md @@ -4,6 +4,10 @@ `processor_cloud_meta`插件可以添加为日志增加云平台元数据信息。 +## 版本 + +[Alpha](../stability-level.md) + ## 配置参数 | 参数 | 类型 | 是否必选 | 说明 | @@ -80,7 +84,7 @@ flushers: 2023-03-13 20:42:04 {"content":"{\"a\":{\"b\":{}}}","Index":"6","instance_id_name":"id_xxx","instance_tag_prefix_tag_key":"tag_val","__time__":"1678711324"} } -``` +``` ### json 模式 diff --git a/docs/cn/data-pipeline/processor/processor-regex.md b/docs/cn/data-pipeline/processor/processor-regex.md index ceff4caee0..76849dbf96 100644 --- a/docs/cn/data-pipeline/processor/processor-regex.md +++ b/docs/cn/data-pipeline/processor/processor-regex.md @@ -4,6 +4,10 @@ `processor_regex processor`插件可以通过正则匹配的模式实现文本日志的字段提取。 +## 版本 + +[Stable](../stability-level.md) + ## 配置参数 | 参数 | 类型 | 是否必选 | 说明 | @@ -23,13 +27,13 @@ * 输入 -``` +```bash echo '127.0.0.1 - - [10/Aug/2017:14:57:51 +0800] "POST /PutData?Category=YunOsAccountOpLog" 0.024 18204 200 37 "-" "aliyun-sdk-java"' >> /home/test-log/reg.log ``` * 采集配置 -``` +```yaml enable: true inputs: - Type: file_log @@ -61,7 +65,7 @@ flushers: * 输出 -``` +```json { "__tag__:__path__": "/home/test-log/reg.log", "ip": "127.0.0.1", @@ -77,4 +81,3 @@ flushers: "__time__": "1657362166" } ``` - diff --git a/docs/cn/data-pipeline/processor/processor-split-log-regex.md b/docs/cn/data-pipeline/processor/processor-split-log-regex.md index 9bcbd5d0de..beddaf1420 100644 --- a/docs/cn/data-pipeline/processor/processor-split-log-regex.md +++ b/docs/cn/data-pipeline/processor/processor-split-log-regex.md @@ -5,6 +5,10 @@ `processor_split_log_regex processor`插件实现多行日志(例如Java程序日志)的采集。 备注:该插件必须设置为`processor`的第一个插件。 +## 版本 + +[Stable](../stability-level.md) + ## 配置参数 | 参数 | 类型 | 是否必选 | 说明 | @@ -21,13 +25,13 @@ * 输入 -``` +```bash echo -e '[2022-03-03 18:00:00] xxx1\nyyyyy\nzzzzzz\n[2022-03-03 18:00:01] xxx2\nyyyyy\nzzzzzz' >> /home/test-log/multiline.log ``` * 采集配置 -``` +```yaml enable: true inputs: - Type: file_log @@ -49,7 +53,7 @@ flushers: * 输出 -``` +```json { "__tag__:__path__": "/home/test-log/multiline.log", "content": "[2022-03-03 18:00:00] xxx1\nyyyyy\nzzzzzz\n", From bbfa95afde5b94b8076f352f8f32ebe0b0dc12a6 Mon Sep 17 00:00:00 2001 From: henryzhx8 Date: Fri, 31 Mar 2023 01:55:18 +0000 Subject: [PATCH 2/2] temporarily remove nginx e2e case --- .../behavior/input_nginx/docker-compose.yaml | 29 --------- .../behavior/input_nginx/ilogtail-e2e.yaml | 61 ------------------- .../behavior/input_nginx/nginx_default.conf | 49 --------------- 3 files changed, 139 deletions(-) delete mode 100644 test/case/behavior/input_nginx/docker-compose.yaml delete mode 100644 test/case/behavior/input_nginx/ilogtail-e2e.yaml delete mode 100644 test/case/behavior/input_nginx/nginx_default.conf diff --git a/test/case/behavior/input_nginx/docker-compose.yaml b/test/case/behavior/input_nginx/docker-compose.yaml deleted file mode 100644 index c84f106ce3..0000000000 --- a/test/case/behavior/input_nginx/docker-compose.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2021 iLogtail Authors -# -# Licensed 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. - -version: '3.8' - -services: - nginx: - image: nginx:stable-alpine - hostname: nginx - volumes: - - ./nginx_default.conf:/etc/nginx/conf.d/default.conf - ports: - - "80" - healthcheck: - test: [ "CMD-SHELL", "curl -O /dev/null http://localhost || exit 1" ] - timeout: 5s - interval: 10s - retries: 3 \ No newline at end of file diff --git a/test/case/behavior/input_nginx/ilogtail-e2e.yaml b/test/case/behavior/input_nginx/ilogtail-e2e.yaml deleted file mode 100644 index f6d780e192..0000000000 --- a/test/case/behavior/input_nginx/ilogtail-e2e.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2021 iLogtail Authors -# -# Licensed 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. - -boot: - category: docker-compose -ilogtail: - config: - - name: nginx-case - detail: - - inputs: - - Type: metric_nginx_status - IntervalMs: 1000 - Urls: - - http://nginx/nginx_status - close_wait: 5s - depends_on: - nginx: - condition: service_healthy -trigger: - url: http://nginx/hello - method: GET - interval: 1s - times: 10 -verify: - log_rules: - - name: fields-check - validator: log_fields - spec: - expect_log_fields: - - _server_ - - _port_ - - accepts - - handled - - requests - - reading - - writing - - waiting - - active - system_rules: - - name: counter-check - validator: sys_counter - spec: - expect_equal_raw_log: true - expect_equal_processed_log: true - expect_equal_flush_log: true - expect_received_minimum_log_num: 10 -testing_interval: 15s -retry: - times: 0 - interval: 10s diff --git a/test/case/behavior/input_nginx/nginx_default.conf b/test/case/behavior/input_nginx/nginx_default.conf deleted file mode 100644 index c73c0354cb..0000000000 --- a/test/case/behavior/input_nginx/nginx_default.conf +++ /dev/null @@ -1,49 +0,0 @@ -server { - listen 80; - listen [::]:80; - server_name localhost; - - #access_log /var/log/nginx/host.access.log main; - - location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - - location /nginx_status { - stub_status on; - access_log off; - } - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - #location ~ \.php$ { - # root html; - # fastcgi_pass 127.0.0.1:9000; - # fastcgi_index index.php; - # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - # include fastcgi_params; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} -} \ No newline at end of file