Filebeat sur windows

Bonjour a vous,

je sollicite votre expertise afin de m'aider a avancer dans mon projet

Mon problème cest que je recu rien sur kibana depuis filebeat installe sur windows.

lo but cest des voir des logs sur kibana avec filebeat.

voici la configuration de filebeat.yml

###################### 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:
    -  'P:\Lial\Traces\*\.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:
  module: apache
  module: mysql 
  
  # 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.name 1: "templateprueba"

setup.template.pattern: "templateprueba-*"

setup.template.fields: "fields.yml"

setup.template.overwrite: true

setup.template.enable: true
index: "templateprueba-%{+yyyy.MM.dd}"
setup.template.settings:
  index.number_of_shards: 3
  #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: true

# 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: "192.168.1.176: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:






#================================ 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.1.176:9000"]

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



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

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

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~

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


logging:
  to_files: true
  files:
    path: C:\Filebeat\logs
  level: debug
  selectors: ["*"]



monitoring.enabled: true

Bonjour est-ce la suite du thread suivant?

Est-ce que le serveur elastic ecoute sur 9000 ou c'est une faute de frappe?
Par default c'est 9200.

Oui il écoute on port 9000 et la configuration de Kibana c'est bon, mais j'ai encore le même problème.

image

merci.

Est-ce que tu peux suivre les instructions listée ici, ca aidera a comprendre a quel endroit ca bloque:
https://www.elastic.co/guide/en/beats/filebeat/current/enable-filebeat-debugging.html

Est-ce qu'il ya quelque chose dans tes logs ? d'apres la premiere image, sur la troisieme ligne Filebeat a recu l'ordre de s'arreter, dans les fichiers de logs doit y avoir quelque chose.

Si tu peux copier coller le contenu des logs dans gist (si c'est long) au lieu de mettre une image ca sera plus pratique pour nous de lire. Merci :bowing_man:

2019-08-08T08:31:53.313+0200    DEBUG   [registrar]     registrar/registrar.go:404      Registry file updated. 0 states written.
2019-08-08T08:31:53.314+0200    INFO    [monitoring]    log/log.go:153  Total non-zero metrics  {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":265,"time":{"ms":265}},"total":{"ticks":733,"time":{"ms":733},"value":733},"user":{"ticks":468,"time":{"ms":468}}},"handles":{"open":308},"info":{"ephemeral_id":"c278b85d-2842-49f1-b86d-5a7ec22ab252","uptime":{"ms":47969}},"memstats":{"gc_next":4312192,"memory_alloc":2395400,"memory_total":46115072,"rss":34234368},"runtime":{"goroutines":23}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0},"reloads":1},"output":{"type":"elasticsearch"},"pipeline":{"clients":0,"events":{"active":0}}},"registrar":{"states":{"current":0},"writes":{"success":1,"total":1}},"system":{"cpu":{"cores":8}}}}}
2019-08-08T08:31:53.315+0200    INFO    [monitoring]    log/log.go:154  Uptime: 47.9715464s
2019-08-08T08:31:53.316+0200    INFO    [monitoring]    log/log.go:131  Stopping metrics logging.
2019-08-08T08:31:53.316+0200    INFO    [monitoring]    elasticsearch/elasticsearch.go:283      Stop monitoring stats metrics snapshot loop.
2019-08-08T08:31:53.316+0200    DEBUG   [monitoring]    pipeline/client.go:149  client: closing acker
2019-08-08T08:31:53.318+0200    DEBUG   [monitoring]    pipeline/client.go:151  client: done closing acker
2019-08-08T08:31:53.317+0200    INFO    [monitoring]    elasticsearch/elasticsearch.go:283      Stop monitoring state metrics snapshot loop.
2019-08-08T08:31:53.318+0200    DEBUG   [monitoring]    pipeline/client.go:155  client: cancelled 0 events
2019-08-08T08:31:53.319+0200    DEBUG   [monitoring]    pipeline/pipeline.go:242        close pipeline
2019-08-08T08:31:53.319+0200    INFO    instance/beat.go:431    filebeat stopped.
2019-08-08T08:31:53.262+0200    INFO    input/input.go:114      Starting input of type: log; ID: 12308278780707132986
2019-08-08T08:31:53.265+0200    INFO    input/input.go:114      Starting input of type: log; ID: 4822703783625690921
2019-08-08T08:31:53.266+0200    INFO    cfgfile/reload.go:227   Loading of config files completed.
2019-08-08T08:31:53.265+0200    DEBUG   [input] log/input.go:187        Start next scan
2019-08-08T08:31:53.266+0200    DEBUG   [input] log/input.go:187        Start next scan
2019-08-08T08:31:53.267+0200    INFO    cfgfile/reload.go:230   Dynamic config reloader stopped
2019-08-08T08:31:53.269+0200    DEBUG   [input] log/input.go:208        input states cleaned up. Before: 0, After: 0, Pending: 0
2019-08-08T08:31:53.270+0200    DEBUG   [input] log/input.go:208        input states cleaned up. Before: 0, After: 0, Pending: 0
2019-08-08T08:31:53.271+0200    INFO    [reload]        cfgfile/list.go:118     Stopping 2 runners ...
2019-08-08T08:31:53.277+0200    DEBUG   [reload]        cfgfile/list.go:129     Stopping runner: mysql (error, slowlog)
2019-08-08T08:31:53.278+0200    DEBUG   [reload]        cfgfile/list.go:129     Stopping runner: apache (access, error)
2019-08-08T08:31:53.279+0200    INFO    input/input.go:149      input ticker stopped
2019-08-08T08:31:53.280+0200    INFO    input/input.go:167      Stopping Input: 12308278780707132986
2019-08-08T08:31:53.279+0200    INFO    input/input.go:149      input ticker stopped
2019-08-08T08:31:53.282+0200    INFO    input/input.go:167      Stopping Input: 6636842518838959972
2019-08-08T08:31:53.283+0200    INFO    input/input.go:149      input ticker stopped
2019-08-08T08:31:53.281+0200    INFO    input/input.go:149      input ticker stopped
2019-08-08T08:31:53.287+0200    INFO    input/input.go:167      Stopping Input: 4822703783625690921
2019-08-08T08:31:53.284+0200    INFO    input/input.go:167      Stopping Input: 6798998971656588808
2019-08-08T08:31:53.288+0200    DEBUG   [reload]        cfgfile/list.go:131     Stopped runner: mysql (slowlog, error)
2019-08-08T08:31:53.289+0200    DEBUG   [reload]        cfgfile/list.go:131     Stopped runner: apache (access, error)
2019-08-08T08:31:53.291+0200    INFO    crawler/crawler.go:165  Crawler stopped
2019-08-08T08:31:53.291+0200    INFO    registrar/registrar.go:367      Stopping Registrar
2019-08-08T08:31:53.293+0200    INFO    registrar/registrar.go:293      Ending Registrar
2019-08-08T08:31:53.294+0200    DEBUG   [registrar]     registrar/registrar.go:411      Write registry file: C:\Filebeat\data\registry\filebeat\data.json (0)
2019-08-08T08:31:53.112+0200    INFO    input/input.go:114      Starting input of type: log; ID: 6636842518838959972
2019-08-08T08:31:53.114+0200    INFO    input/input.go:114      Starting input of type: log; ID: 6798998971656588808
2019-08-08T08:31:53.114+0200    DEBUG   [input] log/input.go:187        Start next scan
2019-08-08T08:31:53.116+0200    DEBUG   [input] log/input.go:187        Start next scan
2019-08-08T08:31:53.118+0200    DEBUG   [input] log/input.go:208        input states cleaned up. Before: 0, After: 0, Pending: 0
2019-08-08T08:31:53.119+0200    DEBUG   [input] log/input.go:208        input states cleaned up. Before: 0, After: 0, Pending: 0
2019-08-08T08:31:53.132+0200    DEBUG   [input] log/config.go:204       recursive glob enabled
2019-08-08T08:31:53.132+0200    DEBUG   [input] log/input.go:160        exclude_files: [(?-s:.)gz(?-m:$)]. Number of stats: 0
2019-08-08T08:31:53.133+0200    DEBUG   [input] log/input.go:181        input with previous states loaded: 0
2019-08-08T08:31:53.135+0200    INFO    log/input.go:148        Configured paths: [c:\programdata\MySQL\MySQL Server*\error.log*]
2019-08-08T08:31:53.138+0200    DEBUG   [publisher]     pipeline/client.go:149  client: closing acker
2019-08-08T08:31:53.139+0200    DEBUG   [publisher]     pipeline/client.go:151  client: done closing acker
2019-08-08T08:31:53.139+0200    DEBUG   [input] log/config.go:204       recursive glob enabled
2019-08-08T08:31:53.141+0200    DEBUG   [publisher]     pipeline/client.go:155  client: cancelled 0 events
2019-08-08T08:31:53.143+0200    DEBUG   [input] log/input.go:160        exclude_files: [(?-s:.)gz(?-m:$)]. Number of stats: 0
2019-08-08T08:31:53.144+0200    DEBUG   [input] log/input.go:181        input with previous states loaded: 0
2019-08-08T08:31:53.146+0200    INFO    log/input.go:148        Configured paths: [c:\programdata\MySQL\MySQL Server*\mysql-slow.log*]
2019-08-08T08:31:53.150+0200    DEBUG   [reload]        cfgfile/list.go:101     Starting runner: mysql (error, slowlog)
2019-08-08T08:31:53.150+0200    DEBUG   [publisher]     pipeline/client.go:149  client: closing acker
2019-08-08T08:31:53.153+0200    DEBUG   [publisher]     pipeline/client.go:151  client: done closing acker
2019-08-08T08:31:53.151+0200    INFO    elasticsearch/client.go:166     Elasticsearch url: http://192.168.1.176:9000
2019-08-08T08:31:53.154+0200    DEBUG   [publisher]     pipeline/client.go:155  client: cancelled 0 events
2019-08-08T08:31:53.156+0200    DEBUG   [elasticsearch] elasticsearch/client.go:711     ES Ping(url=http://192.168.1.176:9000)
2019-08-08T08:31:53.170+0200    DEBUG   [elasticsearch] elasticsearch/client.go:734     Ping status code: 200
2019-08-08T08:31:53.170+0200    INFO    elasticsearch/client.go:735     Attempting to connect to Elasticsearch version 7.2.0
2019-08-08T08:31:53.170+0200    DEBUG   [elasticsearch] elasticsearch/client.go:753     GET http://192.168.1.176:9000/_xpack?human=false  <nil>
2019-08-08T08:31:53.221+0200    DEBUG   [modules]       fileset/pipelines.go:67 Required processors: []
2019-08-08T08:31:53.232+0200    DEBUG   [elasticsearch] elasticsearch/client.go:753     GET http://192.168.1.176:9000/_ingest/pipeline/filebeat-7.2.1-mysql-slowlog-pipeline  <nil>
2019-08-08T08:31:53.242+0200    DEBUG   [modules]       fileset/pipelines.go:120        Pipeline filebeat-7.2.1-mysql-slowlog-pipeline already loaded
2019-08-08T08:31:53.242+0200    DEBUG   [modules]       fileset/pipelines.go:67 Required processors: []
2019-08-08T08:31:53.248+0200    DEBUG   [elasticsearch] elasticsearch/client.go:753     GET http://192.168.1.176:9000/_ingest/pipeline/filebeat-7.2.1-mysql-error-pipeline  <nil>
2019-08-08T08:31:53.261+0200    DEBUG   [modules]       fileset/pipelines.go:120        Pipeline filebeat-7.2.1-mysql-error-pipeline already loaded

au niveau de log je vois rien

Merci pour ton aide

La connexion jusqu'a elastic a l'air correct!

L'acces aux fichiers de conf a l'air de poser probleme, le chemin est correct ? filebeat a acces aux fichiers?

Desole pour le malentendu mais quand je parlais de logs je voulais dire les logs de filebeat sur la machine client. Sous linux c'est /var/log/filebeat/xxx
Sous Windows j'en ai aucune idee.

Y'a un autre thread a propose de windows un peu vieux mais ca peux peut etre aider:

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