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

Gauges get expired #1514

Closed
hryamzik opened this Issue Mar 31, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@hryamzik
Copy link

hryamzik commented Mar 31, 2016

I have a set of constants per host and would like to not to update them as often as other metrics. So I've tried to add timestamp to them:

# TYPE node_cpu_facts gauge
node_cpu_facts { fact="cores" } 8 1459466225000
node_cpu_facts { fact="count" } 2 1459466225000
node_cpu_facts { fact="threads_per_core" } 2 1459466225000

The problem is that they expire. It does look like a bug for me.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 31, 2016

This is working as expected, timestamps should be avoided for all bar expert users.

What you want here is to expose without timestamps via the textfile collector. I'd also suggest using a metrics per fact, rather than having one metric with many labels.

@hryamzik

This comment has been minimized.

Copy link
Author

hryamzik commented Mar 31, 2016

Indeed, had to move to:

# cat /var/lib/node_exporter/ansible_info.prom 
# Ansible managed: file modified on 2016-04-01 02:27:07 by hryamzik on hryamziks-mac
# TYPE node_cpu_facts gauge
node_cpu_cores 8
node_cpu_count 2
node_cpu_threads_per_core 2

Thanks for the fast replay, I think we can close this. I would say documentation update could be very helpful for this scenario.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 31, 2016

Can you point me at what docs lead you astray? I'm not aware of any official project docs in this area, only my own company blogs at http://www.robustperception.io/tag/textfile-collector/

@hryamzik

This comment has been minimized.

Copy link
Author

hryamzik commented Mar 31, 2016

I would expect to find these recommendations here

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 31, 2016

It's covered more at https://prometheus.io/docs/practices/naming/, there's an existing issue around cleaning up this split.

@hryamzik

This comment has been minimized.

Copy link
Author

hryamzik commented Mar 31, 2016

Good, thank you very much for your detailed and fast answers!

@grobie grobie closed this Apr 1, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.