feat(core): add support for poll_rate agent config - #2716
Conversation
|
|
||
| metrics: { | ||
| transmissionDelay: 1000, | ||
| transmissionDelay: 30000, |
There was a problem hiding this comment.
Ah, this was a mistake; I fixed the changes in #2713
I will merge 2713 first and rebase this; I will keep it as 1000
| exports.DEFAULT_LOG_LEVEL = exports.LOG_LEVEL.WARN; | ||
|
|
||
| // Allowed poll rate values in milliseconds, matching the agent's supported poll_rate seconds: | ||
| // [1, 5, 10, 20, 30, 60] |
There was a problem hiding this comment.
Do we have a card to update it to 600s?
There was a problem hiding this comment.
|
|
||
| // Allowed poll rate values in milliseconds, matching the agent's supported poll_rate seconds: | ||
| // [1, 5, 10, 20, 30, 60] | ||
| exports.allowedTransmissionDelayValues = [1000, 5000, 10000, 20000, 30000, 60000]; |
There was a problem hiding this comment.
🤔 I thought customer can set any value between 1 and 60s
There was a problem hiding this comment.
Don't think so.
Code from sensor:
private static final int[] VALID_POLL_RATES = {1, 5, 10, 20, 30, 60, 120, 180, 240, 300, 360, 420, 480, 540, 600};
/**
- Normalizes a poll rate configuration value to the nearest valid poll rate.
- Valid poll rates are: 1, 5, 10, 20, 30, 60, 120, 180, 240, 300, 360, 420, 480, 540, 600 seconds.
- @PARAM input the poll rate configuration value (can be any Number subclass or String)
- @return the normalized poll rate in seconds (always a valid poll rate value)
*/
public static int normalizePollRate(Object input) {
return normalizePollRate(input, 1);
}
There is already a common normaliser which normalized the value to the allowed list, out allowed list is a subset of this
kirrg001
left a comment
There was a problem hiding this comment.
See comments.
Also: The commit is a feature not a fix.
refs https://jsw.ibm.com/browse/INSTA-102260