Welcome to the club of people who stare at the screen for 3 seconds every time they toy with heartbeat package/service and initially get a problem until they remember...
Funny story actually:
I don't use deb packages, but use "heartbeat-elastic" for the service name. That's the right name everywhere, except where it isn't like the binary itself.
This is a useful read to hopefully burn it into your brain enough so that it only takes 3 seconds of starring when you hit this again in six months. I promise, it's a only a very small annoyance once in a while in exchange for a very cool name
http://linux-ha.org/wiki/Heartbeat
Another completely unrelated software called heartbeat which you are attempting to start by error. The heartbeat software by Elastic has a service name of « heartbeat-elastic » and not « heartbeat ».
Your second question I don’t understand. You have to configure an output in the output section of the config file to ship events to Elasticsearch, that is documented here:
Hi, I think the one I installed using apt is correct, its Heartbeat-elastic. In the directory, there are fields.yml, heartbeat.reference.yml, monitor .yml and monitos.d.
How am I able to verify this is truly correct?
Secondly, why is there "heartbeat.reference.yml and heartbeat.yml.? What are the differences?
Dude, you're still interacting with "heartbeat" instead of "heartbeat-elastic".
Stop doing
service heartbeat start
or
systemctl start heartbeat
Whatever you do, do it with "heartbeat-elastic".
The error you posted is from the heartbeat software and not the heartbeat-elastic software.
You installed it correctly, "heartbeat-elastic" and you go to the right directory to see the config files but you keep interacting with the wrong service/daemon/systemd unit file.
Hi Martin, I realized there are 2 directories, one is /usr/share/heartbeat & the other one is /etc/heartbeat. May I know which is the correct one? Thanks
So this heartbeat and heartbeat-elastic has nothing to do with each other?
Both are correct. Software files are installed in multiple directories according to what type of files they are. Binaries and config files are installed in different directories and all that is fine. Thats normal.
Indeed the linux-ha heartbeat software has nothing to do with Elastic hearbeat-elastic software. Same as if 2 companies had made a game and both called it “Solitaire”. It could be confusing once both are installed in your system and your start looking at everything named “solitaire” in your machine. The situation is similar.
I still think your system is in a good state if all you did so far is install heartbeat-elastic from the DEB package. Just remember that the package name AND the Service name is heartbeat-elastic. So edit the config file /etc/heartbeat/heartbeat.yml and interact with the service/daemon via the name heartbeat-elastic when you use the “service” command or the “systemctl” command, whichever you use on your system normally.
Yes your interacting with the right daemon now.
If you want to know why it’s failing, you need to check the logs.
I can’t tell you where they are because I don’t know which version of heartbeat-elastic you installed.
The logs will be either in /var/log/heartbeat/heartbeat
or they will be in in journald and you should be able to check them with the following command:
journalctl -u heartbeat-elastic.service
There is actually no information about the cause of the failure to start in those systemd events.
As I said above you need to look in the logs to investigate the cause of the failure to start which is most probably a problem with the config you have in the config file. That's because "just" failing to ship the events out to the configured output, either logstash or ES does not prevent the service from starting.
Look at the logs.
Also please dont use images to share logs, terminal outputs or config files. Format it properly as text and use the </> button to mark it from the post editor. Or use triple backticks ``` before and after. So it looks like that and is readable.
yada yada
Since you're using version 7.0.1 on an OS using systemd, the logs should be accessible with
Please share your full config file if you need help with a config file.
There are multiple path settings, I don’t know which one your asking about if I can’t see your full config file.
The other setting is probably not required at all, depending on your config. Actually maybe both settings would be best left to default.
You should start with a very basic config, close to the default config file that was delivered in heartbeat.yml. But anyhow, please share it with us if you need help.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.