Unable to start HeartBeat

Hi, below is the config file :

 10 ############################# Heartbeat ############################
 11
 12 # Define a directory to load monitor definitions from. Definitions take the form
 13 # of individual yaml files.
 14 heartbeat.config.monitors:
 15   # Directory + glob pattern to search for configuration files
 16   path: ${path.config}/monitors.d/*.yml
 17   # If enabled, heartbeat will periodically check the config.monitors path for changes
 18   reload.enabled: true
 19   # How often to check for changes
 20   reload.period: 1s
 21
 22 # Configure monitors inline
 23 heartbeat.monitors:
 24 - type: http
 25
 26   # List or urls to query
 27   urls: ["http://com.sg"]
 28
 29   # Configure task schedule
 30   schedule: '@every 10s'
 31
 32   # Total test connection and data exchange timeout
 33   #timeout: 16s
 34   ssl.verification_mode: none
 35
 36 hearbeat.scheduler:
 37   limit: 10
 38
 39 #==================== Elasticsearch template setting ==========================
 40
 41 setup.template.settings:
 42   index.number_of_shards: 1
 43   index.codec: best_compression
 44   _source.enabled: true
 45
 46 setup.template.overwrite: true
 47 setup.template.enabled: true
 48
 49 output.elasticsearch.index: "heartbeat-%{[agent.version]}-%{+yyyy.MM.dd}"
 50 #setup.template.name: "heartbeat"
 51 setup.template.pattern: "heartbeat-*"
 52 setup.template.settings:
 53    index.number_of_shards: 1
 54    index.number_of_replicas: 1
 55
 56 #================================ General ============================
 57
 58 # The name of the shipper that publishes the network data. It can be used to group
 59 # all the transactions sent by a single shipper in the web interface.
 60 #name:
 61
 62 # The tags of the shipper are included in their own field with each
 63 # transaction published.
 64 #tags: ["service-X", "web-tier"]
 65
 66 # Optional fields that you can specify to add additional information to the
 67 # output.
 68 #fields:
 69 #  env: staging
 70
 71
 72 #============================== Dashboards =========================
 73 # These settings control loading the sample dashboards to the Kibana index. Loading
 74 # the dashboards is disabled by default and can be enabled either by setting the
 75 # options here or by using the `setup` command.
 76 #setup.dashboards.enabled: false
 77
 78 # The URL from where to download the dashboards archive. By default this URL
 79 # has a value which is computed based on the Beat name and version. For released
 80 # versions, this URL points to the dashboard archive on the artifacts.elastic.co
 81 # website.
 82 #setup.dashboards.url:
 83
 84 #============================== Kibana =====================================
 85
 86 # Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
 87 # This requires a Kibana endpoint configuration.
 88 setup.kibana:
 89
 90   # Kibana Host
 91   # Scheme and port can be left out and will be set to the default (http and 5601)
 92   # In case you specify and additional path, the scheme is required: http://localhost:5601/path
 93   # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
 94   host: "http://10.0.106.144:5601"
 95
 96   # Kibana Space ID
 97   # ID of the Kibana Space into which the dashboards should be loaded. By default,
 98   # the Default Space will be used.
 99   #space.id:
100
101 #============================= Elastic Cloud ==================================
102
103 # These settings simplify using heartbeat with the Elastic Cloud (https://cloud.elastic.co/).
104
105 # The cloud.id setting overwrites the `output.elasticsearch.hosts` and
106 # `setup.kibana.host` options.
107 # You can find the `cloud.id` in the Elastic Cloud web UI.
108 #cloud.id:
109
110 # The cloud.auth setting overwrites the `output.elasticsearch.username` and
111 # `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
112 #cloud.auth:
113
114 #================================ Outputs ========================
115
116 # Configure what output to use when sending the data collected by the beat.
117
118 #-------------------------- Elasticsearch output ------------------------------
119 output.elasticsearch:
120   # Array of hosts to connect to.
121   hosts: ["http://10.0.106.144:9200"]
122   #index: "heartbeat-%{[agent.version]}-%{+yyyy.MM.dd}"
123   # Optional protocol and basic auth credentials.
124   protocol: "https"
125   username: "kibana"
126   password: "kibanapass"
127
128 #----------------------------- Logstash output --------------------------------
129 #output.logstash:
130   # The Logstash hosts
131   #hosts: ["http://10.0.106.144:5044"]
132   #hosts: ["http://10.0.106.144:9600"]
133
134   # Optional SSL. By default is off.
135   # List of root certificates for HTTPS server verifications
136   #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
137
138   # Certificate for SSL client authentication
139   #ssl.certificate: "/etc/pki/client/cert.pem"
140
141   # Client Certificate Key
142   #ssl.key: "/etc/pki/client/cert.key"
143
144 #================================ Processors =====================================
146 # Configure processors to enhance or manipulate events generated by the beat.
147
148 processors:
149   - add_host_metadata: ~
150   - add_cloud_metadata: ~
151
152 #================================ Logging =====================================
153
154 # Sets log level. The default log level is info.
155 # Available log levels are: error, warning, info, debug
156 logging.level: debug
157 logging.to_files: true
158 logging.files:
159   path: /var/log/heartbeat
160   name: heartbeat
161   keepfiles: 7
162   permissions: 0644
163
164 # At debug level, you can selectively enable logging only for some components.
165 # To enable all selectors use ["*"]. Examples of other selectors are "beat",
166 # "publish", "service".
167 #logging.selectors: ["*"]
168
169 #============================== Xpack Monitoring ===============================
170 # heartbeat can export internal metrics to a central Elasticsearch monitoring
171 # cluster.  This requires xpack monitoring to be enabled in Elasticsearch.  The
172 # reporting is disabled by default.
173
174 # Set to true to enable the monitoring reporter.
175 #xpack.monitoring.enabled: false

Dear all, I am using Heartbeat 7.0. and my Kibana version is 6.7. Can I load the template in ?

Hi,

Add:
setup.ilm.enabled: false

Remove:
setup.template.pattern: "heartbeat-*"
output.elasticsearch.index: "heartbeat-%{[agent.version]}-%{+yyyy.MM.dd}"

Also what version of Elasticsearch are you using?
You say your using heartbeat 7.0 and Kibana 6.7, does that mean you are using Elasticsearch 6.7?
Because using Beats version 7 with elasticsearch 6.7 is not supported. You should use heartbeat 6.7 if your es version is 6.7.
https://www.elastic.co/support/matrix#matrix_compatibility

is it resolved?
are you able to run heartbeat now?

Hi I m currently re-downloading the heartbeat version 6.7 onto the server. Trying to configure now.

Hi bro, no still face some issue.

Configuration File:

heartbeat.config.monitors:
16 path: ${path.config}/monitors.d/*.yml
18 reload.enabled: true
20 reload.period: 1s

23 heartbeat.monitors:
24 - type: http
25
26 # List or urls to query
27 urls: ["[http://site.sg]"]

30 schedule: '@every 10s'
33 ssl.verification_mode: none
34
35 hearbeat.scheduler:
36 limit: 10
37
38 # Total test connection and data exchange timeout
39 #timeout: 16s
40
41 setup.ilm.enabled: false
42
43 #==================== Elasticsearch template setting ==========================
44
45 setup.template.settings:
46 index.number_of_shards: 1
47 index.codec: best_compression
48 _source.enabled: true
49
50 setup.template.overwrite: true
51 setup.template.enabled: true
52
54 setup.template.name: "heartbeat"
56 setup.template.settings:
57 index.number_of_shards: 1
58 index.number_of_replicas: 1
59
92 setup.kibana:
93
94 # Kibana Host
98 host: "[http://ip:5601]"
123 output.elasticsearch:
125 hosts: "[http://ip:9200]"
128 protocol: "https"
129 username: "kibana"
130 password: "kibanapass"
152 processors:
153 - add_host_metadata: ~
154 - add_cloud_metadata: ~
155
156 #============================ Logging ==============================

161 logging.level: debug
162 logging.to_files: true
163 logging.files:
164 path: /var/log/heartbeat
165 name: heartbeat
166 keepfiles: 7
167 permissions: 0644

may i know the use case you are looking for or just simply wants to see heartbeat features?

Hi now just trying to get the heartbeat feature running first. Then will start to monitor websites using it.

so don't change anything in the default heartbeat.yml as you have got it after unzipping it (except elasticsearch & kibana url's)

just go to bin folder
run
./heartbeat setup

after it loads the dashboard setting for kibana
simply run
./heartbeat -e

now you can see Uptime in your kibana and index will be available in elasticsearch

this means in your case it will be => cd /usr/share/heartbeat

image

I realized the data collected is from the wrong source. Secondly I can't see any bar displaying on the Discover page. But below is listed with the info.

Exiting: error loading config file: stat heartbeat.yml: no such file or directory.

When I try to run this in the bin folder, it prompt me this error.

This "heartbeat -e" command does it store info into elasticsearch ?

./heartbeat -e path/to/.yml file is the actual command which you need to run.
but if we have heartbeat.yml in the same folder then ./heartbeat -e will work
if these 2 are not in the same folder then either mention the complete path to .yml or copy .yml to bin folder

info as in?

Info refers to data. As you can see, below the table form it has data coming in, but nothing showing on the graph.

image

And running this command to start the systemctl also does not work. I realized that if I get to run this, they will collect data and store in ES.

image

Hi Martin, I executed this command "journalctl -u heartbeat-elastic.service" and the result still showing I am using this heartbeat version 7. How can I switch to 6.7?

image strong text

You need to uninstall version 7 and install version 6.7 instead so it matches with the Elasticsearch version you are using.

Dear all, may I know what is this error is about? Something to do with connections to Logstash?