clusterpedia icon indicating copy to clipboard operation
clusterpedia copied to clipboard

Support sending mail or resource information formatted output by table

Open bertreyking opened this issue 2 years ago • 2 comments

What would you like to be added?

  1. Use cronjob to complete resource information collection and email sending (to cc)

    • resources save to file (such as:pod、deployment)
  2. Resources are distinguished by tables such as: pod, deployment

NAMESPACE             CLUSTER              NAME                                                              READY   STATUS              RESTARTS        AGE     IP     
          NODE       NOMINATED NODE   READINESS GATES
app-stack             cluster1   backend                                                           1/1     Running             0               83d     10.233.
106.153   master01   <none>           <none>
calico-apiserver      cluster1  calico-apiserver-846699985f-l8sr4                                 1/1     Running             1 (24d ago)     51d     10.233.
106.161   master01   <none>           <none>
clusterpedia-system   cluster1   clusterpedia-apiserver-77bf5d9865-7hwrg                           1/1     Running             0               80d     10.233.
106.155  
monitoring            cluster2     prometheus-adapter-5598c6b549-v8tsf                               1/1     Running             0               10d     172.29.
48.7      worker02   <none>           <none>
monitoring            cluster2     prometheus-k8s-0                                                  2/2     Running             0               10d     172.29.
48.19     worker02   <none>           <none>
monitoring            cluster2     prometheus-operator-7cb89c4795-4kw4j                              2/2     Running             0               10d     172.29.
48.8      worker02   <none>           <none>

Why is this needed?

Keep historical data for a period of time and check it at any time (such as: when the log uses hostpath mode, you can quickly locate the node where the pod is located and the log file)

bertreyking avatar Feb 26 '23 13:02 bertreyking

Hi @bertreyking, Thanks for opening an issue! We will look into it as soon as possible.

Details

Instructions for interacting with me using comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

clusterpedia-bot avatar Feb 26 '23 13:02 clusterpedia-bot

Sorry(Problem 2 does not seem to need to be resolved),today I found that the resource information has been differentiated by different resource and kind in the (db)resources table

mysql:
SELECT * FROM clusterpedia.resources where resource = 'deployments' limit 2 \G
SELECT * FROM clusterpedia.resources where resource = 'pods' limit 1 \G

bertreyking avatar Feb 27 '23 14:02 bertreyking