Unable to upload netflow data to Elasticsearch with filebeat netflow module

All,

I am trying to upload data from filebeat directly to ES. I see I am able to connect to my ES instance and I am getting netflow data into filebeat but when I search my ES I don't see any new indices I created or data. Am I missing something?

Configs:

#==================== Elasticsearch template setting ==========================
setup.template.name: "netflow"
setup.template.pattern: "netflow-*"
setup.template.settings:
  index.number_of_shards: 1
  #index.codec: best_compression
  #_source.enabled: false


#================================ 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: ["2.2.2.1:9200"]
  index: "netflow-%{+yyyy.MM.dd}"
  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #username: "elastic"
  #password: "changeme"

#================================ 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: ["*"]

Logs:

2020-01-23T11:01:36.350-0500 INFO instance/beat.go:610 Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]

2020-01-23T11:01:36.357-0500 DEBUG [beat] instance/beat.go:662 Beat metadata path: /var/lib/filebeat/meta.json

2020-01-23T11:01:36.358-0500 INFO instance/beat.go:618 Beat ID: 4a83ed96-9494-400e-812c-7baacc75bbc2

2020-01-23T11:01:36.359-0500 DEBUG [filters] add_cloud_metadata/providers.go:126 add_cloud_metadata: starting to fetch metadata, timeout=3s

2020-01-23T11:01:36.359-0500 DEBUG [docker] docker/client.go:48 Docker client will negotiate the API version on the first request.

2020-01-23T11:01:36.360-0500 DEBUG [add_docker_metadata] add_docker_metadata/add_docker_metadata.go:88 add_docker_metadata: docker environment not detected: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

2020-01-23T11:01:36.361-0500 DEBUG [kubernetes] add_kubernetes_metadata/kubernetes.go:112 add_kubernetes_metadata: could not create kubernetes client using in_cluster config: unable to build kube config due to error: invalid configuration: no configuration has been provided

2020-01-23T11:01:39.359-0500 DEBUG [filters] add_cloud_metadata/providers.go:169 add_cloud_metadata: timed-out waiting for all responses

2020-01-23T11:01:39.360-0500 DEBUG [filters] add_cloud_metadata/providers.go:129 add_cloud_metadata: fetchMetadata ran for 3.000274263s

2020-01-23T11:01:39.360-0500 INFO add_cloud_metadata/add_cloud_metadata.go:89 add_cloud_metadata: hosting provider type not detected.

2020-01-23T11:01:39.360-0500 DEBUG [processors] processors/processor.go:101 Generated new processors: add_host_metadata=[netinfo.enabled=[false], cache.ttl=[5m0s]], add_cloud_metadata=null, add_docker_metadata=[match_fields=[] match_pids=[process.pid, process.ppid]], add_kubernetes_metadata

[SNIP]

2020-01-23T11:01:39.362-0500 INFO instance/beat.go:297 Setup Beat: filebeat; Version: 7.5.2

2020-01-23T11:01:39.362-0500 DEBUG [beat] instance/beat.go:323 Initializing output plugins

2020-01-23T11:01:39.362-0500 INFO [index-management] idxmgmt/std.go:182 Set output.elasticsearch.index to 'filebeat-7.5.2' as ILM is enabled.

2020-01-23T11:01:39.362-0500 INFO elasticsearch/client.go:171 Elasticsearch url: http://2.2.2.1:9200

2020-01-23T11:01:39.362-0500 DEBUG [publisher] pipeline/consumer.go:137 start pipeline event consumer

2020-01-23T11:01:39.362-0500 INFO [publisher] pipeline/module.go:97 Beat name: cvt-logstash-server

2020-01-23T11:01:39.363-0500 INFO [monitoring] log/log.go:118 Starting metrics logging every 30s

2020-01-23T11:01:39.363-0500 INFO instance/beat.go:429 filebeat start running.

2020-01-23T11:01:39.363-0500 DEBUG [test] registrar/migrate.go:159 isFile(/var/lib/filebeat/registry) -> false

2020-01-23T11:01:39.363-0500 DEBUG [test] registrar/migrate.go:159 isFile() -> false

2020-01-23T11:01:39.363-0500 DEBUG [test] registrar/migrate.go:152 isDir(/var/lib/filebeat/registry/filebeat) -> true

2020-01-23T11:01:39.363-0500 DEBUG [test] registrar/migrate.go:159 isFile(/var/lib/filebeat/registry/filebeat/meta.json) -> true

2020-01-23T11:01:39.363-0500 DEBUG [registrar] registrar/migrate.go:51 Registry type '0' found

2020-01-23T11:01:39.363-0500 DEBUG [registrar] registrar/registrar.go:125 Registry file set to: /var/lib/filebeat/registry/filebeat/data.json

2020-01-23T11:01:39.363-0500 INFO registrar/registrar.go:145 Loading registrar data from /var/lib/filebeat/registry/filebeat/data.json

2020-01-23T11:01:39.363-0500 INFO registrar/registrar.go:152 States Loaded from registrar: 0

2020-01-23T11:01:39.363-0500 INFO crawler/crawler.go:72 Loading Inputs: 0

2020-01-23T11:01:39.363-0500 DEBUG [cfgfile] cfgfile/reload.go:133 Checking module configs from: /etc/filebeat/modules.d/*.yml

2020-01-23T11:01:39.363-0500 DEBUG [registrar] registrar/registrar.go:278 Starting Registrar

2020-01-23T11:01:39.363-0500 DEBUG [cfgfile] cfgfile/cfgfile.go:193 Load config from file: /etc/filebeat/modules.d/netflow.yml

2020-01-23T11:01:39.363-0500 DEBUG [cfgfile] cfgfile/reload.go:147 Number of module configs found: 1

2020-01-23T11:01:39.364-0500 INFO crawler/crawler.go:106 Loading and starting Inputs completed. Enabled inputs: 0

2020-01-23T11:01:39.364-0500 INFO cfgfile/reload.go:171 Config reloader started

2020-01-23T11:01:39.364-0500 DEBUG [cfgfile] cfgfile/reload.go:197 Scan for new config files

2020-01-23T11:01:39.365-0500 DEBUG [cfgfile] cfgfile/cfgfile.go:193 Load config from file: /etc/filebeat/modules.d/netflow.yml

2020-01-23T11:01:39.365-0500 DEBUG [cfgfile] cfgfile/reload.go:216 Number of module configs found: 1

2020-01-23T11:01:39.365-0500 DEBUG [reload] cfgfile/list.go:62 Starting reload procedure, current runners: 0

2020-01-23T11:01:39.365-0500 DEBUG [reload] cfgfile/list.go:80 Start list: 1, Stop list: 0

2020-01-23T11:01:39.366-0500 DEBUG [reload] cfgfile/list.go:101 Starting runner: netflow (log)

2020-01-23T11:01:39.366-0500 INFO elasticsearch/client.go:171 Elasticsearch url: http://2.2.2.1:9200

2020-01-23T11:01:39.366-0500 DEBUG [elasticsearch] elasticsearch/client.go:729 ES Ping(url=http://2.2.2.1:9200)

2020-01-23T11:01:39.371-0500 DEBUG [elasticsearch] elasticsearch/client.go:752 Ping status code: 200

2020-01-23T11:01:39.371-0500 INFO elasticsearch/client.go:753 Attempting to connect to Elasticsearch version 7.5.1

2020-01-23T11:01:39.371-0500 DEBUG [elasticsearch] elasticsearch/client.go:771 GET http://2.2.2.1:9200/_xpack?human=false <nil>

2020-01-23T11:01:39.400-0500 DEBUG [modules] fileset/pipelines.go:67 Required processors: [{geoip ingest-geoip}]

2020-01-23T11:01:39.400-0500 DEBUG [elasticsearch] elasticsearch/client.go:771 GET http://2.2.2.1:9200/_nodes/ingest <nil>

2020-01-23T11:01:39.403-0500 DEBUG [elasticsearch] elasticsearch/client.go:771 GET http://2.2.2.1:9200/_ingest/pipeline/filebeat-7.5.2-netflow-log-pipeline <nil>

2020-01-23T11:01:39.405-0500 DEBUG [modules] fileset/pipelines.go:120 Pipeline filebeat-7.5.2-netflow-log-pipeline already loaded

2020-01-23T11:01:39.405-0500 INFO input/input.go:114 Starting input of type: netflow; ID: 4492343577594537143 

2020-01-23T11:01:39.405-0500 INFO cfgfile/reload.go:226 Loading of config files completed.

2020-01-23T11:01:39.405-0500 INFO [netflow] netflow/input.go:153 Starting UDP input

2020-01-23T11:01:39.405-0500 INFO [udp] udp/server.go:81 Started listening for UDP connection {"address": "10.8.134.185:2057"}

2020-01-23T11:01:44.106-0500 DEBUG [netflow] netflow/input.go:80 [ipfix] Packet from:10.8.69.21:11170 src:768 seq:2895000

2020-01-23T11:01:44.106-0500 DEBUG [netflow] netflow/input.go:80 [ipfix] Session 10.8.69.21:11170 reset (sequence=2895000 last=0)

2020-01-23T11:01:44.106-0500 DEBUG [netflow] netflow/input.go:80 [ipfix] FlowSet ID 2 length 16

2020-01-23T11:01:44.106-0500 DEBUG [netflow] netflow/input.go:80 [ipfix] state 0xc000096900 addTemplate 335 0xc000096f40

2020-01-23T11:01:44.405-0500 DEBUG [netflow] netflow/input.go:214 Stats total:[ packets=1 dropped=0 flows=0 queue_len=0 ] delta:[ packets/s=1 dropped/s=0 flows/s=0 queue_len/s=+0 ]

2020-01-23T11:01:49.405-0500 DEBUG [input] input/input.go:152 Run input

Hi @GregoryBrown,

Starting on Beats 7.0 indexes are managed by default by ILM, and some options for index naming are ignored if ILM is enabled. Please take a look to ILM documentation: https://www.elastic.co/guide/en/beats/filebeat/7.5/ilm.html

You may have your data in filebeat-* indexes. Do indexes starting by filebeat exist in your cluster?

Jaime,

I only see the following index in my ES cluster:
filebeat-7.5.2-2020.01.22-000001 (but it has 0 docs)

With beats using ILM do the following configuration settings do anything?

setup.template.name: "netflow"
setup.template.pattern: "netflow-*"
setup.template.settings:
index.number_of_shards: 1
index: "netflow-%{+yyyy.MM.dd}"

Thanks

Umm, if it is collecting something the documents should be stored somewhere :slight_smile:

Do you see any event being sent on the debug log?

In general it is not needed to use customized index configuration, is there any specific reason you want to do that?

From the curl on the ES cluster:

green open filebeat-7.5.2-2020.01.22-000001 H4FeMcJURQG-V66Yk8-GPQ 1 1 0 0 566b 283b

Not sure where it would be stored. Do you want the filebeat debug logs or ES debug logs? The filebeat looks the same as above.

The reason I want to use custom index was originally I was going to use logstash (and the netflow input plugin) and export to ES, but the docs say it is deprecated in 7.4 and to use filebeat with the netflow module. I basically want to just store netflow data into ES whatever way is easiest

Thanks

I mean in filebeat debug logs. If it is sending any event it should be logged.

I would keep the default configuration for indexes and focus in confirming that the configuration for the netflow module

It should work with the netflow module for Filebeat, could you share the configuration you are using for this module?

Here is the full filebeat configuration

###################### 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:
#- type: netflow
#  host: "0.0.0.0:2057"
#  protocols: [ v5, v9, ipfix ]
  

# 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: false

  # Paths that should be crawled and fetched. Glob based paths.
 # paths:
 #   - /var/log/*.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.name: "netflow"
setup.template.pattern: "netflow-*"
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: ["2.2.2.1:9200"]
  index: "netflow-%{+yyyy.MM.dd}"
  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #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

Netflow module config file

# Module: netflow
# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.5/filebeat-module-netflow.html

- module: netflow
  log:
    enabled: true
    var:
      netflow_host: 10.8.134.185
      netflow_port: 2057

Here is the filebeat debug logs:

lab@cvt-logstash-server: /etc/filebeat $ tail -f /var/log/syslog

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.647-0500#011INFO#011elasticsearch/client.go:753#011Attempting to connect to Elasticsearch version 7.5.2

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.647-0500#011DEBUG#011[elasticsearch]#011elasticsearch/client.go:771#011GET http://2.2.2.1:9200/_xpack?human=false <nil>

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.681-0500#011DEBUG#011[modules]#011fileset/pipelines.go:67#011Required processors: [{geoip ingest-geoip}]

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.681-0500#011DEBUG#011[elasticsearch]#011elasticsearch/client.go:771#011GET http://2.2.2.1:9200/_nodes/ingest <nil>

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.686-0500#011DEBUG#011[elasticsearch]#011elasticsearch/client.go:771#011GET http://2.2.2.1:9200/_ingest/pipeline/filebeat-7.5.2-netflow-log-pipeline <nil>

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.693-0500#011DEBUG#011[modules]#011fileset/pipelines.go:120#011Pipeline filebeat-7.5.2-netflow-log-pipeline already loaded

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.693-0500#011INFO#011input/input.go:114#011Starting input of type: netflow; ID: 4492343577594537143

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.693-0500#011INFO#011cfgfile/reload.go:226#011Loading of config files completed.

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.693-0500#011INFO#011[netflow]#011netflow/input.go:153#011Starting UDP input

Jan 24 14:27:53 cvt-logstash-server filebeat[8036]: 2020-01-24T14:27:53.694-0500#011INFO#011[udp]#011udp/server.go:81#011Started listening for UDP connection#011{"address": "10.8.134.185:2057"}

Jan 24 14:28:01 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:01.579-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] Packet from:10.8.69.21:11170 src:768 seq:2895000

Jan 24 14:28:01 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:01.579-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] Session 10.8.69.21:11170 reset (sequence=2895000 last=0)

Jan 24 14:28:01 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:01.579-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] FlowSet ID 3 length 16

Jan 24 14:28:01 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:01.579-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] state 0xc00015d5c0 addTemplate 256 0xc00015d6c0

Jan 24 14:28:01 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:01.694-0500#011DEBUG#011[netflow]#011netflow/input.go:214#011Stats total:[ packets=1 dropped=0 flows=0 queue_len=0 ] delta:[ packets/s=1 dropped/s=0 flows/s=0 queue_len/s=+0 ]

Jan 24 14:28:03 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:03.694-0500#011DEBUG#011[input]#011input/input.go:152#011Run input

Jan 24 14:28:05 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:05.579-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] Packet from:10.8.69.21:11170 src:768 seq:2895000

Jan 24 14:28:05 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:05.579-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] FlowSet ID 2 length 16

Jan 24 14:28:05 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:05.579-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] state 0xc00015d5c0 addTemplate 335 0xc00015d700

Jan 24 14:28:05 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:05.694-0500#011DEBUG#011[netflow]#011netflow/input.go:214#011Stats total:[ packets=2 dropped=0 flows=0 queue_len=0 ] delta:[ packets/s=1 dropped/s=0 flows/s=0 queue_len/s=+0 ]

Jan 24 14:28:13 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:13.694-0500#011DEBUG#011[input]#011input/input.go:152#011Run input

Jan 24 14:28:23 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:23.641-0500#011INFO#011[monitoring]#011log/log.go:145#011Non-zero metrics in the last 30s#011{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":10,"time":{"ms":15}},"total":{"ticks":60,"time":{"ms":72},"value":60},"user":{"ticks":50,"time":{"ms":57}}},"handles":{"limit":{"hard":524288,"soft":1024},"open":9},"info":{"ephemeral_id":"3461ffd6-a866-4034-b412-cf6eb11472b1","uptime":{"ms":33035}},"memstats":{"gc_next":8703616,"memory_alloc":5573352,"memory_total":12828472,"rss":45899776},"runtime":{"goroutines":28}},"filebeat":{"harvester":{"open_files":0,"running":0},"input":{"netflow":{"packets":{"received":2}}}},"libbeat":{"config":{"module":{"running":0},"reloads":1},"output":{"type":"elasticsearch"},"pipeline":{"clients":2,"events":{"active":0}}},"registrar":{"states":{"current":0}},"system":{"cpu":{"cores":4},"load":{"1":0.02,"15":0,"5":0.02,"norm":{"1":0.005,"15":0,"5":0.005}}}}}}

Jan 24 14:28:23 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:23.694-0500#011DEBUG#011[input]#011input/input.go:152#011Run input

Jan 24 14:28:31 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:31.580-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] Packet from:10.8.69.21:11170 src:768 seq:2895000

Jan 24 14:28:31 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:31.580-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] FlowSet ID 3 length 16

Jan 24 14:28:31 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:31.580-0500#011DEBUG#011[netflow]#011netflow/input.go:80#011[ipfix] state 0xc00015d5c0 addTemplate 256 0xc00056fc80

Jan 24 14:28:31 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:31.694-0500#011DEBUG#011[netflow]#011netflow/input.go:214#011Stats total:[ packets=3 dropped=0 flows=0 queue_len=0 ] delta:[ packets/s=1 dropped/s=0 flows/s=0 queue_len/s=+0 ]

Jan 24 14:28:33 cvt-logstash-server filebeat[8036]: 2020-01-24T14:28:33.694-0500#011DEBUG#011[input]#011input/input.go:152#011Run input

lab@cvt-logstash-server : /etc/filebeat $ sudo cat /var/log/filebeat/filebeat

2020-01-23T10:43:18.870-0500 INFO instance/beat.go:610 Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]

2020-01-23T10:43:18.880-0500 DEBUG [beat] instance/beat.go:662 Beat metadata path: /var/lib/filebeat/meta.json

2020-01-23T10:43:18.880-0500 INFO instance/beat.go:618 Beat ID: 4a83ed96-9494-400e-812c-7baacc75bbc2

2020-01-23T10:43:18.881-0500 DEBUG [docker] docker/client.go:48 Docker client will negotiate the API version on the first request.

2020-01-23T10:43:18.881-0500 DEBUG [add_docker_metadata] add_docker_metadata/add_docker_metadata.go:88 add_docker_metadata: docker environment not detected: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

2020-01-23T10:43:18.882-0500 DEBUG [kubernetes] add_kubernetes_metadata/kubernetes.go:112 add_kubernetes_metadata: could not create kubernetes client using in_cluster config: unable to build kube config due to error: invalid configuration: no configuration has been provided

2020-01-23T10:43:18.882-0500 DEBUG [filters] add_cloud_metadata/providers.go:126 add_cloud_metadata: starting to fetch metadata, timeout=3s

2020-01-23T10:43:21.882-0500 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for openstack after 3.00024294s. result=[provider:openstack, error=failed requesting openstack metadata: Get http://169.254.169.254/2009-04-04/meta-data/instance-id: net/http: request canceled (Client.Timeout exceeded while awaiting headers), metadata={}]

2020-01-23T10:43:21.882-0500 DEBUG [filters] add_cloud_metadata/providers.go:169 add_cloud_metadata: timed-out waiting for all responses

2020-01-23T10:43:21.882-0500 DEBUG [filters] add_cloud_metadata/providers.go:129 add_cloud_metadata: fetchMetadata ran for 3.000407782s

2020-01-23T10:43:21.882-0500 INFO add_cloud_metadata/add_cloud_metadata.go:89 add_cloud_metadata: hosting provider type not detected.

2020-01-23T10:43:21.882-0500 DEBUG [processors] processors/processor.go:101 Generated new processors: add_host_metadata=[netinfo.enabled=[false], cache.ttl=[5m0s]], add_cloud_metadata=null, add_docker_metadata=[match_fields=[] match_pids=[process.pid, process.ppid]], add_kubernetes_metadata

According to the log, only 3 IPFIX packets are received, these 3 packets contain templates (options template template 256 and flow template 335), but no flows, so there is nothing to send to Elasticsearch.

[ipfix] Packet from:10.8.69.21:11170 src:768 seq:2895000
[ipfix] Session 10.8.69.21:11170 reset (sequence=2895000 last=0)
[ipfix] FlowSet ID 3 length 16
[ipfix] state 0xc00015d5c0 addTemplate 256 0xc00015d6c0
Stats total:[ packets=1 dropped=0 flows=0 queue_len=0 ] delta:[ packets/s=1 dropped/s=0 flows/s=0 queue_len/s=+0 ]
[ipfix] Packet from:10.8.69.21:11170 src:768 seq:2895000
[ipfix] FlowSet ID 2 length 16
[ipfix] state 0xc00015d5c0 addTemplate 335 0xc00015d700
Stats total:[ packets=2 dropped=0 flows=0 queue_len=0 ] delta:[ packets/s=1 dropped/s=0 flows/s=0 queue_len/s=+0 ]
[ipfix] Packet from:10.8.69.21:11170 src:768 seq:2895000
[ipfix] FlowSet ID 3 length 16
[ipfix] state 0xc00015d5c0 addTemplate 256 0xc00056fc80
Stats total:[ packets=3 dropped=0 flows=0 queue_len=0 ] delta:[ packets/s=1 dropped/s=0 flows/s=0 queue_len/s=+0 ]

The fact that the sequence number (seq:NNNNNN) doesn't change between packets (always 2895000) is also an indicator that no flows have been sent by the exporter.

You need to review the configuration of your device. It's either not processing any traffic or applying some kind of filtering to the flows.

I recommend you use Wireshark, configure the CFLOW/IPFIX protocol to decode port 2057 and you will be able to see if the packets contain flows: [Data:NNN], or templates: [Data-Template:NNN] and [Options-Template:NNN], as shown below:

For a device operating correctly you should see as in the image, lots of Data packets and a few packets containing templates in between.

1 Like

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