Issue installing metricbeat

I am following the setup guide from elastic for metric beat, and get the following when I run " metricbeat setup -e"

019-08-23T20:48:31.017Z INFO kibana/client.go:117 Kibana url: http://localhost:5601
2019-08-23T20:48:31.018Z ERROR instance/beat.go:877 Exiting: error connecting to
Kibana: fail to get the Kibana version: HTTP GET request to http://localhost:5601/api/status fails:
fail to execute the HTTP GET request: Get http://localhost:5601/api/status: dial tcp
127.0.0.1:5601: connect: connection refused. Response: .

Any assistance would be appreciated.

Is kibana running at http://localhost:5601/ ?

Kibana is set to:

network.host: 192.168.2.39

If I set it to anything else, kibana won't start. I have the metricbeat.yml file set to point to:

hosts: ["192.168.2.39:9200"]

I am unclear if elasticsearch kibana and metricbeat are all running on the same host or all different hosts.

In the metribeat.yml you still have to also set the kibana hosts if they are running on different hosts.

https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-configuration.html

setup.kibana:
  host: "mykibanahost:5601" 

If they are all 3 on the same host and you didn't change any other settings you don't need to edit any of the ymls to make them run.

They are all running on the same host. And yes, I had to edit the files to get it running, Elastic and Kibana bith crash if I don't specifically set the IP. Also, kibana is not reachable from other hosts if I leave network.host: set to localhost.

Kibana is set to:

server.host: 192.168.2.39

Try setting

setup.kibana:
  host: "192.168.2.39:5601" 

That is unusual why localhost does not work what OS are you on

Ubuntu server virtual machine on VMware.

The metricbeat.yml file shows:

kibana.host: "192.168.2.39:5601"

Is that what should be set or should it be what you show above?

Thanks,

So setting it to:

host: "192.168.2.39:5601"

Works.

Now I get.

2019-08-24T23:36:38.186Z ERROR instance/beat.go:877 Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to http://192.168.2.39:5601/api/status fails: fail to execute the HTTP GET request: Get http://192.168.2.39:5601/api/status: dial tcp 192.168.2.39:5601: connect: connection refused. Response: .
Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to http://192.168.2.39:5601/api/status fails: fail to execute the HTTP GET request: Get http://192.168.2.39:5601/api/status: dial tcp 192.168.2.39:5601: connect: connection refused. Response: .

If you are using version 7.3.0

#============================== Kibana =====================================

# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
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: "192.168.2.39:5601"

.......

#================================ Outputs =====================================

# Configure what output to use when sending the data collected by the beat.

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["192.168.2.39:9200"]

  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #username: "elastic"
  #password: "changeme"

If it does not look like that ... may I ask what version of metricbeat are you using?

What happens when you point a browser to

http://192.168.2.39:5601

???

Looks like it is working now. It appears to have been an error with the host variable.

Thanks for your help!

1 Like

Good news

if you run

$ cat /etc/hosts

You should see something like this. I suspect your localhost line is commented out or does not exist, if you uncomment it then the localhost settings would probably work.

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost

It's not commented out.

root@elk:/etc/logstash# cat /etc/hosts
127.0.0.1 localhost
127.0.0.1 elk elk
192.168.2.39 elk elk
192.168.2.39 elk-server elk-server

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Huh odd not sure what to tell you...

Can you $ ping localhost and get a positive response.

Yes, I can.

root@elk:/usr/share/logstash/bin# ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.032 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.034 ms

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.