[prometheus-users] PromQL Regex and the left bracket [ character

2021-04-21 Thread Patrick Mackey
Hi, all. I'm trying to match the left bracket character '[' with a regex and seem to be hitting some issues. I've tried with the octal sequence \133 and the hex sequence \x5B but both return either false positive matches or the following error: Error executing query: invalid parameter "query":

[prometheus-users] Getting label value in dashboard

2021-04-21 Thread David Frank
Hello, community, I have metrics with labels as shown below: *b2_meta_license_info*{instance="10.48.153.119:9000", job="kubernetes", *purchased_size="3", owner="1"*} *b2_meta_license_info*{instance="10.48.153.19:9000", job="kubernetes", *purchased_size="5", owner="2"*} *b2_meta_license_info*{ins

[prometheus-users] Prometheus failed to restore metrics from snapshots.

2021-04-21 Thread Louis Go
I want to export data from prometheus and import to another one. Found three posts and all of them said just put snapshots to the new one under storage.tsdb.path/snapshots and it's okay. However I can't reproduce it. I read these posts 1. https://www.robustperception.io/taking-snapshots-of-prometh

Re: [prometheus-users] Rate()

2021-04-21 Thread Bjoern Rabenstein
On 13.04.21 19:35, Mohan Nagandlla wrote: > Hi team > May I know that how the rate() function will work.i just need to calculate > the container_cpu_usage_ in CPU cores when I am using it I am > getting exact core values in a rate. I want to do it manually so may I know > the calculation or

[prometheus-users] Reg: optimizing custom exporters using python client libraries

2021-04-21 Thread RAJESH DASARI
Hi , We have implemented a custom exporter by using the python client library. We have 400 metrics for each ethernet port and we have around 38 ethernet ports. for index,metric in enumerate(network_snmp_counters): g = GaugeMetricFamily(metric, 'Per Port Counters', labels=['portNumber'])

Re: [prometheus-users] Reg: Prometheus behavior for single scraping interval vs multiple scraping intervals

2021-04-21 Thread Ben Kochie
It makes no difference to have different intervals. Prometheus schedules each target individually, so performance only depends on the total number of targets. On Wed, Apr 21, 2021 at 10:38 AM RAJESH DASARI wrote: > Hi , > > I see that we can configure prometheus to have different scraping > inte

[prometheus-users] Reg: Prometheus behavior for single scraping interval vs multiple scraping intervals

2021-04-21 Thread RAJESH DASARI
Hi , I see that we can configure prometheus to have different scraping intervals for different jobs. Do you see any performance degradation? w.r.to memory or CPU usage of the prometheus if i configure two jobs one has 15s as scraping interval and another one has 60s has scraping interval. or havi

Re: [prometheus-users] Context deadline exceeded

2021-04-21 Thread Stuart Clark
On 20/04/2021 23:02, barnyb...@gmail.com wrote: Yes, both URLs on port 9116 are working fine. If both are working I'd suggest looking at both the scrape interval and timeout. If you time the requests you are doing manually (e.g. via curl) how long are they taking compared with the timeout/scr