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

[BUG] missing fields in elasticsearch #234

Closed
1robroos opened this issue Dec 20, 2019 · 3 comments
Closed

[BUG] missing fields in elasticsearch #234

1robroos opened this issue Dec 20, 2019 · 3 comments
Labels
bug

Comments

@1robroos
Copy link

@1robroos 1robroos commented Dec 20, 2019

Describe the bug
A clear and concise description of what the bug is.
I notice missing data in botkube events in elasticsearch.
Here the missing fields:

        t Action	
   	t Channel	
   	t Cluster	ekstestcluster
   	t Code	
   	# Count	0
   	t Error	
   	t Kind	ConfigMap
   	t Level	critical
   	? Messages	  -   <-------------------------! 
   	t Name	test
   	t Namespace	botkube
   	t Reason	
   	? Recommendations	  -     <-------------------------! 
   	 TimeStamp	Dec 20, 2019 @ 10:07:30.733
   	t Title	Resource deleted
   	t Type	delete
   	? Warnings	  -      <-------------------------! 
   	t _id	b_ePIm8BkuQGrCFMp2wQx
   	t _index	botkube2
   	# _score	 - 
   	t _type	botkube-event

In elasticsearch index managemant the botkube index mappings show:

{
  "mapping": {
    "properties": {
      "Action": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Channel": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Cluster": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Code": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Count": {
        "type": "long"
      },
      "Error": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Kind": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Level": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Name": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Namespace": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Reason": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "TimeStamp": {
        "type": "date"
      },
      "Title": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "Type": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      }
    }
  }
}

To Reproduce
Steps to reproduce the behavior:

I am using botkube v 0.9.1 on eks version 1.13 but also on minikube v1.5.2
ES is version 7.4.2

  1. Create an event ( for example kubectl create cm test )
  2. The botkube index will be created in ES
  3. Then in kibana the botkube index can be created
  4. Creating new events will be visible in kibana, but the mentioned fields are empty.
    see also attachment
    Screenshot from 2019-12-20 12-07-52

Expected behavior
Expecting information in the empty fields "messages", "recommendations" and "warnings".)

Screenshots
see attachment

@1robroos 1robroos added the bug label Dec 20, 2019
@1robroos
Copy link
Author

@1robroos 1robroos commented Dec 20, 2019

Update.
I am testing with a pod that has status 'crashloopbackoff' and within Kibana I now see :

Messages | Back-off restarting failed container

see picture:
Screenshot from 2019-12-20 14-48-46

Not sure if this is the way it should be represented though.

@PrasadG193
Copy link
Member

@PrasadG193 PrasadG193 commented Dec 27, 2019

Hey @1robroos, for normal Create/Update/Delete events, we don't attach any message. In some cases, recommendation and warning messages are added by the filters.
These are the default filters in BotKube:

FILTER                  ENABLED DESCRIPTION
ObjectAnnotationChecker true    Checks if annotations botkube.io/* present in object specs and filters them.
PodLabelChecker         true    Checks and adds recommedations if labels are missing in the pod specs.
ImageTagChecker         true    Checks and adds recommendation if 'latest' image tag is used for container image.
IngressValidator        true    Checks if services and tls secrets used in ingress specs are available.
JobStatusChecker        true    Sends notifications only when job succeeds and ignores other job update events.
NamespaceChecker        true    Checks if event belongs to blocklisted namespaces and filter them.
NodeEventsChecker       true    Sends notifications on node level critical events.

@1robroos
Copy link
Author

@1robroos 1robroos commented Jan 21, 2020

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug
Projects
None yet
Development

No branches or pull requests

2 participants