Closed (fixed)
Project:
Monitoring
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2015 at 09:26 UTC
Updated:
1 Oct 2015 at 06:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirComment #5
miro_dietikerNice move.
I think the main problem with the code is that you never check for the value of forcedTable or forcedTimeintervalField when excuting the sensors. Instead the settings are always used.
If we go into this direction, we should possibly add a wrapper for all the forcable settings similar to getTimeintervalField()...
Missing is at least getTable()... And check the forced XYZ setting. Then we have a consistent pattern.
Comment #8
berdirFixed the phpnotice sensor, not too happy yet with that specific check about verbose fields there.
Always checking the force flags makes sense, although we should still enforce that config has the correct values and then it doesn't really matter. This is mostly for preventing that the settings can be changed in the UI. Not 100% sure if being able to change them in config is a bug or a feature.. :) For example, we need to make sure that the config dependency on e.g. the table still works, but that can also go throgh the helper.
Comment #9
miro_dietikerFragments from our discussions...
Comment #10
berdirYep, this makes more sense I guess.
Comment #12
miro_dietikerYeah this looks much clean now.
But there is nothing about default values. So with disabled configuration, you fully rely on persisted default values on persisted sensors. This seems fine for updates it looks like the settings are not dropped.
The bigger problem here is creating instances through the UI. If a sensor has configurable set to FALSE and is addable through UI, the value will always end up empty. And in most cases this is wrong since disabling configurability is more something to force a setting to a specific value such as a table.
Comment #13
berdirThere doesn't need to be, default configuration is a different problem. None of the sensors touched here can be added, so it is irrelevant to those.
Comment #14
miro_dietikerYay! Committed.
Tests didn't pass because some dependencies did not yet chase with head.
Comment #18
giancarlosotelo commented