Forum Discussion
As I'm doing more and more custom DataSource development which leverages the Collector ScriptCache I am also finding I am desperately wanting this feature also.
In my situation I am working with an API query which specifies a time "window" (start time and end time) to return a set of events which occurred during that time period. The current execution time of the collection run gets saved into ScriptCache to be used as the starting time for the next execution. The problem is that a Poll Now will update the ScriptCache with the time that the Poll Now happened (but the Poll Now data is not collected of course) so at the next data collection the "window" going into the API parameters is too narrow and I'm losing data!!!
Basically I need to be able to do something like this:
if ( taskProps.get( "how_am_I_being_run" ) == "pollNow" ) {
// something which does NOT update Collector ScriptCache
} else {
// something which does update Collector ScriptCache
}
(Every time I do a Test Script on the DataSource I also lose data but I can do a clunky work-around during development by working with a clone that has a different ScriptCache item name hard-coded into the Groovy. That's ugly though.)
The big issue is that for such a DataSource - where a time "window" is being saved for next-execution - doing a Poll Now causes data loss. Period.
Related Content
- 31 days ago
- 8 months ago