# Unable to setup filebeat dashboard for Kibana

**URL:** <https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 16, 2020, 9:40pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410 "2020-04-16T21:40:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishan.abhinit](https://avatars.discourse-cdn.com/v4/letter/i/d07c76/32.png) [@ishan.abhinit](https://discuss.elastic.co/u/ishan.abhinit)\
**Post date:** [April 16, 2020, 9:40pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/1 "2020-04-16T21:40:44Z")

</div>

I have set up elasticsearch , kibana and filebeat on the same CentOS VM. Both elasticsearch and kibana are running.

Hostname of the CentOS VM is [js-168-192.jetstream-cloud.org](http://js-168-192.jetstream-cloud.org)

I am getting the below error when I run --\> sudo filebeat setup --dashboards

```auto
Loading dashboards (Kibana must be running and reachable)
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 [::1%lo]:5601: connect: connection refused. Response: .

```

I have pasted the contents of kibana.yml and filebeat.yml below:

```
                       Contents of kibana.yml file

```

```auto
# Kibana is served by a back end server. This setting specifies the port to use.
#server.port: 5601

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: "js-168-192.jetstream-cloud.org"

# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
# from requests it receives, and to prevent a deprecation warning at startup.
# This setting cannot end in a slash.
#server.basePath: ""

# Specifies whether Kibana should rewrite requests that are prefixed with
# `server.basePath` or require that they are rewritten by your reverse proxy.
# This setting was effectively always `false` before Kibana 6.3 and will
# default to `true` starting in Kibana 7.0.
#server.rewriteBasePath: false

# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576

# The Kibana server's name. This is used for display purposes.
#server.name: "your-hostname"

# The URLs of the Elasticsearch instances to use for all your queries.
#elasticsearch.hosts: ["http://localhost:9200"]

# When this setting's value is true Kibana uses the hostname specified in the server.host
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn't already exist.
#kibana.index: ".kibana"

# The default application to load.
#kibana.defaultAppId: "home"

# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
#elasticsearch.username: "kibana"
#elasticsearch.password: "pass"

# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key

# Optional settings that provide the paths to the PEM-format SSL certificate and key files.
# These files are used to verify the identity of Kibana to Elasticsearch and are required when
# xpack.security.http.ssl.client_authentication in Elasticsearch is set to required.
#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key

# Optional setting that enables you to specify a path to the PEM file for the certificate
# authority for your Elasticsearch instance.
"kibana-7.6.2-linux-x86_64/config/kibana.yml" 115L, 5269C

```

Contents of filebeat.yml file

```auto
###################### Filebeat Configuration Example #########################

# This file is an example configuration file highlighting only the most common
# options. The filebeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html

# For more available modules and options, please see the filebeat.reference.yml sample
# configuration file.

#=========================== Filebeat inputs =============================

filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.

- type: log

  # Change to true to enable this input configuration.
  enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /apache_access.log
    #- c:\programdata\elasticsearch\logs\*

  # Exclude lines. A list of regular expressions to match. It drops the lines that are
  # matching any regular expression from the list.
  #exclude_lines: ['^DBG']

  # Include lines. A list of regular expressions to match. It exports the lines that are
  # matching any regular expression from the list.
  #include_lines: ['^ERR', '^WARN']

  # Exclude files. A list of regular expressions to match. Filebeat drops the files that
  # are matching any regular expression from the list. By default, no files are dropped.
  #exclude_files: ['.gz$']

  # Optional additional fields. These fields can be freely picked
  # to add additional information to the crawled log files for filtering
  #fields:
  # level: debug
  # review: 1

 ### Multiline options

  # Multiline can be used for log messages spanning multiple lines. This is common
  # for Java Stack Traces or C-Line Continuation

  # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  #multiline.pattern: ^\[

  # Defines if the pattern set under pattern should be negated or not. Default is false.
  #multiline.negate: false

  # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  #multiline.match: after

#============================= Filebeat modules ===============================

filebeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml

  # Set to true to enable config reloading
  reload.enabled: false

  # Period on which files under path should be checked for changes
  #reload.period: 10s

#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 1
  #index.codec: best_compression
  #_source.enabled: false

#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
# env: staging

#============================== Dashboards =====================================
# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards is disabled by default and can be enabled either by setting the
# options here or by using the `setup` command.
#setup.dashboards.enabled: false

# The URL from where to download the dashboards archive. By default this URL
# has a value which is computed based on the Beat name and version. For released
# versions, this URL points to the dashboard archive on the artifacts.elastic.co
# website.
#setup.dashboards.url:

#============================== 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: "localhost:5601"

  # Kibana Space ID
  # ID of the Kibana Space into which the dashboards should be loaded. By default,
  # the Default Space will be used.
  #space.id:

#============================= Elastic Cloud ==================================

# These settings simplify using Filebeat with the Elastic Cloud (https://cloud.elastic.co/).

# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
# `setup.kibana.host` options.
# You can find the `cloud.id` in the Elastic Cloud web UI.
#cloud.id:

# The cloud.auth setting overwrites the `output.elasticsearch.username` and
# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
#cloud.auth:

#================================ 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: ["js-168-192.jetstream-cloud.org:9200"]

  # Protocol - either `http` (default) or `https`.
  #protocol: "https"

  # Authentication credentials - either API key or username/password.
  #api_key: "id:api_key"
  #username: "elastic"
  #password: "changeme"
#----------------------------- Logstash output --------------------------------
#output.logstash:
  # The Logstash hosts
  #hosts: ["localhost:5044"]

  # Optional SSL. By default is off.
  # List of root certificates for HTTPS server verifications
  #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

  # Certificate for SSL client authentication
  #ssl.certificate: "/etc/pki/client/cert.pem"

  # Client Certificate Key
  #ssl.key: "/etc/pki/client/cert.key"

#================================ Processors =====================================

# Configure processors to enhance or manipulate events generated by the beat.

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

#================================ Logging =====================================

# Sets log level. The default log level is info.
# Available log levels are: error, warning, info, debug
#logging.level: debug

# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]

#============================== X-Pack Monitoring ===============================
# filebeat can export internal metrics to a central Elasticsearch monitoring
# cluster. This requires xpack monitoring to be enabled in Elasticsearch. The
# reporting is disabled by default.

# Set to true to enable the monitoring reporter.
#monitoring.enabled: false

# Sets the UUID of the Elasticsearch cluster under which monitoring data for this
# Filebeat instance will appear in the Stack Monitoring UI. If output.elasticsearch
# is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch.
#monitoring.cluster_uuid:

# Uncomment to send the metrics to Elasticsearch. Most settings from the
# Elasticsearch output are accepted here as well.
# Note that the settings should point to your Elasticsearch *monitoring* cluster.
# Any setting that is not set is automatically inherited from the Elasticsearch
# output configuration, so if you have the Elasticsearch output configured such
# that it is pointing to your Elasticsearch monitoring cluster, you can simply
# uncomment the following line.
#monitoring.elasticsearch:

#================================= Migration ==================================

# This allows to enable 6.7 migration aliases
#migration.6_to_7.enabled: true

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 16, 2020, 9:42pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/2 "2020-04-16T21:42:08Z")

</div>

Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

---

<div class="post-metadata">

**Author:** ![ishan.abhinit](https://avatars.discourse-cdn.com/v4/letter/i/d07c76/32.png) [@ishan.abhinit](https://discuss.elastic.co/u/ishan.abhinit)\
**Post date:** [April 16, 2020, 9:45pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/3 "2020-04-16T21:45:31Z")

</div>

Please check now

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 16, 2020, 9:50pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/4 "2020-04-16T21:50:10Z")

</div>

You need to edit the `setup.kibana` value, as per step 3 here - [https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration.html](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration.html)

You can also supply this manually as per [https://www.elastic.co/guide/en/beats/filebeat/current/load-kibana-dashboards.html](https://www.elastic.co/guide/en/beats/filebeat/current/load-kibana-dashboards.html)

---

<div class="post-metadata">

**Author:** ![ishan.abhinit](https://avatars.discourse-cdn.com/v4/letter/i/d07c76/32.png) [@ishan.abhinit](https://discuss.elastic.co/u/ishan.abhinit)\
**Post date:** [April 16, 2020, 10:25pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/5 "2020-04-16T22:25:34Z")

</div>

Thank you so much, that worked using the step 3 above. I got a response 'Loaded Dashboard.'  
Then, I started filebeat and now I am trying to view 'apache\_access.log' file. This is the single, static log file that I want to view in Kibana (as you can see from filebeat.inputs section of filebeat.yml file pasted above)  
I am stuck here [https://www.elastic.co/guide/en/beats/filebeat/7.6/view-kibana-dashboards.html](https://www.elastic.co/guide/en/beats/filebeat/7.6/view-kibana-dashboards.html).  
How do I access the 'apache\_access.log files' logs in Kibana?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 16, 2020, 10:26pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/6 "2020-04-16T22:26:32Z")

</div>

Head over to Discover and set your time window to the last week, does it show any data?

---

<div class="post-metadata">

**Author:** ![ishan.abhinit](https://avatars.discourse-cdn.com/v4/letter/i/d07c76/32.png) [@ishan.abhinit](https://discuss.elastic.co/u/ishan.abhinit)\
**Post date:** [April 16, 2020, 10:28pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/7 "2020-04-16T22:28:41Z")

</div>

This is what I see after setting time window to last week

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/d/5da3b30a4176bcbd9dbca9d39f79619a822ddd31.png)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 16, 2020, 10:33pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/8 "2020-04-16T22:33:25Z")

</div>

Ok cool, that means you have data from the log file.

What happens when you open the Apache dashboard, as the docs mention?

---

<div class="post-metadata">

**Author:** ![ishan.abhinit](https://avatars.discourse-cdn.com/v4/letter/i/d07c76/32.png) [@ishan.abhinit](https://discuss.elastic.co/u/ishan.abhinit)\
**Post date:** [April 17, 2020, 6:21pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/9 "2020-04-17T18:21:57Z")

</div>

My log file has data between 3rd & 9th Oct 2017. The data I have pasted in the above screenshot is from last few days. Does this still mean that there is data from my log file (apache\_access.log)?

I think something is missing here.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 18, 2020, 1:52pm UTC](https://discuss.elastic.co/t/unable-to-setup-filebeat-dashboard-for-kibana/228410/11 "2020-05-18T13:52:33Z")

</div>

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