Skip to content
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

WIP | Feat: Add cmd parser prometheus-* #60

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mtulio
Copy link
Contributor

@mtulio mtulio commented Jul 14, 2021

Introducing to Prometheus parsers (omg parser prometheus-*):

That data is included on must-gather since this PR

  • prometheus-status-tsdb
  • prometheus-runtime-build-info
  • prometheus-status-config-diff
$ omg parser prometheus-status-tsdb
WANING: ignoring file reader; Is a directory
>> headStats <<
+------------+---------------------+---------------------+
|   metric   |  prometheus-k8s-0   |  prometheus-k8s-1   |
+------------+---------------------+---------------------+
| numSeries  |       3.464 M       |       3.451 M       |
| chunkCount |       6.215 M       |       6.182 M       |
|  minTime   | 2021-07-01 13:00:00 | 2021-07-01 13:00:00 |
|  maxTime   | 2021-07-01 14:08:24 | 2021-07-01 14:08:37 |
+------------+---------------------+---------------------+

>> seriesCountByMetricName <<
+-------+--------------------------------------------------+-------------------------+--------------------------------------------------+-------------------------+
| Top#N |                     MetricName(prometheus-k8s-0) | Count(prometheus-k8s-0) |                     MetricName(prometheus-k8s-1) | Count(prometheus-k8s-1) |
+-------+--------------------------------------------------+-------------------------+--------------------------------------------------+-------------------------+
| #1    | cluster_logging_collector_input_record_total     | 570.974 K               | cluster_logging_collector_input_record_bytes     | 570.977 K               |
| #2    | cluster_logging_collector_input_record_bytes     | 570.974 K               | cluster_logging_collector_input_record_total     | 570.977 K               |
| #3    | container_runtime_crio_image_pulls_by_digest     | 136.040 K               | container_runtime_crio_image_pulls_by_digest     | 136.040 K               |
| #4    | container_runtime_crio_image_layer_reuse         | 89.993 K                | container_runtime_crio_image_layer_reuse         | 89.993 K                |
| #5    | container_memory_failures_total                  | 86.052 K                | container_memory_failures_total                  | 83.928 K                |
| #6    | kube_resourcequota                               | 41.624 K                | kube_resourcequota                               | 41.624 K                |
| #7    | rest_client_request_duration_seconds_bucket      | 32.197 K                | kube_pod_container_status_waiting_reason         | 32.340 K                |
| #8    | kube_pod_container_status_waiting_reason         | 31.745 K                | rest_client_request_duration_seconds_bucket      | 32.197 K                |
| #9    | haproxy_backend_http_responses_total             | 30.798 K                | haproxy_backend_http_responses_total             | 30.798 K                |
| #10   | kube_pod_container_status_last_terminated_reason | 27.210 K                | kube_pod_container_status_last_terminated_reason | 27.720 K                |
+-------+--------------------------------------------------+-------------------------+--------------------------------------------------+-------------------------+

>> labelValueCountByLabelName <<
+-------+------------------------------+-------------------------+------------------------------+-------------------------+
| Top#N | MetricName(prometheus-k8s-0) | Count(prometheus-k8s-0) | MetricName(prometheus-k8s-1) | Count(prometheus-k8s-1) |
+-------+------------------------------+-------------------------+------------------------------+-------------------------+
| #1    | tag                          | 570.889 K               | tag                          | 570.892 K               |
| #2    | name                         | 73.734 K                | name                         | 73.516 K                |
| #3    | digest                       | 25.036 K                | digest                       | 25.036 K                |
| #4    | size                         | 20.472 K                | size                         | 20.472 K                |
| #5    | id                           | 18.676 K                | id                           | 18.148 K                |
| #6    | secret                       | 14.504 K                | secret                       | 14.505 K                |
| #7    | replicationcontroller        | 13.739 K                | replicationcontroller        | 13.739 K                |
| #8    | container_id                 | 5.465 K                 | container_id                 | 5.533 K                 |
| #9    | pod                          | 4.093 K                 | pod                          | 4.092 K                 |
| #10   | uid                          | 3.972 K                 | uid                          | 4.030 K                 |
+-------+------------------------------+-------------------------+------------------------------+-------------------------+

>> memoryInBytesByLabelName <<
+-------+------------------------------+------------------------+------------------------------+------------------------+
| Top#N | MetricName(prometheus-k8s-0) | Size(prometheus-k8s-0) | MetricName(prometheus-k8s-1) | Size(prometheus-k8s-1) |
+-------+------------------------------+------------------------+------------------------------+------------------------+
| #1    | tag                          | 94.3 MiB               | tag                          | 94.3 MiB               |
| #2    | name                         | 14.5 MiB               | name                         | 14.4 MiB               |
| #3    | id                           | 3.0 MiB                | id                           | 2.9 MiB                |
| #4    | digest                       | 1.7 MiB                | digest                       | 1.7 MiB                |
| #5    | container_id                 | 384.3 KiB              | container_id                 | 389.0 KiB              |
| #6    | mountpoint                   | 376.8 KiB              | mountpoint                   | 384.0 KiB              |
| #7    | secret                       | 311.0 KiB              | secret                       | 311.1 KiB              |
| #8    | replicationcontroller        | 261.4 KiB              | replicationcontroller        | 261.4 KiB              |
| #9    | image_id                     | 239.3 KiB              | image_id                     | 239.8 KiB              |
| #10   | image                        | 238.4 KiB              | image                        | 238.4 KiB              |
+-------+------------------------------+------------------------+------------------------------+------------------------+

>> seriesCountByLabelValuePair <<
+-------+-------------------------------------------------------+-------------------------+--------------------------------+-------------------------+
| Top#N |                          MetricName(prometheus-k8s-0) | Count(prometheus-k8s-0) |   MetricName(prometheus-k8s-1) | Count(prometheus-k8s-1) |
+-------+-------------------------------------------------------+-------------------------+--------------------------------+-------------------------+
| #1    | endpoint=metrics                                      | 1.296 M                 | endpoint=metrics               | 1.296 M                 |
| #2    | service=kubelet                                       | 1.171 M                 | namespace=openshift-logging    | 1.170 M                 |
| #3    | namespace=openshift-logging                           | 1.170 M                 | container=fluentd              | 1.158 M                 |
| #4    | container=fluentd                                     | 1.158 M                 | service=fluentd                | 1.154 M                 |
| #5    | service=fluentd                                       | 1.154 M                 | job=fluentd                    | 1.154 M                 |
| #6    | job=fluentd                                           | 1.154 M                 | service=kubelet                | 1.153 M                 |
| #7    | endpoint=https-metrics                                | 914.885 K               | endpoint=https-metrics         | 896.491 K               |
| #8    | job=kubelet                                           | 914.700 K               | job=kubelet                    | 896.306 K               |
| #9    | metrics_path=/metrics/cadvisor                        | 834.549 K               | metrics_path=/metrics/cadvisor | 816.206 K               |
| #10   | __name__=cluster_logging_collector_input_record_bytes | 570.974 K               | endpoint=https-main            | 574.433 K               |
+-------+-------------------------------------------------------+-------------------------+--------------------------------+-------------------------+

@mtulio mtulio changed the title Feat: Add cmd parser prometheus-* WIP | Feat: Add cmd parser prometheus-* Jul 14, 2021
@mtulio
Copy link
Contributor Author

mtulio commented Jul 14, 2021

@kxr please hold this PR reviw, I need to create a way to "detect" the data available on monitoring directory. The sample of PR description was collected from two replicas, a derivative script from original PR.

@mtulio
Copy link
Contributor Author

mtulio commented Jul 21, 2021

Depends openshift/must-gather#248

@mtulio
Copy link
Contributor Author

mtulio commented Nov 9, 2021

The correct PR is openshift/must-gather#248 , and this PR should be adapted to the final data that was collected from upstream.

@mtulio mtulio marked this pull request as draft October 26, 2022 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant