[prometheus-users] push metrics to cortex

2020-05-24 Thread Phaniraj L
```
Hi ,
  we have exposed my Cassandra metrics using Cassandra metrics 
jar(added in Cassandraenvsh) . 
i can view the metrics on the node(`http://localhost:$port/metrics`..)..
 I have centralized cortex(Prometheus) server which is built by our 
monitoring team. 

How do i push the metrics to cortex server** 
```

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/d932f239-73d8-4350-ad7f-615a6abfd432%40googlegroups.com.


Re: [prometheus-users] Adding extra labels to metrics

2020-05-24 Thread Juan Rosero
Thanks, Brian. I'm spinning my wheels here and getting all sorts of errors 
in Prometheus with different relabeling configurations. I've been reading 
on the topic but relabeling is still a bit obscure to me.

  - targets:
  - server1:9117;ad-1;domain-1;emea-1
  - server2:9117;ad-2;domain-2;emea-1
relabel_configs:
- source_labels: ['__address__']
  regex: '(.*);(.*);(.*);(.*)'
  target_label: 'instance'
  replacement: '$1'
metric_relabel_configs:
- source_labels: ['__address__']
  regex: '(.*);(.*);(.*);(.*)'
  target_label: 'ad'
  replacement: '$2'
- source_labels: ['__address__']
  regex: '(.*);(.*);(.*);(.*)'
  target_label: 'dom'
  replacement: '$3'
- source_labels: ['__address__']
  regex: '(.*);(.*);(.*);(.*)'
  target_label: 'reg'
  replacement: '$4'



On Friday, May 22, 2020 at 11:46:28 PM UTC-7, Brian Candler wrote:
>
> It depends where the 'ad', 'dom', 'reg' information comes from.  You can 
> embed that information in the target, e.g.
>
> - targets:
> - server1:9117/ad-1/domain-1/emea-1
> - server2:9117/ad-2/domain-2/emea-1
>
> and then use rewriting rules to extract each of the parts in turn into 
> separate labels.  But to my eye that's less clear than doing the simple 
> thing already suggested.
>
> There's a more compact way of writing YAML if you prefer:
>
> - targets: [server1:9117]
>   labels: {ad: ad-1, dom: domain-1, reg: emea-1}
>
> - targets: [server2:9117]
>   labels: {ad: ad-2, dom: domain-2, reg: emea-1}
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/6c204ffe-8f79-4d6e-9442-cbc859d6b5fa%40googlegroups.com.


Re: [prometheus-users] How to show delta between all data points in the last 1 minute? (Gauge)

2020-05-24 Thread Ben Kochie
And for just counting log lines in files, there are tools like mtail that
are very good at this.

https://github.com/google/mtail

On Sun, May 24, 2020 at 7:42 PM Julius Volz 
wrote:

> On Sun, May 24, 2020 at 5:02 PM tomeri  wrote:
>
>> Hi Julius,
>>
>> Thanks for the fast response.
>>
>> Do you think Gauge is the right metric kind for this purpose?
>>
>
> A gauge tracks anything that can naturally go up or down. The length of
> lines in a file can in principle go up or down, so normally that would be a
> gauge.
>
> If you have files that are basically append-only (like log files), and you
> want to track the rate at which they grow, then it would be better to think
> of the metric conceptually not as "how many lines does this file have", but
> "how many lines have I added to this file" (can only go up, and you count
> lines as they are being added, not just proxying some third-party line
> count), which would be more fitting for a counter metric.
>
>
>> How do I handle resets? i see drops with deriv/delta
>>
>
> If it's actually a counter (see above) where drops truly indicate a reset,
> then you will need to use rate() or increase(). In your case
> "increase(my_lines_total[1m])". This will handle counter resets, but will
> still have the same extrapolation caveat as I mentioned earlier.
>
>
>> I tried both drive and delta with 1m time range multiple by 60 and got
>> wrong results, here is my query:
>> sum by(datacenter)(delta(files_total_lines_gauge{datacenter="xxx"}[1m]))
>> * 60 > 0
>>
>> I use >0 to workaround the drops
>>
>> I basically try to get the same result as I were to use graphite with
>> nonNegativeDerivative
>>
>
> It sounds like the closest thing in PromQL is indeed "increase(foo[1m])",
> but it sounds like the Graphite function doesn't do the extrapolation bit.
>
>
>> On Sunday, May 24, 2020 at 5:39:02 PM UTC+3, Julius Volz wrote:
>>>
>>> Since it's a gauge (and at least theoretically line counts can decrease,
>>> not only increase), you'll want either the delta() (
>>> https://prometheus.io/docs/prometheus/2.18/querying/functions/#delta) or
>>> the deriv() (
>>> https://prometheus.io/docs/prometheus/2.18/querying/functions/#deriv
>>> )
>>> function, multiplied by 60 (to get from per-second to per-minute).
>>>
>>> Note that both functions can give you non-integer results even if the
>>> line numbers only change by integer increments/decrements, as delta()
>>> extrapolates the observed slope to the edges of the provided time window,
>>> and deriv() does a linear regression to estimate how fast a gauge is going
>>> up or down.
>>>
>>> Another thing you could do (if you care about integer results) is:
>>>
>>> my_lines_total - my_lines_total offset 1m
>>>
>>> ...to give you the absolute difference between the last sample value
>>> seen 1m ago and the currently last-seen sample value. Note that while this
>>> returns you an integer result, it might be further away from the "true"
>>> rate due to the lack of extrapolation, because the two samples you will be
>>> comparing will not be exactly 1m apart.
>>>
>>> On Sun, May 24, 2020 at 4:05 PM tomeri  wrote:
>>>
 Hi,

 I run an application that export metrics about the total number of
 lines of each file in my directory, basically the product of `wc -l`
 So on each interval (every 1m) my app counts the total number of lines
 and then updates the Gague metric.

 For example:
 First iteration: 1000 total lines
 Second iteration: 1300 total lines
 Third iteration: 1900 total lines
 Fourth iteration: 2400 total lines
 ...

 Prometheus scraps my app's metric every 15s/25s (depends on the env)
 What i want to plot is a graph that will show the rate per minute - how
 many lines produced in each file for that last 1 minute.

 No matter what I tried, I couldn't make the graph to show to correct
 results.

 This message may contain confidential and/or privileged information.
 If you are not the addressee or authorized to receive this on behalf of
 the addressee you must not use, copy, disclose or take action based on this
 message or any information herein.
 If you have received this message in error, please advise the sender
 immediately by reply email and delete this message. Thank you.

 --
 You received this message because you are subscribed to the Google
 Groups "Prometheus Users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to promethe...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/prometheus-users/4d971809-72e0-4f36-b0cf-0e9914a2d251%40googlegroups.com
 

[prometheus-users] Prometheus NO Expected Data from remote read.

2020-05-24 Thread Mubeen Nakade
Hi,

prometheus --version
prometheus, version 2.18.1 (branch: HEAD, revision: 
ecee9c8abfd118f139014cb1b174b08db3f342cf)
  build user:   root@2117a9e64a7e
  build date:   20200507-16:51:47
  go version:   go1.14.2

storage.tsdb.retention.time=2d



InfluxDB version: 1.8.0

Retention policy 30 days

++

When I point Prometheus to read from remote it doesn't shows expected data. 
Show same data for all nodes.  eg: node_memory_MemAvailable_byte

remote_read:
  - url: 
"http://localhost:8086/api/v1/prom/read?db=prometheus=rp_prometheus=myuser=mypass;
read_recent: true

Any clue ?

Thanks


-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/0accc244-4c38-4519-a6b2-a4b807cbe3ec%40googlegroups.com.


Re: [prometheus-users] Duplicate time series for container_spec_cpu_quota metric

2020-05-24 Thread Julius Volz
Hi,

Could you provide some more details about your Prometheus setup, its
configuration, environment, the exact series labelsets returned, etc.? This
will increase your chances of someone being able to help.

Regards,
Julius

On Sun, May 24, 2020 at 10:30 AM Anoop  wrote:

> Hi,
>
> I can see two series are returing in the response when I am querying the
> metrics "container_spec_cpu_quota" for a specfic pod. Both series are
> having same value. But the one series contains some additional labels like
> "container", image, "name" etc, which are not available in the other time
> series. Can anyone please confirm what is exactly this duplicate time
> series and where we are using it?
>
> Thank You,
> Anoop
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/92e4ce05-5cb3-4273-b73d-aa7a17ba96a6%40googlegroups.com
> 
> .
>


-- 
Julius Volz
PromLabs - promlabs.com

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAObpH5xK0Bey2AOMhanssZFtEXs2VaGzCAhgNDxcdJ%2BMLk7zFw%40mail.gmail.com.


Re: [prometheus-users] How to show delta between all data points in the last 1 minute? (Gauge)

2020-05-24 Thread Julius Volz
On Sun, May 24, 2020 at 5:02 PM tomeri  wrote:

> Hi Julius,
>
> Thanks for the fast response.
>
> Do you think Gauge is the right metric kind for this purpose?
>

A gauge tracks anything that can naturally go up or down. The length of
lines in a file can in principle go up or down, so normally that would be a
gauge.

If you have files that are basically append-only (like log files), and you
want to track the rate at which they grow, then it would be better to think
of the metric conceptually not as "how many lines does this file have", but
"how many lines have I added to this file" (can only go up, and you count
lines as they are being added, not just proxying some third-party line
count), which would be more fitting for a counter metric.


> How do I handle resets? i see drops with deriv/delta
>

If it's actually a counter (see above) where drops truly indicate a reset,
then you will need to use rate() or increase(). In your case
"increase(my_lines_total[1m])". This will handle counter resets, but will
still have the same extrapolation caveat as I mentioned earlier.


> I tried both drive and delta with 1m time range multiple by 60 and got
> wrong results, here is my query:
> sum by(datacenter)(delta(files_total_lines_gauge{datacenter="xxx"}[1m])) *
> 60 > 0
>
> I use >0 to workaround the drops
>
> I basically try to get the same result as I were to use graphite with
> nonNegativeDerivative
>

It sounds like the closest thing in PromQL is indeed "increase(foo[1m])",
but it sounds like the Graphite function doesn't do the extrapolation bit.


> On Sunday, May 24, 2020 at 5:39:02 PM UTC+3, Julius Volz wrote:
>>
>> Since it's a gauge (and at least theoretically line counts can decrease,
>> not only increase), you'll want either the delta() (
>> https://prometheus.io/docs/prometheus/2.18/querying/functions/#delta) or
>> the deriv() (
>> https://prometheus.io/docs/prometheus/2.18/querying/functions/#deriv
>> )
>> function, multiplied by 60 (to get from per-second to per-minute).
>>
>> Note that both functions can give you non-integer results even if the
>> line numbers only change by integer increments/decrements, as delta()
>> extrapolates the observed slope to the edges of the provided time window,
>> and deriv() does a linear regression to estimate how fast a gauge is going
>> up or down.
>>
>> Another thing you could do (if you care about integer results) is:
>>
>> my_lines_total - my_lines_total offset 1m
>>
>> ...to give you the absolute difference between the last sample value seen
>> 1m ago and the currently last-seen sample value. Note that while this
>> returns you an integer result, it might be further away from the "true"
>> rate due to the lack of extrapolation, because the two samples you will be
>> comparing will not be exactly 1m apart.
>>
>> On Sun, May 24, 2020 at 4:05 PM tomeri  wrote:
>>
>>> Hi,
>>>
>>> I run an application that export metrics about the total number of lines
>>> of each file in my directory, basically the product of `wc -l`
>>> So on each interval (every 1m) my app counts the total number of lines
>>> and then updates the Gague metric.
>>>
>>> For example:
>>> First iteration: 1000 total lines
>>> Second iteration: 1300 total lines
>>> Third iteration: 1900 total lines
>>> Fourth iteration: 2400 total lines
>>> ...
>>>
>>> Prometheus scraps my app's metric every 15s/25s (depends on the env)
>>> What i want to plot is a graph that will show the rate per minute - how
>>> many lines produced in each file for that last 1 minute.
>>>
>>> No matter what I tried, I couldn't make the graph to show to correct
>>> results.
>>>
>>> This message may contain confidential and/or privileged information.
>>> If you are not the addressee or authorized to receive this on behalf of
>>> the addressee you must not use, copy, disclose or take action based on this
>>> message or any information herein.
>>> If you have received this message in error, please advise the sender
>>> immediately by reply email and delete this message. Thank you.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Prometheus Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to promethe...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/prometheus-users/4d971809-72e0-4f36-b0cf-0e9914a2d251%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Julius Volz
>> PromLabs - promlabs.com
>>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take 

Re: [prometheus-users] How to get current value from Prometheus using Grok Exporter

2020-05-24 Thread Deep saraswat
Hi Julien,

Thanks for your prompt response.

PFB my grok exporter config

global:
  config_version: 3
input:
  type: file
  paths:
  - /root/grok_exporter-1.0.0.RC3.linux-amd64/example/ptchecksum.out
  - /root/grok_exporter-1.0.0.RC3.linux-amd64/example/ptchecksum.err
imports:
- type: grok_patterns
  dir: ./patterns
grok_patterns:
- 'CHECKSUMOUT [a-zA-Z ]*'
metrics:
- type: counter
  name: mysql_ptchecksum_checksum_stats
  help: mysql ptchecksum stats.
  match:
'%{MONTHDAY:month}\-%{MONTHDAY:date}\T%{TIME:logtime}\s.*%{INT:ERRORS}\s.*%{INT:DIFFS}\s.*%{NUMBER:ROWS}\s.*%{INT:DIFF_ROWS}\s.*%{INT:CHUNKS}\s.*%{INT:SKIPPED}\s.*%{NUMBER:time}
%{GREEDYDATA:TABLE}'
  labels:
diffs: '{{.DIFFS}}'
table: '{{.TABLE}}'
date: '{{.date}}'
errors: '{{.ERRORS}}'
rows: '{{.ROWS}}'
diff_rows: '{{.DIFF_ROWS}}'
chunks: '{{.CHUNKS}}'
TS: '{{.logtime}}'
time: '{{.time}}'
- type: gauge
  name: mysql_ptchecksum_checksuming_status
  help: mysql ptchecksum cheksuming status.
  match:
'%{GREEDYDATA:checksum_status}\s%{GREEDYDATA:tabel}\:.*%{NUMBER:completion_percentage}\%\s.*%{NUMBER:TimeRemainingHours}\:%{NUMBER:TimeRemainingMinutes}'
  value: '{{.completion_percentage}}'
  labels:
status: '{{.checksum_status}}'
tabel: '{{.tabel}}'
- type: gauge
  name: mysql_ptchecksum_waiting_status
  help: mysql ptchecksum waiting status.
  match: 'Replica
lag\s.*\is\s.*%{INT:seconds}\s%{GREEDYDATA:data}\son\s%{GREEDYDATA:server}\.\s'
  value: '{{.seconds}}'
  labels:
server: '{{.server}}'

server:
  protocol: http
  port: 9144

On Sun, May 24, 2020 at 8:59 PM Julien Pivotto 
wrote:

> Please share your grok exporter configuration
>
> Le dim. 24 mai 2020 à 16:54, Deep saraswat  a
> écrit :
>
>> Hi Akila,
>>
>> I am too stuck with this issue. Did you find the solution to this problem?
>>
>> Regards
>> Deependra
>>
>> On Thu, Jul 18, 2019 at 8:42 PM Akila Jayasinghe <
>> akilajayasin...@gmail.com> wrote:
>>
>>> I have a Grok exporter gauge metric which returning API response time in
>>> a audit log file. I'm using grafana dashboard to visualize Prometheus
>>> values.
>>>
>>> [image: image.png]Problem is Prometheus holding last value of metric
>>> until a new value come for it. Think if  "XXX" API's response time is 5
>>> second on 08:33 time and when 08:34 time "XXX" API not called again. But
>>> Prometheus still holding his last value until getting a new value. My
>>> requirement is, only return current values of the API. (Only return called
>>> API response time.)
>>>
>>>
>>> I need a solution to clear this issue. Please kindly assist.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Prometheus Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to prometheus-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/prometheus-users/2f3a20f7-9062-47ee-80d3-41b8bde4d648%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Prometheus Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to prometheus-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/prometheus-users/CAGDB%2Bza14pNehuDvPX8TjFyim3XTtUhORaBn0SpYPshyx%3DqbYw%40mail.gmail.com
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAGDB%2BzZUcw8oTpinyU96oYhLLLgFNQwDMb%2BMcHrYRhffxkOVHw%40mail.gmail.com.


Re: [prometheus-users] Re: Percentile 95th Switch cisco with Prometheus

2020-05-24 Thread Ben Kochie
This requires a sub-query in order to calculate the quantile over a longer
period of time.

quantile_over_time(0.95, rate(ifHCOutOctets[5m])[1d:5m]))

On Sun, May 24, 2020 at 7:58 AM 李国忠  wrote:

> histogram_quantile(0.95,(irate(ifHCOutOctets{ifIndex=“10121”,instance=“
> 172.20.5.43”,job=“SwitchCisco”}[6m]))
>
> 在 2020年5月24日星期日 UTC+8上午6:43:47,FM写道:
>>
>> Hello, We need and We are trying to make a graph of traffic data of a
>> switch cisco with 95th percentile and We can not get it, the general query
>> of the port of switch is like:
>>
>>
>> (irate(ifHCOutOctets{ifIndex=“10121”,instance=“172.20.5.43”,job=“SwitchCisco”}[6m]))
>>
>> How We can do the percentile 95 of the above query?
>>
>> Thank you
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/a3b6215a-de39-40e4-a62e-7a39d52ffa34%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CABbyFmq3o9UiJi3bT_5bQxCSufnTEB1-W7K_Y%3DjmH-pYkFcfeA%40mail.gmail.com.


Re: [prometheus-users] How to show delta between all data points in the last 1 minute? (Gauge)

2020-05-24 Thread tomeri
Hi Julius,

Thanks for the fast response.

Do you think Gauge is the right metric kind for this purpose?
How do I handle resets? i see drops with deriv/delta

I tried both drive and delta with 1m time range multiple by 60 and got 
wrong results, here is my query:
sum by(datacenter)(delta(files_total_lines_gauge{datacenter="xxx"}[1m])) * 
60 > 0

I use >0 to workaround the drops

I basically try to get the same result as I were to use graphite with 
nonNegativeDerivative

On Sunday, May 24, 2020 at 5:39:02 PM UTC+3, Julius Volz wrote:
>
> Since it's a gauge (and at least theoretically line counts can decrease, 
> not only increase), you'll want either the delta() (
> https://prometheus.io/docs/prometheus/2.18/querying/functions/#delta) or 
> the deriv() (
> https://prometheus.io/docs/prometheus/2.18/querying/functions/#deriv 
> )
>  
> function, multiplied by 60 (to get from per-second to per-minute).
>
> Note that both functions can give you non-integer results even if the line 
> numbers only change by integer increments/decrements, as delta() 
> extrapolates the observed slope to the edges of the provided time window, 
> and deriv() does a linear regression to estimate how fast a gauge is going 
> up or down.
>
> Another thing you could do (if you care about integer results) is:
>
> my_lines_total - my_lines_total offset 1m
>
> ...to give you the absolute difference between the last sample value seen 
> 1m ago and the currently last-seen sample value. Note that while this 
> returns you an integer result, it might be further away from the "true" 
> rate due to the lack of extrapolation, because the two samples you will be 
> comparing will not be exactly 1m apart.
>
> On Sun, May 24, 2020 at 4:05 PM tomeri  > wrote:
>
>> Hi,
>>
>> I run an application that export metrics about the total number of lines 
>> of each file in my directory, basically the product of `wc -l`
>> So on each interval (every 1m) my app counts the total number of lines 
>> and then updates the Gague metric.
>>
>> For example:
>> First iteration: 1000 total lines
>> Second iteration: 1300 total lines
>> Third iteration: 1900 total lines
>> Fourth iteration: 2400 total lines
>> ...
>>
>> Prometheus scraps my app's metric every 15s/25s (depends on the env)
>> What i want to plot is a graph that will show the rate per minute - how 
>> many lines produced in each file for that last 1 minute.
>>
>> No matter what I tried, I couldn't make the graph to show to correct 
>> results.
>>
>> This message may contain confidential and/or privileged information. 
>> If you are not the addressee or authorized to receive this on behalf of 
>> the addressee you must not use, copy, disclose or take action based on this 
>> message or any information herein. 
>> If you have received this message in error, please advise the sender 
>> immediately by reply email and delete this message. Thank you.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Prometheus Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to promethe...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/prometheus-users/4d971809-72e0-4f36-b0cf-0e9914a2d251%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Julius Volz
> PromLabs - promlabs.com
>

-- 
This message may contain confidential and/or privileged information. 
If 
you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in 
error, please advise the sender immediately by reply email and delete this 
message. Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/ca9dc1da-c8c2-4fa7-85d1-ebff2dc393da%40googlegroups.com.


Re: [prometheus-users] How to get current value from Prometheus using Grok Exporter

2020-05-24 Thread Deep saraswat
Hi Akila,

I am too stuck with this issue. Did you find the solution to this problem?

Regards
Deependra

On Thu, Jul 18, 2019 at 8:42 PM Akila Jayasinghe 
wrote:

> I have a Grok exporter gauge metric which returning API response time in a
> audit log file. I'm using grafana dashboard to visualize Prometheus values.
>
> [image: image.png]Problem is Prometheus holding last value of metric
> until a new value come for it. Think if  "XXX" API's response time is 5
> second on 08:33 time and when 08:34 time "XXX" API not called again. But
> Prometheus still holding his last value until getting a new value. My
> requirement is, only return current values of the API. (Only return called
> API response time.)
>
>
> I need a solution to clear this issue. Please kindly assist.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/2f3a20f7-9062-47ee-80d3-41b8bde4d648%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAGDB%2Bza14pNehuDvPX8TjFyim3XTtUhORaBn0SpYPshyx%3DqbYw%40mail.gmail.com.


Re: [prometheus-users] How to show delta between all data points in the last 1 minute? (Gauge)

2020-05-24 Thread Julius Volz
Since it's a gauge (and at least theoretically line counts can decrease,
not only increase), you'll want either the delta() (
https://prometheus.io/docs/prometheus/2.18/querying/functions/#delta) or
the deriv() (
https://prometheus.io/docs/prometheus/2.18/querying/functions/#deriv)
function, multiplied by 60 (to get from per-second to per-minute).

Note that both functions can give you non-integer results even if the line
numbers only change by integer increments/decrements, as delta()
extrapolates the observed slope to the edges of the provided time window,
and deriv() does a linear regression to estimate how fast a gauge is going
up or down.

Another thing you could do (if you care about integer results) is:

my_lines_total - my_lines_total offset 1m

...to give you the absolute difference between the last sample value seen
1m ago and the currently last-seen sample value. Note that while this
returns you an integer result, it might be further away from the "true"
rate due to the lack of extrapolation, because the two samples you will be
comparing will not be exactly 1m apart.

On Sun, May 24, 2020 at 4:05 PM tomeri  wrote:

> Hi,
>
> I run an application that export metrics about the total number of lines
> of each file in my directory, basically the product of `wc -l`
> So on each interval (every 1m) my app counts the total number of lines and
> then updates the Gague metric.
>
> For example:
> First iteration: 1000 total lines
> Second iteration: 1300 total lines
> Third iteration: 1900 total lines
> Fourth iteration: 2400 total lines
> ...
>
> Prometheus scraps my app's metric every 15s/25s (depends on the env)
> What i want to plot is a graph that will show the rate per minute - how
> many lines produced in each file for that last 1 minute.
>
> No matter what I tried, I couldn't make the graph to show to correct
> results.
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/4d971809-72e0-4f36-b0cf-0e9914a2d251%40googlegroups.com
> 
> .
>


-- 
Julius Volz
PromLabs - promlabs.com

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAObpH5whhRJN%2BOTsehL_aorzR7JzNKynz%3DXfqAbV_%2BCuSTkd4Q%40mail.gmail.com.


[prometheus-users] How to show delta between all data points in the last 1 minute? (Gauge)

2020-05-24 Thread tomeri
Hi,

I run an application that export metrics about the total number of lines of 
each file in my directory, basically the product of `wc -l`
So on each interval (every 1m) my app counts the total number of lines and 
then updates the Gague metric.

For example:
First iteration: 1000 total lines
Second iteration: 1300 total lines
Third iteration: 1900 total lines
Fourth iteration: 2400 total lines
...

Prometheus scraps my app's metric every 15s/25s (depends on the env)
What i want to plot is a graph that will show the rate per minute - how 
many lines produced in each file for that last 1 minute.

No matter what I tried, I couldn't make the graph to show to correct 
results.

-- 
This message may contain confidential and/or privileged information. 
If 
you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in 
error, please advise the sender immediately by reply email and delete this 
message. Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4d971809-72e0-4f36-b0cf-0e9914a2d251%40googlegroups.com.


[prometheus-users] Re: Porting PromQL to InfluxQL

2020-05-24 Thread Brian Candler
Questions about InfluxDB and InfluxQL would be better directed to an 
InfluxDB forum. Try here:
https://community.influxdata.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/71504b86-c691-48fc-be27-538ae33729cb%40googlegroups.com.


[prometheus-users] Duplicate time series for container_spec_cpu_quota metric

2020-05-24 Thread Anoop
Hi,

I can see two series are returing in the response when I am querying the 
metrics "container_spec_cpu_quota" for a specfic pod. Both series are 
having same value. But the one series contains some additional labels like 
"container", image, "name" etc, which are not available in the other time 
series. Can anyone please confirm what is exactly this duplicate time 
series and where we are using it?

Thank You,
Anoop

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/92e4ce05-5cb3-4273-b73d-aa7a17ba96a6%40googlegroups.com.