Hi stuart, 

Thanks for your prompt response.

I m trying to create a tabel dashboard on grafana showing current tabel 
undergoing checksumming and its completion percentage. As i collect these 
metrics from a file where these values get printed as things progress. But when 
i plot this tabel dashboard it shows stale values for tabels which have already 
completed checksuming that too even 10-12 hrs back.

Because of these i end up getting too many values on my dashboard whereas i m 
only intrested in current one.

Regards 
Deependra 

Sent from my iPhone

> On 25-May-2020, at 2:10 PM, Stuart Clark <stuart.cl...@jahingo.com> wrote:
> 
> Until a new value is scraped, that 48% is the current value.
> 
> As a metrics system Prometheus scrapes values regularly. As a result it is 
> unlikely that a scrape will fall exactly on the moment needed for a query to 
> be processed. Instead Prometheus will look back to find the latest value and 
> use that (with a limit, after which a time series is marked as stale).
> 
> What are you trying to achieve? 
> 
>> On 25 May 2020 09:32:02 BST, Deep saraswat <saraswat34...@gmail.com> wrote:
>> I have a Grok exporter gauge metric which returning mysql checksum 
>> completion percentage by reading and parsing from a file. I'm using grafana 
>> dashboard to visualize Prometheus values.
>> 
>> 
>> 
>> 
>> 
>> Problem is Prometheus holding last value of metric until a new value come 
>> for it. For example if last value was 48% then prometheus will keep on 
>> displaying that value until getting a new value.My requirement is, only 
>> return current values of the completion percentage
>> 
>> 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
>> 
>> please help me resolve this.
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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/EC9BDCE7-83B7-4CA8-A625-7914974095F8%40gmail.com.

Reply via email to