This is my metricbeat.yml file
name: Metricbeat-Monitor
#================================= Paths ============================
path.home: /usr/share/metricbeat
path.config: /etc/metricbeat
path.data: /var/lib/metricbeat
path.logs: /var/log/metricbeat
#========================== Modules configuration ========================
metricbeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: true
# Period on which files under path should be checked for changes
reload.period: 10s
#========================== Metricbeat Modules =========================
metricbeat.modules:
#---------------------------- Elasticsearch Module ---------------------------
- module: elasticsearch
enabled: true
metricsets:
- ccr
- cluster_stats
- index
- index_recovery
- index_summary
- ml_job
- node_stats
- shard
period: 10s
hosts: ["https://elasticsearch-master-vm0:9200","https://elasticsearch-data-vm0:9200","https://elasticsearch-data-vm1:9200","https://elasticsearch-ingest-vm0:9200"]
username: "beats_system"
password: "********"
ssl.certificate_authorities: ["/etc/metricbeat/certs/elasticsearch-master-vm0/ca.crt"]
index_recovery.active_only: false
xpack.enabled: true
#------------------------------- Kibana Module -------------------------------
- module: kibana
metricsets: ["stats"]
period: 10s
hosts: ["https://portal.xorsoc.com:443"]
ssl.certificate_authorities: ["/etc/metricbeat/certs/kibana-vm0/ca.crt"]
ssl.certificate: "/etc/metricbeat/certs/kibana-vm0/instance.crt"
ssl.key: "/etc/metricbeat/certs/kibana-vm0/instance.key"
username: "kibana"
password: "*******"
basepath: ""
enabled: true
xpack.enabled: true
#================================ Processors =========================
processors:
- add_host_metadata:
netinfo.enabled: false
#================================ Outputs ======================================
# Configure what output to use when sending the data collected by the beat.
#-------------------------- Elasticsearch output -------------------------------
output.elasticsearch:
# Boolean flag to enable or disable the output module.
enabled: true
hosts: ["https://monitoring-elasticsearch-client-vm0:9200"]
protocol: "https"
username: "beats-system"
password: "********"
worker: 1
ssl.enabled: true
ssl.verification_mode: none
ssl.certificate_authorities: ["/etc/metricbeat/certs/monitoring-elasticsearch-client-vm0/ca.crt"]
ssl.certificate: "/etc/metricbeat/certs/monitoring-elasticsearch-client-vm0/instance.crt"
ssl.key: "/etc/metricbeat/certs/monitoring-elasticsearch-client-vm0/instance.key"
#================================ Logging ===============================
logging.level: info
logging.to_files: true
logging.files:
path: /var/log/metricbeat
name: metricbeat
keepfiles: 1
permissions: 0600
setup.dashboards.enabled: false
setup.template.enabled: false
setup.kibana.enabled: false
xpack.monitoring.enabled: true
and this is what I get when the command sudo systemctl status metricbeat.service
is executed:
● metricbeat.service - Metricbeat is a lightweight shipper for metrics.
Loaded: loaded (/usr/lib/systemd/system/metricbeat.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2019-10-25 10:00:01 UTC; 3s ago
Docs: https://www.elastic.co/products/beats/metricbeat
Process: 8289 ExecStart=/usr/share/metricbeat/bin/metricbeat -c /etc/metricbeat/metricbeat.yml -path.home /usr/share/metricbeat -path.config /etc/metricbeat -path.data /var/lib/metricbeat -path.logs /var/log/metricbeat (code=exited, status=1/FAILURE)
Main PID: 8289 (code=exited, status=1/FAILURE)
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: metricbeat.service: main process exited, code=exited, status=1/FAILURE
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: Unit metricbeat.service entered failed state.
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: metricbeat.service failed.
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: metricbeat.service holdoff time over, scheduling restart.
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: Stopped Metricbeat is a lightweight shipper for metrics..
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: start request repeated too quickly for metricbeat.service
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: Failed to start Metricbeat is a lightweight shipper for metrics..
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: Unit metricbeat.service entered failed state.
Oct 25 10:00:01 fouroneone-vm0 systemd[1]: metricbeat.service failed.
No log files are created when metricbeat is run as service.
Metricbeat, however, works fine when invoked from CLI by the command: ./metricbeat -e -c /etc/metricbeat/metricbeat.yml
It also logs its event properly in /var/log/metricbeat/metricbeat
- I have disabled dashboard, template and kibana setup.
- I have attempted to start metricbeat manually (using
sudo systemctl start metricbeat.service
) after the network is up and running, still getting the above error - All I want is metricbeat to start automatically on boot.