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

[Question]: Same logs are appearing multiple times in Slack #1266

Open
3 of 4 tasks
smartaquarius10 opened this issue Oct 8, 2024 · 0 comments
Open
3 of 4 tasks

[Question]: Same logs are appearing multiple times in Slack #1266

smartaquarius10 opened this issue Oct 8, 2024 · 0 comments

Comments

@smartaquarius10
Copy link

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

v0.0.26

Kubernetes Version

v1.29.8

Host OS and its Version

No response

Steps to reproduce

Host the operator after following steps written here

https://github.com/k8sgpt-ai/k8sgpt-operator

Add slack webhook url and deploy any of these sample pods containing error:

Memory issue

apiVersion: v1
kind: Pod
metadata:
  name: memory-hog
  labels:
    test: k8sgpt
spec:
  containers:
  - name: memory-hog-container
    image: busybox
    resources:
      limits:
        memory: "64Mi"
    command: ["sh", "-c", "stress --vm 1 --vm-bytes 128M --vm-hang 1"]
DNS-failure

apiVersion: v1
kind: Pod
metadata:
  name: dns-failure
  labels:
    test: k8sgpt
spec:
  containers:
  - name: dns-failure-container
    image: busybox
    command: ["sh", "-c", "nslookup nonexistent-service"]

Expected behaviour

If a pod fails, the error message should be sent to Slack only once.

Actual behaviour

The same logs are being pushed to Slack repeatedly every few seconds

[k8sgpt-myapp] K8sGPT analysis of the Pod default/dns-failure
Report
Error: The DNS resolution in the pod named "dns-failure" has failed.
Solution:
1. Check the DNS configuration in the pod.
2. Ensure the DNS server is reachable.
3. Verify network connectivity.

[k8sgpt-myapp] K8sGPT analysis of the Pod default/memory-hog
Report
Error: The last termination reason is Error container=memory-hog-container pod=memory-hog.
Solution:
1. Check the resource limits set for the pod.
2. Increase the memory limit for the memory-hog-container.
3. Restart the pod to apply the changes.

Additional Information

No response

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

No branches or pull requests

1 participant