elk_stack:metricbeat_werking
Table of Contents
Metricbeat: werking
context
dit document beschrijft de werking van Metricbeat
configuratie
- /etc/metricbeat/metricbeat.yml
- vergelijkbaar met de configuratie van Filebeat heb je ook een .reference.yml-bestand waarin alle opties netjes worden uitgelegd.
- standaard staat output naar ES, ipv Logstash. Pas dit als volgt aan:
- zet IN commentaar:
output.elasticsearch: hosts: ["localhost:9200"]
- voeg adres van kibana toe:
setup.kibana: host: "localhost:5601"
- haal UIT commentaar:
#output.logstash: #hosts: ["localhost:5044"]
- schakel logging_naar_syslog_uit
- activeer sample dashboards
- om de werking van de agent wat te leren kennen, zetten we logging aan:
logging.level: debug logging.to_files: true logging.files: path: /var/log/metricbeat logging.metrics.enabled: false
- test je config file:
metricbeat test config
- herstart metricbeat:
sudo systemctl restart metricbeat
Kibana
- maak een index aan in kibana
- controleer dat events binnenkomen in Discover
Nu kan je deze verwerken in visualizations - activeer de voorbeeld dashboards als volgt:
- open /etc/metricbeat/metricbeat.yml
- activeer de waarde:
setup.dashboards.enabled: true
- herstart metricbeat service:
sudo systemctl restart metricbeat
problemen, problemen
- ga kijken in /var/log/metricbeat/metricbeat
Kibana sample dashboards worden niet geladen
fout:
ERROR instance/beat.go:933 Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to http://localhost:5601/api/status fails: ... Get http://localhost:5601/api/status: dial tcp 127.0.0.1:5601: connect: connection refused. Response: .
oorzaak:filebeat maakt verbinding op Kibana API endpoint. Indien niet expliciet geconfigureerd, gaat filebeat uit van localhost. Als kibana luistert op ander adres, voeg dit dan als volgt toe in metricbeat.yml:
setup.kibana: # Kibana Host # 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: "<ipKibanaHost>:5601"
meer info
elk_stack/metricbeat_werking.txt · Last modified: 2020/03/18 13:51 by koen