[psutil] Only set psutil.PROCFS_PATH once in the collector#3013
Merged
Conversation
Since it's a global setting of `psutil` we should only set it once for the whole collector. To preserve backwards compatibility in the process check configuration we only deprecate the setting in its `init_config` (instead of removing it entirely), and use this setting when it doesn't conflict with what's specified in `datadog.conf`.
olivielpeau
force-pushed
the
olivielpeau/fix-custom-procfs-path
branch
from
November 10, 2016 04:56
e531013 to
d26a56c
Compare
truthbk
reviewed
Nov 10, 2016
|
|
||
| if self._conflicting_procfs: | ||
| self.warning('The `procfs_path` defined in `process.yaml` is different from the one defined in ' | ||
| '`datadog.conf`. This is currently not supported by the Agent') |
Member
There was a problem hiding this comment.
We should probably state here we're defaulting to the datadog.conf specified path. It's kind of implicit but if there's no more process logging it might seem like the check was partially skipped or whatever.
olivielpeau
force-pushed
the
olivielpeau/fix-custom-procfs-path
branch
from
November 10, 2016 17:11
6f407e4 to
5cd709f
Compare
truthbk
pushed a commit
that referenced
this pull request
Nov 15, 2016
Since it's a global setting of `psutil` we should only set it once for the whole collector. To preserve backwards compatibility in the process check configuration we only deprecate the setting in its `init_config` (instead of removing it entirely), and use this setting when it doesn't conflict with what's specified in `datadog.conf`.
degemer
added a commit
that referenced
this pull request
Nov 15, 2016
* master: (254 commits) Reduce the maximum amount of argument to pylint. [forwarder] stop flushing after 10s [etcd] Report errors connecting to etcd endpoint (#3007) Postfix check should pass raise_on_empty_output=False [status] Silence requests exception [psutil] Only set `psutil.PROCFS_PATH` once in the collector (#3013) [ci] fix check name detection of test files (#3021) [ci][rabbitmq] Increase wait timeout (#3022) [core] SpooledTemporaryFile for subprocess output (#3002) [collector] isolate system checks (#3001) [ci] Fix Travis jobs timing out (#3017) [mongo] Use db.current_op instead of manually querying (#3016) [ci] fix bad citizens detection (#3020) [ci] add debug logs (#3019) [mongo] use `currentOp` for mongodb 3.2+ Use proxy for API key check in info page (#3012) [mongo] Add MongoDB 3.2 support [mongo] Add MongoDB 3.2 to travis-ci config [packaging] 5.11.0 nightlies (#3009) [core] hard-deprecate start/stop/restart/status (#3004) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the
procfs_pathcustomization in theprocesscheck. Previously theprocfs_pathspecified inprocess.yamlwouldn't be taken into account becausepsutil.PROCFS_PATHwould get overwritten in the__init__method of other checks (in particular thediskcheck since it runs by default)Also, since
PROCFS_PATHis a global setting of thepsutillib it makes sense to set it once for the whole collector and only allow its customization fromdatadog.conf, so let's deprecate the setting inprocess.yaml.Additional Notes
🐮