ioBroker.js-controller
ioBroker.js-controller copied to clipboard
Add new Adapter/Host "Send-Reporting-Data Flag"
Currently we only have one "diag" setting in "system.config" which configures if the user allows "diagnostic data reporting" at all. We use this flag for Reporting plugins but this is not that flexible as we would like it. Because of this we want to add a new Flag which indicated that an adapter instance or host is allowed to send own diagnostic/reporting/error data or not. This will then be able to be configured easiely in Admin later and depending on plugin will have priority when it comes to the question if plugin is enabled or not.
We need the following for this:
- Define name of the flag :-) My proposal would be to use a "do not send reportingdata flag" so that it is easier to define if it is relevant or not. Name proposal would be "common.disableDataReporting = true/false" (not existing === false)
- create CLI commands to get/set this for host object and adapter instance object:
- create CLI command "iobroker disableDataReporting host "name|this" enable|disable|on|off" to get/set for a host
- create CLI command "iobroker disableDataReporting adapter "instancename.nr" enable|disable|on|off" to set for a instance object
- if last parametr is ommitted it is a "get" command and the current status (true/false) is returned
- I enhance sentry plugin to respect the flag
- "common.dontSendReportingData = true/false" (not existing === false)
I would default to true for legality reasons.
Admin 5 will make sure to ask the user once ...
Should we combine stuff like this in a single CLI class, e.g.
iobroker config [host or adapter] [hostname or instance] [set/get] [configFlag[=value]]
so we can reuse the command for more config flags in the future?
why not ... like
I would probably construct the commands like in th plugin command
you mean for adapter/instance/host? Also ok
so
iobroker config set/get configFlag[=value] [--host hostname] [--adapter name.id]
??
exactly
agree
But we should limit the allowed properties to change because else a user could change "name" of the adapter object in common or such. So adapter I would allow:
- loglevel
- enabled (really?)
- dontSendReportingData
for host:
- dontSendReportingData only
Should we maybe name the flag sendReportingData
?
I don't quite like the double negation (don't send: false)
Otherwise, yes I'm absolutely for a whitelist.
The default will be "send that stuff" .... thats why "Undefined" would mean true ... that swhy we more had the "do not do it" approach as being better understandable and also usable in code. but i'm ok with both
What about disableDataReporting
I'm okay with that. Although it is a negative, negating it has a clear meaning ("don't disable" instead of "don't don't" 😆 )
Implemented in Sentry with that name ... we move this ticket to later ...