[#1] 修复kibana创建dataview 逻辑
This commit is contained in:
parent
a9281639bf
commit
23a92d7e9c
@ -1,16 +0,0 @@
|
|||||||
$TTL 604800
|
|
||||||
@ IN SOA ns1.argus.com. admin.argus.com. (
|
|
||||||
2 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
|
|
||||||
; 定义 DNS 服务器
|
|
||||||
@ IN NS ns1.argus.com.
|
|
||||||
|
|
||||||
; 定义 ns1 主机
|
|
||||||
ns1 IN A 127.0.0.1
|
|
||||||
|
|
||||||
; 定义 web 指向 12.4.5.6
|
|
||||||
web IN A 22.4.5.6
|
|
@ -1,4 +0,0 @@
|
|||||||
zone "argus.com" {
|
|
||||||
type master;
|
|
||||||
file "/etc/bind/db.argus.com";
|
|
||||||
};
|
|
@ -93,7 +93,7 @@ create_data_views_idempotent() {
|
|||||||
# 创建 train 数据视图
|
# 创建 train 数据视图
|
||||||
if [ "$train_indices" -gt 0 ]; then
|
if [ "$train_indices" -gt 0 ]; then
|
||||||
# 检查数据视图是否已存在
|
# 检查数据视图是否已存在
|
||||||
local train_exists=$(curl -s "$KB_HOST/api/data_views/data_view" -H 'kbn-xsrf: true' 2>/dev/null | grep '"title":"train-\*"' | wc -l || echo "0")
|
local train_exists=$(curl -s "$KB_HOST/api/data_views" -H 'kbn-xsrf: true' 2>/dev/null | grep '"title":"train-\*"' | wc -l )
|
||||||
|
|
||||||
if [ "$train_exists" -eq 0 ]; then
|
if [ "$train_exists" -eq 0 ]; then
|
||||||
echo "[INFO] Creating data view for train-* indices"
|
echo "[INFO] Creating data view for train-* indices"
|
||||||
@ -112,7 +112,7 @@ create_data_views_idempotent() {
|
|||||||
# 创建 infer 数据视图
|
# 创建 infer 数据视图
|
||||||
if [ "$infer_indices" -gt 0 ]; then
|
if [ "$infer_indices" -gt 0 ]; then
|
||||||
# 检查数据视图是否已存在
|
# 检查数据视图是否已存在
|
||||||
local infer_exists=$(curl -s "$KB_HOST/api/data_views/data_view" -H 'kbn-xsrf: true' 2>/dev/null | grep '"title":"infer-\*"' | wc -l || echo "0")
|
local infer_exists=$(curl -s "$KB_HOST/api/data_views" -H 'kbn-xsrf: true' 2>/dev/null | grep '"title":"infer-\*"' | wc -l )
|
||||||
|
|
||||||
if [ "$infer_exists" -eq 0 ]; then
|
if [ "$infer_exists" -eq 0 ]; then
|
||||||
echo "[INFO] Creating data view for infer-* indices"
|
echo "[INFO] Creating data view for infer-* indices"
|
||||||
@ -143,4 +143,4 @@ main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 运行主逻辑
|
# 运行主逻辑
|
||||||
main
|
main
|
||||||
|
Loading…
x
Reference in New Issue
Block a user