Updated configs

Trying to find a place to install heartbeat.  I do not think any client devices need to run this service.
This commit is contained in:
James Tombleson 2019-04-25 09:29:45 -07:00
parent bdba44c56d
commit f394ee9781
7 changed files with 24 additions and 46 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
.DS_Store
hosts
win_hosts

View File

@ -28,7 +28,7 @@
win_service:
name: metricbeat
- debug: var=service_metricbeat
#- debug: var=service_metricbeat
- name: Install Metricbeat service
win_command: powershell.exe -ExecutionPolicy ByPass -File install-service-metricbeat.ps1
@ -41,7 +41,7 @@
win_service:
name: metricbeat
- debug: var=service_metricbeat
#- debug: var=service_metricbeat
- name: restart service
win_service:

View File

@ -14,7 +14,7 @@
creates: C:\temp\winlogbeat-{{ elastic_version }}\
- name: Copy winlogbeat-{{ elastic_version }} folder
win_command: powershell.exe copy-item -Path 'c:\temp\winlogbeat-{{ elastic_version }}\metricbeat-{{ elastic_version }}-windows-x86_64\' -Filter * -Recurse -Destination 'C:\Program Files\winlogbeat\'
win_command: powershell.exe copy-item -Path 'c:\temp\winlogbeat-{{ elastic_version }}\winlogbeat-{{ elastic_version }}-windows-x86_64\' -Filter * -Recurse -Destination 'C:\Program Files\winlogbeat\'
args:
creates: C:\Program Files\winlogbeat\
@ -23,17 +23,30 @@
src: winlogbeat.j2
dest: C:\Program Files\winlogbeat\winlogbeat.yml
- name: check for service
register: service
win_service:
name: winlogbeat
- name: Install winlogbeat service
win_command: powershell.exe -ExecutionPolicy ByPass -File install-service-winlogbeat.ps1
args:
chdir: C:\program files\winlogbeat\
when: service.exists == false
- name: check status of service
register: service
win_service:
name: winlogbeat
- name: restart service
win_service:
name: winlogbeat
state: restarted
when: service.state == 'started'
- name: start service
win_service:
name: winlogbeat
state: started
when: service.state == 'stopped'

View File

@ -15,7 +15,7 @@ heartbeat.config.monitors:
# Directory + glob pattern to search for configuration files
path: ${path.config}/monitors.d/*.yml
# If enabled, heartbeat will periodically check the config.monitors path for changes
reload.enabled: false
reload.enabled: true
# How often to check for changes
reload.period: 5s
@ -24,10 +24,10 @@ heartbeat.monitors:
- type: http
# List or urls to query
urls: ["http://localhost:9200"]
urls: ["http://localhost:9200", "https://www.directorsmortgage.com", "https://www.usadirectfunding.com":]
# Configure task schedule
schedule: '@every 10s'
schedule: '@every 60s'
# Total test connection and data exchange timeout
#timeout: 16s
@ -43,7 +43,7 @@ setup.template.settings:
# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:
name: {{ ansible_hostname }}
# The tags of the shipper are included in their own field with each
# transaction published.

View File

@ -1,15 +0,0 @@
---
- name: update metricbeat
hosts: linux
tasks:
- name: define elasticsearch hosts
become: true
lineinfile:
path: /etc/metricbeat/metricbeat.yml
regexp: 'hosts: \["localhost:9200"\]'
#insertafter: 'hosts: \["localhost:9200"\]'
line: ' hosts: ["dm-nagios.local:9200"]'
state: present
backrefs: yes

View File

@ -1,21 +0,0 @@
- name: template test
hosts: elasticClients
vars:
cluster_name: 'logging-dev'
node_name: 'dev-data-01'
node_master: 'true'
node_data: 'true'
path_data: '/var/lib/elasticsearch'
path_logs: '/var/log/elasticsearch'
network_host: ansible_default_ipv4.address
http_port: '9200'
transport_host: 'localhost'
transport_port: '9300'
tasks:
- name: generate template
template:
src: elasticsearch.j2
dest: /tmp/elasticsearch.yml

View File

@ -50,7 +50,7 @@ setup.template.settings:
# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards is disabled by default and can be enabled either by setting the
# options here or by using the `setup` command.
#setup.dashboards.enabled: false
setup.dashboards.enabled: true
# The URL from where to download the dashboards archive. By default this URL
# has a value which is computed based on the Beat name and version. For released
@ -68,7 +68,7 @@ setup.kibana:
# Scheme and port can be left out and will be set to the default (http and 5601)
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
#host: "localhost:5601"
host: {{ kibana_host }}
# Kibana Space ID
# ID of the Kibana Space into which the dashboards should be loaded. By default,
@ -95,7 +95,7 @@ setup.kibana:
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
hosts: {{ elasticsearch_hosts }}
# Optional protocol and basic auth credentials.
#protocol: "https"