-
Notifications
You must be signed in to change notification settings - Fork 4
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
Failed to query Prometheus and fetched metrics #19
Comments
Looks like your Prometheus instance doesn't have the required node_exporter metrics. Please try running the PromQL queries against the Prometheus API to confirm the same. |
Thanks for your update. I have change the method. Now we have configured mii-lama with docker and it's working fine but only received Avg responce. How to get the other data -- Min,Max,Avg,Mid ===================output of the Avg responce======= ================ Configration parameter============= List of hosts to fetch metrics for. Keep this empty to fetch metrics for all hosts defined in
|
I have manually checked the PromQL queries and received successful responses: 100 * (1 - min(rate(node_cpu_seconds_total{mode="idle", instance="192.168.201.142:9100"}[5m]))) As per the logs, the min, max, and mid values are showing as zero. Could you please check and advise on this issue? |
Hi. As of now the queries are defined in config.toml only compute the average values. The min/max values should have separate queries but this version doesn't support it yet. There are some new API params (like |
I have followed the step as per given and configured the default config.toml file and changed the NSE related paramter after run the manually ./mii-lama.bin --config config.toml but getting following error.
time=2025-02-25T14:50:20.764+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:164 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.142:9100 metric=packet_errors error="response contains no result data"
time=2025-02-25T14:50:20.764+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:211 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.142:9100 metric=failure_count error="response contains no result data"
time=2025-02-25T14:50:20.764+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:131 msg="Failed to query Prometheus for database status" component=mii-lama host=192.168.201.142:9100 metric=status error="response contains no result data"
time=2025-02-25T14:50:20.765+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:85 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.142:9100 metric=disk error="response contains no result data"
time=2025-02-25T14:50:20.765+05:30 level=DEBUG source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:181 msg="fetched metrics" component=mii-lama host=192.168.201.142:9100 data={PacketErrors:0}
time=2025-02-25T14:50:20.765+05:30 level=DEBUG source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:148 msg="fetched metrics" component=mii-lama host=192.168.201.142:9100 data={Status:0}
time=2025-02-25T14:50:20.765+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:199 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.142:9100 metric=throughput error="response contains no result data"
time=2025-02-25T14:50:20.765+05:30 level=DEBUG source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:228 msg="fetched metrics" component=mii-lama host=192.168.201.142:9100 data="{Throughput:0 FailureCount:0}"
time=2025-02-25T14:50:20.765+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:96 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.142:9100 metric=uptime error="response contains no result data"
time=2025-02-25T14:50:20.766+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:131 msg="Failed to query Prometheus for database status" component=mii-lama host=192.168.201.143:9100 metric=status error="response contains no result data"
time=2025-02-25T14:50:20.766+05:30 level=DEBUG source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:148 msg="fetched metrics" component=mii-lama host=192.168.201.143:9100 data={Status:0}
time=2025-02-25T14:50:20.767+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:63 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.142:9100 metric=cpu error="response contains no result data"
time=2025-02-25T14:50:20.767+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:164 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.143:9100 metric=packet_errors error="response contains no result data"
time=2025-02-25T14:50:20.767+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:211 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.143:9100 metric=failure_count error="response contains no result data"
time=2025-02-25T14:50:20.767+05:30 level=DEBUG source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:181 msg="fetched metrics" component=mii-lama host=192.168.201.143:9100 data={PacketErrors:0}
time=2025-02-25T14:50:20.767+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:131 msg="Failed to query Prometheus for database status" component=mii-lama host=192.168.201.78:9100 metric=status error="response contains no result data"
time=2025-02-25T14:50:20.772+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:74 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.143:9100 metric=memory error="response contains no result data"
time=2025-02-25T14:50:20.772+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:85 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.143:9100 metric=disk error="response contains no result data"
time=2025-02-25T14:50:20.773+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:96 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.143:9100 metric=uptime error="response contains no result data"
time=2025-02-25T14:50:20.773+05:30 level=DEBUG source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:113 msg="fetched metrics" component=mii-lama host=192.168.201.143:9100 data="{CPU:0 Mem:0 Disk:0 Uptime:0}"
time=2025-02-25T14:50:20.773+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:63 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.78:9100 metric=cpu error="response contains no result data"
time=2025-02-25T14:50:20.774+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:74 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.78:9100 metric=memory error="response contains no result data"
time=2025-02-25T14:50:20.775+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:85 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.78:9100 metric=disk error="response contains no result data"
time=2025-02-25T14:50:20.775+05:30 level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:96 msg="Failed to query Prometheus" component=mii-lama host=192.168.201.78:9100 metric=uptime error="response contains no result data"
time=2025-02-25T14:50:20.775+05:30 level=DEBUG source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:113 msg="fetched metrics" component=mii-lama host=192.168.201.78:9100 data="{CPU:0 Mem:0 Disk:0 Uptime:0}"
time=2025-02-25T14:50:20.775+05:30 level=INFO source=/home/runner/work/mii-lama/mii-lama/internal/nse/nse.go:253 msg="Preparing to send hardware metrics" component=mii-lama login_id=apim_13 member_id=13 exchange_id=1 host=192.168.201.142:9100 URL=https://lama.uat.nseindia.com/api/V1/metrics/hardware payload="{"memberId":"13605","exchangeId":1,"sequenceId":1,"timestamp":1740475220,"payload":[{"applicationId":1,"metricData":[{"key":"cpu","value":{"min":0,"max":0,"avg":0,"med":0}},{"key":"memory","value":{"min":0,"max":0,"avg":0,"med":0}},{"key":"disk","value":{"min":0,"max":0,"avg":0,"med":0}},{"key":"uptime","value":{"min":0,"max":0,"avg":0,"med":0}}]}]}" headers="map[Accept-Language:[en-US] Content-Type:[application/json] Cookie:[test] Referer:[https://lama.uat.nseindia.com] User-Agent:[LAMAAPI/1.0.0]]"
Please let us know where we have to miss the step or any setting.
The text was updated successfully, but these errors were encountered: