Skip to content

Krr tries to autodiscover prometheus (which takes time) even though -p flag is given #119

Closed

Description

@otherguy

Krr tries to autodiscover prometheus/victoria/Thanos even though the -p flag is passed to the command.

If it's relevant (it might be because of the [DEBUG] Prometheus not found log line), I'm using a port-forwarded GKE managed Prometheus here.

Note that despite the log messages, it is actually working and spitting out recommendations.

krr simple -v -p http://127.0.0.1:9090 


 _____       _               _          _  _______  _____
|  __ \     | |             | |        | |/ /  __ \|  __ \
| |__) |___ | |__  _   _ ___| |_ __ _  | ' /| |__) | |__) |
|  _  // _ \| '_ \| | | / __| __/ _` | |  < |  _  /|  _  /
| | \ \ (_) | |_) | |_| \__ \ || (_| | | . \| | \ \| | \ \
|_|  \_\___/|_.__/ \__,_|___/\__\__,_| |_|\_\_|  \_\_|  \_\



Running Robusta's KRR (Kubernetes Resource Recommender) v1.4.1
Using strategy: Simple
Using formatter: table

[DEBUG] Found 2 clusters: production, staging
(/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:370)
[DEBUG] Current cluster: staging                (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:371)
[DEBUG] Configured clusters: []         (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:373)
[INFO] Using clusters: ['staging']
[INFO] Listing scannable objects in staging
[DEBUG] Namespaces: *           (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:64)
[DEBUG] Listing deployments in staging          (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:143)
[DEBUG] Listing ArgoCD rollouts in staging              (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:163)
[DEBUG] Listing statefulsets in staging         (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:190)
[DEBUG] Listing daemonsets in staging           (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:210)
[DEBUG] Listing jobs in staging         (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:230)
[DEBUG] Found 1 rollouts in staging             (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:179)
[DEBUG] Found 3 statefulsets in staging         (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:199)
[DEBUG] Found 16 jobs in staging                (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:239)
[DEBUG] Found 38 daemonsets in staging          (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:219)
[DEBUG] Found 72 deployments in staging         (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/kubernetes.pyc:152)
[INFO] Found 175 objects across 19 namespaces in staging
on 0: [INFO] Connecting to Prometheus for staging cluster
on 0: [INFO] Using Prometheus at http://127.0.0.1:9090 for cluster staging
on 0: [DEBUG] Prometheus not found            (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/prometheus/loader.pyc:72)
on 0: [INFO] Connecting to Victoria for staging cluster
on 0: [INFO] Using Victoria at http://127.0.0.1:9090 for cluster staging
on 0: [DEBUG] Victoria Metrics not found              (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/prometheus/loader.pyc:72)
on 0: [INFO] Connecting to Thanos for staging cluster
on 0: [INFO] Using Thanos at http://127.0.0.1:9090 for cluster staging
on 0: [DEBUG] Thanos not found                (/opt/homebrew/Cellar/krr/1.4.1/libexec/robusta_krr/core/integrations/prometheus/loader.pyc:72)
on 0: [ERROR] No Prometheus or metrics service found
Calculating Recommendation |⚠︎                                       | (!) 0/175 [0%] in 6:00.3 (0.00/s)

Activity

  1. added a commit that references this issue on Mar 20, 2024
    5ce2028
  2. added a commit that references this issue on Mar 26, 2024
    ba14025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions