From 6d873eb9f6d0be5d800851cbde797405aa915891 Mon Sep 17 00:00:00 2001 From: Peter P Date: Wed, 2 Sep 2020 10:49:57 -0700 Subject: [PATCH] Removed filebeat+metricbeat --- files/elasticsearch_logging/filebeat.service | 18 -------------- .../elasticsearch_logging/metricbeat.service | 18 -------------- manifests/service.pp | 24 ------------------- 3 files changed, 60 deletions(-) delete mode 100644 files/elasticsearch_logging/filebeat.service delete mode 100644 files/elasticsearch_logging/metricbeat.service diff --git a/files/elasticsearch_logging/filebeat.service b/files/elasticsearch_logging/filebeat.service deleted file mode 100644 index 67a0625..0000000 --- a/files/elasticsearch_logging/filebeat.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Filebeat sends log files to Logstash or directly to Elasticsearch. -Documentation=https://www.elastic.co/products/beats/filebeat -Wants=network-online.target -After=network-online.target - -[Service] - -Environment="BEAT_LOG_OPTS=-e" -Environment="BEAT_CONFIG_OPTS=-c /etc/filebeat/filebeat.yml" -Environment="BEAT_PATH_OPTS=-path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat" -ExecStart=/usr/share/filebeat/bin/filebeat $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS -Restart=always -StandardOutput=null -StandardError=null - -[Install] -WantedBy=multi-user.target diff --git a/files/elasticsearch_logging/metricbeat.service b/files/elasticsearch_logging/metricbeat.service deleted file mode 100644 index 2629847..0000000 --- a/files/elasticsearch_logging/metricbeat.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Metricbeat is a lightweight shipper for metrics. -Documentation=https://www.elastic.co/products/beats/metricbeat -Wants=network-online.target -After=network-online.target - -[Service] - -Environment="BEAT_LOG_OPTS=-e" -Environment="BEAT_CONFIG_OPTS=-c /etc/metricbeat/metricbeat.yml" -Environment="BEAT_PATH_OPTS=-path.home /usr/share/metricbeat -path.config /etc/metricbeat -path.data /var/lib/metricbeat -path.logs /var/log/metricbeat" -ExecStart=/usr/share/metricbeat/bin/metricbeat $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS -Restart=always -StandardOutput=null -StandardError=null - -[Install] -WantedBy=multi-user.target diff --git a/manifests/service.pp b/manifests/service.pp index 0db36ea..0438cf1 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -69,30 +69,6 @@ command => '/bin/systemctl start nginx', unless => ['/usr/bin/test -f /run/nginx.pid'], } - exec { 'filebeat': - command => '/bin/systemctl enable filebeat', - creates => '/etc/systemd/system/multi-user.target.wants/filebeat.service', - } - file { '/usr/lib/systemd/system/filebeat.service': - ensure => 'file', - replace => "true", - source => 'puppet:///modules/marsnat/elasticsearch_logging/filebeat.service', - } - exec { 'start filebeat': - command => '/bin/systemctl start filebeat', - } - exec { 'metricbeat': - command => '/bin/systemctl enable metricbeat', - creates => '/etc/systemd/system/multi-user.target.wants/metricbeat.service', - } - file { '/usr/lib/systemd/system/metricbeat.service': - ensure => 'file', - replace => "true", - source => 'puppet:///modules/marsnat/elasticsearch_logging/metricbeat.service', - } - exec { 'start metricbeat': - command => '/bin/systemctl start metricbeat', - } # For exec, use something like: # unless => '/usr/bin/pgrep -f "manage.py runserver"', # to prevent running duplicate. Puppet is supposed to check process table