[prometheus-developers] Adding timestamps to Gauge Metric

2021-08-23 Thread Prince
Hi everyone, I am new to prometheus. I am using type Gauge. I wanted to get the timestamp along with the value. It will be great if anyone can help on this. example: go_duration.WithLabelValues("type").Set(12345.678) so here collector is getting only 12345.678, I am reading this data from a

Re: [prometheus-developers] Adding timestamps to Gauge Metric

2021-08-24 Thread Prince
t;textfile" collector module: > https://github.com/prometheus/node_exporter/blob/b6215e649cdfc0398ca98df8e63f3773f1725840/collector/textfile.go#L38 > ) > > Regards, > Julius > > On Mon, Aug 23, 2021 at 2:03 PM Prince wrote: > >> Hi everyone, I am new to prometheus. I am using type Gauge.

Re: [prometheus-developers] Adding timestamps to Gauge Metric

2021-08-31 Thread Prince
Thank you. Got It. for NewMetricWithTimestamp(time.Time,metric) Is it compulsory that the time should be in UTC? On Tuesday, August 31, 2021 at 2:14:44 PM UTC+5:30 Stuart Clark wrote: > On 2021-08-30 07:19, Prince wrote: > > So that means in the Prometheus graph the data will b

Re: [prometheus-developers] Adding timestamps to Gauge Metric

2021-08-29 Thread Prince
cy. For that >> use case you should look at an event store - something like Elasticsearch, >> InfluxDB or a standard relational or no-SQL database. >> >> On 29 August 2021 11:15:44 BST, Prince wrote: >>> >>> Is it possible to give a custom timestamp in Prometheus

Re: [prometheus-developers] Adding timestamps to Gauge Metric

2021-08-28 Thread Prince
ps://prometheus.io/docs/instrumenting/writing_exporters/#collectors > > On Tue, Aug 24, 2021 at 7:43 PM Prince wrote: > >> Thank you, As I understood the NewMetricWithTimestamp() takes two >> parameters one the time and the other one is metric. So as my metric name >&g

Re: [prometheus-developers] Adding timestamps to Gauge Metric

2021-08-29 Thread Prince
C+5:30 Prince wrote: > Thank you, understood. I have used the following: > > in Collect() > * t := time.Date(2021, time.August, 28, 07, 0, 0, 12345678, time.UTC)* > *s := prometheus.MustNewConstMetric(c.metric, prometheus.GaugeValue, > float64(s.value))* > *ch<- prome

Re: [prometheus-developers] Adding timestamps to Gauge Metric

2021-08-30 Thread Prince
(such as InfluxDB or Timescale DB). For > many of the different options you can visualise them using Grafana, which > allows you to show data from both Prometheus and your event store > > On 29 August 2021 14:08:02 BST, Prince wrote: >> >> So let's suppose we are monitori

Re: [prometheus-developers] Adding timestamps to Gauge Metric

2021-09-09 Thread Prince
Thanks On Thursday, September 2, 2021 at 9:35:57 PM UTC+5:30 bjo...@rabenste.in wrote: > On 31.08.21 04:27, Prince wrote: > > > > for NewMetricWithTimestamp(time.Time,metric) Is it compulsory that the > > time should be in UTC? > > Short answer: No. > >

[prometheus-developers] Prometheus scraping at metric-endpoint

2021-09-09 Thread Prince
Hi everyone, Can anyone please let me know, Is it possible to collect multiple gauge values for a single time series at the metric end-point? For eg: the text-format exposition my_metric{lname:"abc"} 1.5 2.5 ** here metric name is: my_metric label name is: lname label value is: abc

Re: [prometheus-developers] Prometheus scraping at metric-endpoint

2021-09-12 Thread Prince
Thank you. So for a for each unique label value there will be a unique time-series On Thursday, September 9, 2021 at 3:57:48 PM UTC+5:30 Stuart Clark wrote: > On 2021-09-09 11:06, Prince wrote: > > Hi everyone, > > Can anyone please let me know, Is it possible to collect mul

[prometheus-developers] Combining multiple metric to show on one graph in Prometheus

2021-09-13 Thread Prince
Hey everyone, Can anyone help me with this: I want to combine two metrics in such a way that both should be displayed on one graph in Prometheus. For eg: metric_one{label1:value1} 123 metrci_two{label2:value2} 345 I want these metrics should be displayed on one chart in Prometheus. The

[prometheus-developers] Is it possible that timeseries can get replaced with a new scrapped one

2021-09-15 Thread Prince
HI everyone, I am new t Prometheus, can anyone let me know: Is it possible to replace the existing time series with new scrapped data. For example: at metric end: metric_example(name:"abc") 1 metric_example(name:"xyz") 2 So for this Prometheus server will have two timeseries as:

[prometheus-developers] regarding missing some timeseries data differs in millisecond in prometheus

2021-10-07 Thread Prince
I am monitoring an application. For which Prometheus server is scraping the matrices at the endpoint along with the timestamp. But in prometheus graph It is not getting displayed for timestamps that are differ in millisecond. For eg: metric_name{name:"abc"} val1 1633586593322//