Git Product home page Git Product logo

ibm / prometheus-data-exporter Goto Github PK

View Code? Open in Web Editor NEW
6.0 7.0 0.0 90 KB

The Prometheus Data Exporter project generates Excel reports from Prometheus metrics. Analysis and comparisons on the data is also optionally performed, highlighting key areas of the results.

License: Apache License 2.0

Python 100.00%
prometheus performance performance-metrics performance-testing performance-analysis performance-tuning prometheus-metrics performance-visualization

prometheus-data-exporter's Issues

Run script error

I use this code exporter metric from prometheus in rancher, run the script has error:

python3 prometheus_exporter.py --cpu --pod --sum --n "cattle-gatekeeper-system" --url "https://uat-rancher.lab1.local/k8s/clusters/c-m-n2pjd454/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-prometheus:9090/proxy" --start=20220802150000 --end=20220802155500 --step=300 --tknfile=./token --dir ./Output --report --filename WeeklyReport --loglevel debug

......
2022-08-03 19:41:31 DEBUG Starting new HTTPS connection (1): uat-rancher.lab1.local:443
2022-08-03 19:41:31 DEBUG https://uat-rancher.lab1.local:443 "GET /k8s/clusters/c-m-n2pjd454/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-prometheus:9090/proxy/api/v1/query_range?query=avg%28sum%28increase%28container_cpu_cfs_throttled_periods_total%7Bnamespace%3D%22cattle-gatekeeper-system%22%2Cpod%3D~%22.%2A%22%2Cpod%21~%22%22%2Ccontainer%21~%22POD%7C%22%7D%5B5m%5D%29%29+by+%28container%2Cpod%29+%2F+sum%28increase%28container_cpu_cfs_periods_total%7Bnamespace%3D%22cattle-gatekeeper-system%22%2Cpod%3D~%22.%2A%22%2Cpod%21~%22%22%2Ccontainer%21~%22POD%7C%22%7D%5B5m%5D%29%29+by+%28container%2Cpod%29%29+%2A+on%28namespace%2C+pod%29+group_left%28workload%2C+workload_type%29+namespace_workload_pod%3Akube_pod_owner%3Arelabel%7B%7D%29+by+%28namespace%2C+workload_type%2C+workload%2C+container%29&start=2022-08-02T15%3A00%3A00.000000Z&end=2022-08-02T15%3A55%3A00.000000Z&step=300 HTTP/1.1" 400 116
2022-08-03 19:41:31 DEBUG Status code: 400
2022-08-03 19:41:31 ERROR Status code: 400
2022-08-03 19:41:31 ERROR Prometheus query failed
2022-08-03 19:41:31 ERROR {'query': 'avg(sum(increase(container_cpu_cfs_throttled_periods_total{namespace="cattle-gatekeeper-system",pod=".*",pod!"",container!"POD|"}[5m])) by (container,pod) / sum(increase(container_cpu_cfs_periods_total{namespace="cattle-gatekeeper-system",pod=".*",pod!"",container!"POD|"}[5m])) by (container,pod)) * on(namespace, pod) group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{}) by (namespace, workload_type, workload, container)', 'start': '2022-08-02T15:00:00.000000Z', 'end': '2022-08-02T15:55:00.000000Z', 'step': '300'}
2022-08-03 19:41:31 ERROR <Response [400]>
2022-08-03 19:41:31 ERROR b'{"status":"error","errorType":"bad_data","error":"1:411: parse error: unexpected right parenthesis ')'"}'

Can help me ? thanks a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.