Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add columns to csv #359

Merged
merged 6 commits into from
Nov 12, 2024
Merged

Add columns to csv #359

merged 6 commits into from
Nov 12, 2024

Conversation

moshemorad
Copy link
Contributor

@moshemorad moshemorad commented Nov 7, 2024

  • [main] python ./krr.py simple -f csv
|Namespace|Name                                                |Pods|Old Pods|Type       |Container             |CPU Diff|CPU Requests       |CPU Limits|Memory Diff|Memory Requests          |Memory Limits  |
|---------|----------------------------------------------------|----|--------|-----------|----------------------|--------|-------------------|----------|-----------|-------------------------|---------------|
|default  |robusta-forwarder                                   |1   |0       |Deployment |kubewatch             |+0m     |(+0m) 10m -> 10m   |unset     |-412Mi     |(-412Mi) 512Mi -> 100Mi  |512Mi -> 100Mi |
|default  |robusta-grafana                                     |1   |0       |Deployment |grafana-sc-dashboard  |+10m    |(+10m) unset -> 10m|unset     |+117Mi     |(+117Mi) unset -> 117Mi  |unset -> 117Mi |
|         |                                                    |    |        |           |grafana-sc-datasources|+10m    |(+10m) unset -> 10m|unset     |+115Mi     |(+115Mi) unset -> 115Mi  |unset -> 115Mi |
|         |                                                    |    |        |           |grafana               |+10m    |(+10m) unset -> 10m|unset     |+133Mi     |(+133Mi) unset -> 133Mi  |unset -> 133Mi |
|default  |robusta-holmes                                      |1   |0       |Deployment |holmes                |+10m    |(+10m) unset -> 10m|unset     |+219Mi     |(+219Mi) unset -> 219Mi  |unset -> 219Mi |
|default  |robusta-kube-prometheus-st-operator                 |1   |0       |Deployment |kube-prometheus-stack |-90m    |(-90m) 100m -> 10m |unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |robusta-kube-state-metrics                          |1   |0       |Deployment |kube-state-metrics    |+0m     |(+0m) 10m -> 10m   |unset     |-156Mi     |(-156Mi) 256Mi -> 100Mi  |256Mi -> 100Mi |
|default  |robusta-runner                                      |1   |2       |Deployment |runner                |-231m   |(-231m) 250m -> 19m|unset     |-465Mi     |(-465Mi) 1024Mi -> 559Mi |1024Mi -> 559Mi|
|default  |alertmanager-robusta-kube-prometheus-st-alertmanager|1   |0       |StatefulSet|alertmanager          |-40m    |(-40m) 50m -> 10m  |unset     |-28Mi      |(-28Mi) 128Mi -> 100Mi   |128Mi -> 100Mi |
|         |                                                    |    |        |           |config-reloader       |+10m    |(+10m) unset -> 10m|unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |prometheus-robusta-kube-prometheus-st-prometheus    |1   |0       |StatefulSet|prometheus            |+34m    |(+34m) 50m -> 84m  |unset     |-1487Mi    |(-1487Mi) 2048Mi -> 561Mi|2048Mi -> 561Mi|
|         |                                                    |    |        |           |config-reloader       |+10m    |(+10m) unset -> 10m|unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |robusta-prometheus-node-exporter                    |3   |0       |DaemonSet  |node-exporter         |-120m   |(-40m) 50m -> 10m  |unset     |+150Mi     |(+50Mi) 50Mi -> 100Mi    |50Mi -> 100Mi  |
  • [fb] python ./krr.py simple -f csv --exclude-severity (result same as above)
|Namespace|Name                                                |Pods|Old Pods|Type       |Container             |CPU Diff|CPU Requests       |CPU Limits|Memory Diff|Memory Requests          |Memory Limits  |
|---------|----------------------------------------------------|----|--------|-----------|----------------------|--------|-------------------|----------|-----------|-------------------------|---------------|
|default  |robusta-forwarder                                   |1   |0       |Deployment |kubewatch             |+0m     |(+0m) 10m -> 10m   |unset     |-412Mi     |(-412Mi) 512Mi -> 100Mi  |512Mi -> 100Mi |
|default  |robusta-grafana                                     |1   |0       |Deployment |grafana-sc-dashboard  |+10m    |(+10m) unset -> 10m|unset     |+117Mi     |(+117Mi) unset -> 117Mi  |unset -> 117Mi |
|         |                                                    |    |        |           |grafana-sc-datasources|+10m    |(+10m) unset -> 10m|unset     |+115Mi     |(+115Mi) unset -> 115Mi  |unset -> 115Mi |
|         |                                                    |    |        |           |grafana               |+10m    |(+10m) unset -> 10m|unset     |+133Mi     |(+133Mi) unset -> 133Mi  |unset -> 133Mi |
|default  |robusta-holmes                                      |1   |0       |Deployment |holmes                |+10m    |(+10m) unset -> 10m|unset     |+219Mi     |(+219Mi) unset -> 219Mi  |unset -> 219Mi |
|default  |robusta-kube-prometheus-st-operator                 |1   |0       |Deployment |kube-prometheus-stack |-90m    |(-90m) 100m -> 10m |unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |robusta-kube-state-metrics                          |1   |0       |Deployment |kube-state-metrics    |+0m     |(+0m) 10m -> 10m   |unset     |-156Mi     |(-156Mi) 256Mi -> 100Mi  |256Mi -> 100Mi |
|default  |robusta-runner                                      |1   |2       |Deployment |runner                |-231m   |(-231m) 250m -> 19m|unset     |-465Mi     |(-465Mi) 1024Mi -> 559Mi |1024Mi -> 559Mi|
|default  |alertmanager-robusta-kube-prometheus-st-alertmanager|1   |0       |StatefulSet|alertmanager          |-40m    |(-40m) 50m -> 10m  |unset     |-28Mi      |(-28Mi) 128Mi -> 100Mi   |128Mi -> 100Mi |
|         |                                                    |    |        |           |config-reloader       |+10m    |(+10m) unset -> 10m|unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |prometheus-robusta-kube-prometheus-st-prometheus    |1   |0       |StatefulSet|prometheus            |+34m    |(+34m) 50m -> 84m  |unset     |-1487Mi    |(-1487Mi) 2048Mi -> 561Mi|2048Mi -> 561Mi|
|         |                                                    |    |        |           |config-reloader       |+10m    |(+10m) unset -> 10m|unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |robusta-prometheus-node-exporter                    |3   |0       |DaemonSet  |node-exporter         |-120m   |(-40m) 50m -> 10m  |unset     |+150Mi     |(+50Mi) 50Mi -> 100Mi    |50Mi -> 100Mi  |
  • [fb] python ./krr.py simple -f csv (Severity column added)
|Namespace|Name                                                |Pods|Old Pods|Type       |Container             |Severity|CPU Diff|CPU Requests       |CPU Limits|Memory Diff|Memory Requests          |Memory Limits  |
|---------|----------------------------------------------------|----|--------|-----------|----------------------|--------|--------|-------------------|----------|-----------|-------------------------|---------------|
|default  |robusta-forwarder                                   |1   |0       |Deployment |kubewatch             |WARNING |+0m     |(+0m) 10m -> 10m   |unset     |-412Mi     |(-412Mi) 512Mi -> 100Mi  |512Mi -> 100Mi |
|default  |robusta-grafana                                     |1   |0       |Deployment |grafana-sc-dashboard  |WARNING |+10m    |(+10m) unset -> 10m|unset     |+117Mi     |(+117Mi) unset -> 117Mi  |unset -> 117Mi |
|         |                                                    |    |        |           |grafana-sc-datasources|WARNING |+10m    |(+10m) unset -> 10m|unset     |+115Mi     |(+115Mi) unset -> 115Mi  |unset -> 115Mi |
|         |                                                    |    |        |           |grafana               |WARNING |+10m    |(+10m) unset -> 10m|unset     |+133Mi     |(+133Mi) unset -> 133Mi  |unset -> 133Mi |
|default  |robusta-holmes                                      |1   |0       |Deployment |holmes                |WARNING |+10m    |(+10m) unset -> 10m|unset     |+219Mi     |(+219Mi) unset -> 219Mi  |unset -> 219Mi |
|default  |robusta-kube-prometheus-st-operator                 |1   |0       |Deployment |kube-prometheus-stack |WARNING |-90m    |(-90m) 100m -> 10m |unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |robusta-kube-state-metrics                          |1   |0       |Deployment |kube-state-metrics    |OK      |+0m     |(+0m) 10m -> 10m   |unset     |-156Mi     |(-156Mi) 256Mi -> 100Mi  |256Mi -> 100Mi |
|default  |robusta-runner                                      |1   |2       |Deployment |runner                |WARNING |-231m   |(-231m) 250m -> 19m|unset     |-465Mi     |(-465Mi) 1024Mi -> 559Mi |1024Mi -> 559Mi|
|default  |alertmanager-robusta-kube-prometheus-st-alertmanager|1   |0       |StatefulSet|alertmanager          |GOOD    |-40m    |(-40m) 50m -> 10m  |unset     |-28Mi      |(-28Mi) 128Mi -> 100Mi   |128Mi -> 100Mi |
|         |                                                    |    |        |           |config-reloader       |WARNING |+10m    |(+10m) unset -> 10m|unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |prometheus-robusta-kube-prometheus-st-prometheus    |1   |0       |StatefulSet|prometheus            |CRITICAL|+34m    |(+34m) 50m -> 84m  |unset     |-1487Mi    |(-1487Mi) 2048Mi -> 561Mi|2048Mi -> 561Mi|
|         |                                                    |    |        |           |config-reloader       |WARNING |+10m    |(+10m) unset -> 10m|unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|default  |robusta-prometheus-node-exporter                    |3   |0       |DaemonSet  |node-exporter         |GOOD    |-120m   |(-40m) 50m -> 10m  |unset     |+150Mi     |(+50Mi) 50Mi -> 100Mi    |50Mi -> 100Mi  |
  • [fb] python ./krr.py simple -f csv --show-cluster-name (Cluster name column added)
|Cluster                                                 |Namespace|Name                                                |Pods|Old Pods|Type       |Container             |Severity|CPU Diff|CPU Requests       |CPU Limits|Memory Diff|Memory Requests          |Memory Limits  |
|--------------------------------------------------------|---------|----------------------------------------------------|----|--------|-----------|----------------------|--------|--------|-------------------|----------|-----------|-------------------------|---------------|
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |robusta-forwarder                                   |1   |0       |Deployment |kubewatch             |WARNING |+0m     |(+0m) 10m -> 10m   |unset     |-412Mi     |(-412Mi) 512Mi -> 100Mi  |512Mi -> 100Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |robusta-grafana                                     |1   |0       |Deployment |grafana-sc-dashboard  |WARNING |+10m    |(+10m) unset -> 10m|unset     |+117Mi     |(+117Mi) unset -> 117Mi  |unset -> 117Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|         |                                                    |    |        |           |grafana-sc-datasources|WARNING |+10m    |(+10m) unset -> 10m|unset     |+115Mi     |(+115Mi) unset -> 115Mi  |unset -> 115Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|         |                                                    |    |        |           |grafana               |WARNING |+10m    |(+10m) unset -> 10m|unset     |+133Mi     |(+133Mi) unset -> 133Mi  |unset -> 133Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |robusta-holmes                                      |1   |0       |Deployment |holmes                |WARNING |+10m    |(+10m) unset -> 10m|unset     |+219Mi     |(+219Mi) unset -> 219Mi  |unset -> 219Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |robusta-kube-prometheus-st-operator                 |1   |0       |Deployment |kube-prometheus-stack |WARNING |-90m    |(-90m) 100m -> 10m |unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |robusta-kube-state-metrics                          |1   |0       |Deployment |kube-state-metrics    |OK      |+0m     |(+0m) 10m -> 10m   |unset     |-156Mi     |(-156Mi) 256Mi -> 100Mi  |256Mi -> 100Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |robusta-runner                                      |1   |2       |Deployment |runner                |WARNING |-231m   |(-231m) 250m -> 19m|unset     |-465Mi     |(-465Mi) 1024Mi -> 559Mi |1024Mi -> 559Mi|
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |alertmanager-robusta-kube-prometheus-st-alertmanager|1   |0       |StatefulSet|alertmanager          |GOOD    |-40m    |(-40m) 50m -> 10m  |unset     |-28Mi      |(-28Mi) 128Mi -> 100Mi   |128Mi -> 100Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|         |                                                    |    |        |           |config-reloader       |WARNING |+10m    |(+10m) unset -> 10m|unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |prometheus-robusta-kube-prometheus-st-prometheus    |1   |0       |StatefulSet|prometheus            |CRITICAL|+34m    |(+34m) 50m -> 84m  |unset     |-1487Mi    |(-1487Mi) 2048Mi -> 561Mi|2048Mi -> 561Mi|
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|         |                                                    |    |        |           |config-reloader       |WARNING |+10m    |(+10m) unset -> 10m|unset     |+100Mi     |(+100Mi) unset -> 100Mi  |unset -> 100Mi |
|arn:aws:eks:us-east-2:530171408261:cluster/moses-cluster|default  |robusta-prometheus-node-exporter                    |3   |0       |DaemonSet  |node-exporter         |GOOD    |-120m   |(-40m) 50m -> 10m  |unset     |+150Mi     |(+50Mi) 50Mi -> 100Mi    |50Mi -> 100Mi  |
 

@CLAassistant
Copy link

CLAassistant commented Nov 7, 2024

CLA assistant check
All committers have signed the CLA.

@moshemorad moshemorad requested a review from arikalon1 November 7, 2024 13:51
Copy link
Contributor

@arikalon1 arikalon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work
left 2 minor comments

robusta_krr/core/models/result.py Show resolved Hide resolved
robusta_krr/main.py Show resolved Hide resolved
@RoiGlinik
Copy link
Contributor

LGTM

@moshemorad moshemorad marked this pull request as ready for review November 12, 2024 09:12
@moshemorad moshemorad merged commit 1515b3d into main Nov 12, 2024
2 checks passed
@moshemorad moshemorad deleted the add_columns_to_csv branch November 12, 2024 09:15
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants