Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebeat NGINX module 7.10.0 Upgrade Errors #22567

Closed
christophercutajar opened this issue Nov 12, 2020 · 11 comments
Closed

Filebeat NGINX module 7.10.0 Upgrade Errors #22567

christophercutajar opened this issue Nov 12, 2020 · 11 comments
Labels
bug Team:Services (Deprecated) Label for the former Integrations-Services team

Comments

@christophercutajar
Copy link

For confirmed bugs, please report:

  • Version: 7.10.0
  • Operating System: ECK 1.3
  • Steps to Reproduce: Upgrade filebeat with nginx module from 7.9.3 to 7.10.0

While upgrading filebeat from 7.9.3 to 7.10.0 which leverage a nginx module the deployment was failing. After checking the log file I had the below errors:

2020-11-12T11:04:12.865Z        ERROR   instance/beat.go:951    Exiting: 1 error: Error setting up ML for nginx_ecs: 10 errors: ; ; ; ; ; ; ; ; ; 
Exiting: 1 error: Error setting up ML for nginx_ecs: 10 errors: ; ; ; ; ; ; ; ; ;
2020-11-12T11:37:14.792Z        ERROR   instance/beat.go:951    Exiting: 1 error: Error setting up ML for nginx_ecs: cannot set up ML with prefix: filebeat-nginx_ecs-access-, response: 
Exiting: 1 error: Error setting up ML for nginx_ecs: cannot set up ML with prefix: filebeat-nginx_ecs-access-, response:
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 12, 2020
@kvch kvch added the Team:Services (Deprecated) Label for the former Integrations-Services team label Nov 12, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 12, 2020
@kvch kvch self-assigned this Nov 12, 2020
@christophercutajar
Copy link
Author

christophercutajar commented Nov 12, 2020

filebeat.yml looks like this:

setup.dashboards.enabled: true
setup.template.enabled: true
setup.template.overwrite: true
setup.kibana:
host: "xxxxxx-kb-http:5601"
username: ${ELASTIC_USERNAME}
password: ${ELASTIC_PASSWORD}
protocol: https
ssl:
  enabled: true
  certificate_authorities: /usr/share/filebeat/pki/kibana.crt
  supported_protocols: ["TLSv1.2"]
  renegotiation: never

filebeat.modules:
- module: elasticsearch
- module: logstash
- module: kibana
- module: nginx

output.elasticsearch:
  hosts: ["xxxxxx-es-http:9200"]
  loadbalance: true
  max_retries: 0 # retry forever
  username: ${ELASTIC_USERNAME}
  password: ${ELASTIC_PASSWORD}
  protocol: https
  ssl:
    enabled: true
    certificate_authorities: /usr/share/filebeat/pki/elasticsearch.crt
    supported_protocols: ["TLSv1.2"]
    renegotiation: never

@christophercutajar
Copy link
Author

Linking some issues provided by @sophiec20 in relation to this issue:

Using the elastic user still keeps getting the same error logs.

@christophercutajar
Copy link
Author

@kvch By adding --dashboards --index-management to the filebeat -e setup in our Helm configuration and leaving the modules configured in the yml file, did the job!

What now I'm not sure is how to load the ML jobs for nginx, unless they are pre-loaded!

@EvgeniGordeev
Copy link

EvgeniGordeev commented Dec 14, 2020

@christophercutajar filebeat setup -e --modules nginx --dashboards --index-management didn't help in our case (Kubernetes 1.16 cluster, ingress-nginx v0.40.2), actually also tried to upgrade to 7.10.1 but without luck. While checking events on the Discover tab I don't see any hits with event.module:nginx as they used to be in 7.9.3.

BTW the dashboards were recreated in Kibana but now [Filebeat Nginx] Overview ECS gives errors like Saved field "source.geo.location" is invalid for use with the "Geohash" aggregation. Please select a new field. and Saved field "user_agent.version" is invalid for use with the "Terms" aggregation. Please select a new field.. Which leads to an assumption that dashboard piece inside filebeat module directory is not compatible with the latest elasticsearch version.

filebeat.yml:

      filebeat.inputs:
      - type: container
        paths:
          - /var/log/containers/*.log
        processors:
        - add_kubernetes_metadata:
            host: ${NODE_NAME}
            matchers:
            - logs_path:
                logs_path: "/var/log/containers/"
      filebeat.config.modules:
        path: ${path.config}/modules.d/*.yml
      fields:
        logtype: kubernetes
        kubernetes.cluster.name: '${EKS_CLUSTER_NAME:undefined}'
        k8s.cluster.name: '${EKS_CLUSTER_NAME:undefined}'
      setup.kibana:
        host: "elastic-stack-kibana:5601"
        protocol: "http"
      output.elasticsearch:
        host: '${NODE_NAME}'
        hosts: '${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}'
      # setup custom index name since we use a single ES for multiple clusters
      setup.ilm:
        rollover_alias: 'filebeat-${EKS_CLUSTER_NAME:undefined}-%{[agent.version]}'
        overwrite: true
      setup.template.settings:
        index:
          max_docvalue_fields_search: 200
      filebeat.autodiscover:
        providers:
          - type: kubernetes
            templates:
              - condition:
                  equals:
                    kubernetes.labels.app: ingress-nginx
                config:
                  - module: nginx
                    error:
                      enabled: true
                    ingress_controller:
                      enabled: true
                      input:
                        type: container
                        containers.ids:
                          - "${data.kubernetes.container.id}"

@EvgeniGordeev
Copy link

still the same issue with 7.10.2 - loading dashboards with filebeat (filebeat setup -e --modules nginx --dashboards --index-management) did NOT help

@urso urso added the bug label Mar 29, 2021
@roysG
Copy link

roysG commented Jul 20, 2021

Same for me, any update?

@christophercutajar
Copy link
Author

Same for me, any update?

What version are you running @roysG?

@roysG
Copy link

roysG commented Jul 20, 2021 via email

@roysG
Copy link

roysG commented Jul 20, 2021

filebeat version 7.13.3 (amd64), libbeat 7.13.3 [3ddad4c built 2021-07-02 12:11:38 +0000 UTC]

@kvch kvch removed their assignment Oct 6, 2021
@jlind23
Copy link
Collaborator

jlind23 commented Mar 31, 2022

Backlog grooming: Closing for now.

@jlind23 jlind23 closed this as completed Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

No branches or pull requests

7 participants