Repository navigation
merge to main from Vishwa/azuremonitor-1 - #1
Merged
Merged
Conversation
vishiy
pushed a commit
that referenced
this pull request
Aug 2, 2025
…GPT#693) When importing holmes and leverage RichHandler to handle log, we need to remove existing log handlers to not let existing log handler break the outpout format of holmes CLI. As a result, the log may not be printed out as expected, for example, ``` Welcome to HolmesGPT: Type '/exit' to exit, '/help' for commands. User: what's my cluster info Thinking... ╭─ AI Response ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ Cluster: AKS, region southeastasia, 7 nodes. │ │ │ │ • Nodepools: containerd2 (Azure Linux), nodepool1 (Ubuntu), win (Windows) │ │ • Kubernetes version: v1.33.0 │ │ • Network policy: calico │ │ • All nodes Ready, VMSS-backed, Premium_LRS storage. │ │ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ User: ``` The force arg is explained here: ``` force If this keyword is specified as true, any existing handlers attached to the root logger are removed and closed, before carrying out the configuration as specified by the other arguments. ``` https://github.com/python/cpython/blob/e41c1ce585827f92dab9b7a7fc3df2bda2f817fe/Lib/logging/__init__.py#L2038-L2041 After the change: ``` ✅ Toolset kubernetes/live-metrics ✅ Toolset kubernetes/kube-prometheus-stack ✅ Toolset internet ✅ Toolset runbook ✅ Toolset kubernetes/logs ✅ Toolset docker/core ✅ Toolset helm/core ✅ Toolset kubernetes/core discovered service with label-selector: `app=kube-prometheus-stack-prometheus` at url: `http://prometheus-kube-prometheus-prometheus.default.svc.cluster.local:9090` Prometheus auto discovered at url http://prometheus-kube-prometheus-prometheus.default.svc.cluster.local:9090 ❌ Toolset prometheus/metrics: Failed to initialize using url=http://prometheus-kube-prometheus-prometheus.default.svc.cluster.local:9090/-/healthy Using 36 datasources (toolsets). To refresh: `holmes toolset refresh` Welcome to HolmesGPT: Type '/exit' to exit, '/help' for commands. User: what's my cluster info Thinking... Running tool #1 kubectl_get_by_kind_in_cluster: kubectl get -A --show-labels -o wide node Finished #1 in 0.94s, output length: 10,264 characters - /show to view contents ╭─ AI Response ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ Cluster: MC_qinhao_credential-provider-win_southeastasia Region: southeastasia Kubernetes version: v1.33.0 Nodes: 7 (6 Linux, 1 Windows) Nodepools: │ │ containerd2 (Azure Linux), nodepool1 (Ubuntu), win (Windows) Network policy: calico VM type: Standard_DS2_v2 (Linux), Standard_D2ls_v5 (Windows) │ │ All nodes Ready. │ │ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ```
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.