-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
add sample directory size exporter #789
Conversation
Thanks. One note, textfile scripts follow the standard of sending the data to |
i followed the example in https://www.robustperception.io/monitoring-directory-sizes-with-the-textfile-collector/, which ensures atomicity... should i change this? i don't mind :) |
Yes, for the examples here, we decided to go with simple It also makes it easier to test out scripts by running them manually, so they don't automatically update metrics. |
This is a possible workaround for the lack of metrics in the new storage backend, as documented in: prometheus/prometheus#3684 Partly inspired by this post as well: https://www.robustperception.io/monitoring-directory-sizes-with-the-textfile-collector/
alright, how does 541c05e look instead then? |
hmm... i can't review the build failure on buildkite as i don't have an account. can anyone enlighten me? |
The buildkite tests are broken, don't worry about them. |
I would suggest adding |
hmm... is that the only character we would need to escape? this path is provided by the admin... they would be shooting themselves in the foot by submitting such a nasty path... |
Yes, double quote is the only thing you need to escape. |
Backslash also needs escaping in label values. |
so how about adding what a mess shell is :p |
@anarcat Yes, except possibly |
@SuperQ not sure that's necessary:
my original sed was backwards, so it was escaping the backslashes from the previous ones... i've added a commit to properly escape stuff, see if it fits for you... too bad there's no unit tests for this... another reason why this would be a good addition in the core... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* add sample directory size exporter This is a possible workaround for the lack of metrics in the new storage backend, as documented in: prometheus/prometheus#3684 Partly inspired by this post as well: https://www.robustperception.io/monitoring-directory-sizes-with-the-textfile-collector/ * properly escape backslashes and double-quotes
This is a possible workaround for the lack of metrics in the new
storage backend, as documented in:
prometheus/prometheus#3684
Partly inspired by this post as well:
https://www.robustperception.io/monitoring-directory-sizes-with-the-textfile-collector/