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

Examples for histogram #1

Closed
senja7r opened this issue Aug 16, 2022 · 3 comments
Closed

Examples for histogram #1

senja7r opened this issue Aug 16, 2022 · 3 comments
Assignees

Comments

@senja7r
Copy link

senja7r commented Aug 16, 2022

Hello.

I can ask you to add to the wiki examples of datasource, sql queries and settings to form histogram type metrics, please.

Unfortunately, the existing example does not give an understanding of how to do this.

Thank you.

@lmangani
Copy link
Contributor

Hello @senja7r this is mostly up to your ClickHouse query being a histogram.
Is there an example as of what you're trying to achieve?

@senja7r
Copy link
Author

senja7r commented Sep 20, 2022

Hello, @lmangani.

There is a table log_nginx (see attachment lognginx.txt pls.) where nginx logs are written. The table is just an example, there are a lot of endpoints(url). I need a histogram of request durations for each endpoint(url) to export to VictoriaMetrics.

For example:

#HELP obrm_request_duration_seconds Histogram of latencies for HTTP requests.
#TYPE obrm_request_duration_seconds histogram
obrm_request_duration_seconds_count{url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_sum{url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="+Inf", url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="12", url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="10", url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="5",url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="2.5"url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="1",url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="0.5"url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="0.25", url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="0.1", url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="0.05", url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="0.025", url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="0.01", url="obrm-core.merto.nt/htpm-engine/rest/engine"}
obrm_request_duration_seconds_bucket{le="0.005", url="obrm-core.merto.nt/htpm-engine/rest/engine"}


obrm_request_duration_seconds_count{url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_sum{url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="+Inf", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="12", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="10", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="5",url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="2.5"url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="1",url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="0.5"url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="0.25", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="0.1", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="0.05", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="0.025", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="0.01", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}
obrm_request_duration_seconds_bucket{le="0.005", url="obrm-core.merto.nt/djkm-aggregates/v2/process/id"}

and so on.

Thank you in advance.

lognginx.txt

@adubovikov adubovikov self-assigned this Sep 20, 2022
@adubovikov
Copy link
Contributor

@senja7r can you please show your config (query) ?

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

No branches or pull requests

3 participants