Skip to content

Commit

Permalink
Set short_config option to false by default in Metricbeat (elastic#4038)
Browse files Browse the repository at this point in the history
So far for each new module the configs were added to the short config by default. But by default we didnt want to have it there. So not every module has to add `short_config: false` to each module, short_config is now set to False by default. This will not have any affect except for new modules.

* System module short_config was set to true
* Redis short_config entry was removed as an example
* Update filebeat modules as all modules are in short_config at the moment
* Move config_collector.py to global script directory so all beats can use it
  • Loading branch information
ruflin authored and tsg committed Apr 19, 2017
1 parent 204e43d commit e288cf6
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 14 deletions.
4 changes: 2 additions & 2 deletions filebeat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ modules:
.PHONY: configs
configs: python-env
cat ${ES_BEATS}/filebeat/_meta/common.p1.yml > _meta/beat.yml
. ${PYTHON_ENV}/bin/activate; python ${ES_BEATS}/metricbeat/scripts/config_collector.py --beat ${BEAT_NAME} $(PWD) >> _meta/beat.yml
. ${PYTHON_ENV}/bin/activate; python ${ES_BEATS}/script/config_collector.py --beat ${BEAT_NAME} $(PWD) >> _meta/beat.yml
cat ${ES_BEATS}/filebeat/_meta/common.p2.yml >> _meta/beat.yml
cat ${ES_BEATS}/filebeat/_meta/common.full.p1.yml > _meta/beat.full.yml
. ${PYTHON_ENV}/bin/activate; python ${ES_BEATS}/metricbeat/scripts/config_collector.py --beat ${BEAT_NAME} --full $(PWD) >> _meta/beat.full.yml
. ${PYTHON_ENV}/bin/activate; python ${ES_BEATS}/script/config_collector.py --beat ${BEAT_NAME} --full $(PWD) >> _meta/beat.full.yml
cat ${ES_BEATS}/filebeat/_meta/common.full.p2.yml >> _meta/beat.full.yml

# Collects all module docs
Expand Down
1 change: 1 addition & 0 deletions filebeat/module/apache2/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Apache2"
description: >
Apache2 Module
short_config: true
fields:
- name: apache2
type: group
Expand Down
1 change: 1 addition & 0 deletions filebeat/module/auditd/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Auditd"
description: >
Module for parsing auditd logs.
short_config: true
fields:
- name: auditd
type: group
Expand Down
1 change: 1 addition & 0 deletions filebeat/module/mysql/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "MySQL"
description: >
Module for parsing the MySQL log files.
short_config: true
fields:
- name: mysql
type: group
Expand Down
1 change: 1 addition & 0 deletions filebeat/module/nginx/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Nginx"
description: >
Module for parsing the Nginx log files.
short_config: true
fields:
- name: nginx
type: group
Expand Down
1 change: 1 addition & 0 deletions filebeat/module/system/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "System"
description: >
Module for parsing system log files.
short_config: true
fields:
- name: system
type: group
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ collect-docs: python-env
.PHONY: configs
configs: python-env
cat ${ES_BEATS}/metricbeat/_meta/common.yml > _meta/beat.yml
. ${PYTHON_ENV}/bin/activate; python ${ES_BEATS}/metricbeat/scripts/config_collector.py --beat ${BEAT_NAME} $(PWD) >> _meta/beat.yml
. ${PYTHON_ENV}/bin/activate; python ${ES_BEATS}/script/config_collector.py --beat ${BEAT_NAME} $(PWD) >> _meta/beat.yml
cat ${ES_BEATS}/metricbeat/_meta/common.full.yml > _meta/beat.full.yml
. ${PYTHON_ENV}/bin/activate; python ${ES_BEATS}/metricbeat/scripts/config_collector.py --beat ${BEAT_NAME} --full $(PWD) >> _meta/beat.full.yml
. ${PYTHON_ENV}/bin/activate; python ${ES_BEATS}/script/config_collector.py --beat ${BEAT_NAME} --full $(PWD) >> _meta/beat.full.yml

# Generates imports for all modules and metricsets
.PHONY: imports
Expand Down
8 changes: 0 additions & 8 deletions metricbeat/metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ metricbeat.modules:
period: 10s
processes: ['.*']

#------------------------------- kibana Module -------------------------------
- module: kibana
metricsets: ["status"]
enabled: true
period: 10s
hosts: ["localhost:5601"]




#================================ General =====================================
Expand Down
1 change: 0 additions & 1 deletion metricbeat/module/redis/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: "Redis"
description: >
Redis metrics collected from Redis.
short_config: false
fields:
- name: redis
type: group
Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/system/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "System"
description: >
System status metrics, like CPU and memory usage, that are collected from the operating system.
short_config: true
fields:
- name: system
type: group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def collect(beat_name, beat_path, full=False):
module_configs = beat_path + "/config.yml"

# By default, short config is read if short is set
short_config = True
short_config = False

# Check if full config exists
if full:
Expand Down

0 comments on commit e288cf6

Please sign in to comment.