Skip to content

Commit

Permalink
feat: 采集器支持关闭资源限制 --story=117590519 (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiandongx authored May 22, 2024
1 parent 89ddce2 commit 48c5efd
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ config_templates:
corefile_match_regex:
title: corefile_match_regex
type: string
disable_resource_limit:
title: disable_resource_limit
type: string
- plugin_version: "*"
name: bkmonitorbeat_prometheus.conf
version: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ EOF
EOF
cat <<EOF >> "$path"
resource_limit:
{%- if extra_vars is defined and extra_vars.disable_resource_limit is defined and extra_vars.disable_resource_limit == "true" %}
enabled: false
{%- else %}
enabled: true
cpu: 1 # CPU 资源限制 单位 core(float64)
mem: -1 # 内存资源限制 单位 MB(int),-1 代表无限制
{%- endif %}
EOF
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ logging.backups: 5

# ============================= Resource ==================================
resource_limit:
{%- if extra_vars is defined and extra_vars.disable_resource_limit is defined and extra_vars.disable_resource_limit == "true" %}
enabled: false
{%- else %}
enabled: true
cpu: 1 # CPU 资源限制 单位 core(float64)
mem: -1 # 内存资源限制 单位 MB(int),-1 代表无限制
{%- endif %}

# ================================= Tasks =======================================
bkmonitorbeat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ config_templates:
corefile_match_regex:
title: corefile_match_regex
type: string
disable_resource_limit:
title: disable_resource_limit
type: string
- plugin_version: "*"
name: bkmonitorbeat_prometheus.conf
version: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ logging.backups: 5

# ============================= Resource ==================================
resource_limit:
{%- if extra_vars is defined and extra_vars.disable_resource_limit is defined and extra_vars.disable_resource_limit == "true" %}
enabled: false
{%- else %}
enabled: true
cpu: 1 # CPU 资源限制 单位 core(float64)
mem: -1 # 内存资源限制 单位 MB(int),-1 代表无限制
{%- endif %}

# ================================= Tasks =======================================
bkmonitorbeat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ config_templates:
corefile_match_regex:
title: corefile_match_regex
type: string
disable_resource_limit:
title: disable_resource_limit
type: string
- plugin_version: "*"
name: bkmonitorbeat_prometheus.conf
version: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ logging.backups: 5

# ============================= Resource ==================================
resource_limit:
{%- if extra_vars is defined and extra_vars.disable_resource_limit is defined and extra_vars.disable_resource_limit == "true" %}
enabled: false
{%- else %}
enabled: true
cpu: 1 # CPU 资源限制 单位 core(float64)
mem: -1 # 内存资源限制 单位 MB(int),-1 代表无限制
{%- endif %}

# ================================= Tasks =======================================
bkmonitorbeat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ config_templates:
corefile_match_regex:
title: corefile_match_regex
type: string
disable_resource_limit:
title: disable_resource_limit
type: string
- plugin_version: "*"
name: bkmonitorbeat_prometheus.conf
version: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ logging.backups: 5

# ============================= Resource ==================================
resource_limit:
{%- if extra_vars is defined and extra_vars.disable_resource_limit is defined and extra_vars.disable_resource_limit == "true" %}
enabled: false
{%- else %}
enabled: true
cpu: 1 # CPU 资源限制 单位 core(float64)
mem: -1 # 内存资源限制 单位 MB(int),-1 代表无限制
{%- endif %}

# ================================= Tasks =======================================
bkmonitorbeat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ config_templates:
corefile_match_regex:
title: corefile_match_regex
type: string
disable_resource_limit:
title: disable_resource_limit
type: string
- plugin_version: "*"
name: bkmonitorbeat_prometheus.conf
version: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ logging.backups: 5

# ============================= Resource ==================================
resource_limit:
{%- if extra_vars is defined and extra_vars.disable_resource_limit is defined and extra_vars.disable_resource_limit == "true" %}
enabled: false
{%- else %}
enabled: true
cpu: 1 # CPU 资源限制 单位 core(float64)
mem: -1 # 内存资源限制 单位 MB(int),-1 代表无限制
{%- endif %}

# ================================= Tasks =======================================
bkmonitorbeat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ config_templates:
corefile_match_regex:
title: corefile_match_regex
type: string
disable_resource_limit:
title: disable_resource_limit
type: string
- plugin_version: "*"
name: bkmonitorbeat_prometheus.conf
version: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ logging.backups: 5

# ============================= Resource ==================================
resource_limit:
{%- if extra_vars is defined and extra_vars.disable_resource_limit is defined and extra_vars.disable_resource_limit == "true" %}
enabled: false
{%- else %}
enabled: true
cpu: 1 # CPU 资源限制 单位 core(float64)
mem: -1 # 内存资源限制 单位 MB(int),-1 代表无限制
{%- endif %}

# ================================= Tasks =======================================
bkmonitorbeat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ config_templates:
corefile_match_regex:
title: corefile_match_regex
type: string
disable_resource_limit:
title: disable_resource_limit
type: string
- plugin_version: "*"
name: bkmonitorbeat_prometheus.conf
version: 1
Expand Down

0 comments on commit 48c5efd

Please sign in to comment.