generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 7
feat(logs): adds alert for failing logs exporting, adds playbook #1260
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
84c395d
feat(logs): adds alert for failing logs exporting, adds playbook
olandr 464a5fc
chore(logs): run make generate-readme
olandr 8e755ff
docs(logs): update playbook
olandr 855a90e
Update logs/playbooks/LogsExportingFailed.md
olandr f7efeae
Update logs/playbooks/LogsExportingFailed.md
olandr 4c3990b
Update logs/playbooks/LogsExportingFailed.md
olandr dca7bc3
Update logs/playbooks/LogsExportingFailed.md
olandr 0de7f92
chore(logs): bump versions
olandr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| title: Logs exporting is failing | ||
| weight: 20 | ||
| --- | ||
|
|
||
| ## Root Cause Analysis | ||
|
|
||
| Determine if the lack of sent logs is expected: | ||
| - Check if the Plugin is up and running via the Greenhouse Dashboard. | ||
| - Check if there are other alerts that would indicate a lack of sent logs (`CrashLoopBackoff`, `ErrImagePull`). | ||
| - Check operational logs for the pods (requests failing, incorrect credentials for logshipping). | ||
| - Check that the sink (e.g. OpenSearch) is ready to receive logs e.g. by checking if pods of the backend are in `RUNNING` state: | ||
| ``` | ||
| kubectl k get pods -n <backend-namespace> -o wide | ||
| ``` | ||
|
|
||
| ## Solution | ||
|
|
||
| ### In Case of Expected Downtime | ||
| Mute the alert temporarily via Greenhouse until the plugin is healthy again and notify the responsible service owner. | ||
|
|
||
| ### In Case of an Unexpected Downtime | ||
|
|
||
| If other pods in the cluster are working, check the operational logs for any error messages: | ||
| ```bash | ||
| kubectl logs daemonset/logs-collector -n <namespace> | grep -i 'error' | ||
| ``` | ||
|
|
||
| Determine the cause of action accordingly, some previously observed issues. | ||
|
|
||
| #### Is it ConfigMap related? | ||
| Configuration issue, syntax problem, indentation issue within the pipeline | ||
| 1. Check configMap for the running collector. Make sure that the collector is running the latest configMap: | ||
| ```bash | ||
| kubectl get ds/logs-collector -n <namespace> -o=jsonpath='{.spec.template.spec.volumes[].configMap.name}' | ||
| kubectl get cm -n <namespace> --sort-by=.metadata.creationTimestamp | ||
| ``` | ||
| 2. Action: update configMap, deploy a fix. | ||
| 3. Action: Restart the logs-collector: | ||
| ```bash | ||
| kubectl rollout restart daemonset/logs-collector -n <namespace> | ||
| ``` | ||
|
|
||
| #### Is it a connection issue between the collector and the sink? | ||
| There could be an issue with the throttling, latency, connection timeouts when exporting to the sink | ||
| 1. Check if the sink is running and accepting connections | ||
| 2. Check if the sink enough resources to accept new logs (cpu, memory, storage). | ||
| 3. Action: Refer to documentation relating to the logs sink. | ||
| #### Is it a authentication/authorization issue between the collector and the sink? | ||
| Permission issues with missing, wrong or out-of-sync credentials | ||
| 1. Check which credentials is being used by checking the secret: | ||
| ```bash | ||
| kubectl get ds/logs-collector -n <namespace> -o=jsonpath='{.spec.template.spec.containers[].envFrom[].secretRef.name}' | ||
| 2. Action: Update secrets for credentials used by the collector and update accordingly. | ||
| 3. Action: Restart the logs-collector: | ||
| ```bash | ||
| kubectl rollout restart daemonset/logs-collector -n <namespace> | ||
| ``` | ||
|
|
||
| ### Ensure that the pods has been recreated by the operator after some time | ||
|
|
||
| ### Observe the logs for the Pod to ensure that the problem has been resolved. | ||
|
|
||
| ### Done. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.