Forum Discussion

Paul_Carpenter's avatar
4 years ago

A method to identify that a Datasource has been executed via "Poll Now" rather than standard collection, to allow additional info to be displayed conditionally.

Its a common requirement to display additional info to help investigate the root cause of an alert which it may not be possible to display in a datasource (i.e alpha data)  or too "expensive" to gather each and every collection regardless.

If a datasource had some mechanism to determine that it had been called via "Poll Now" , then it could be used to perform additional logic that wouldn't be executed during a "normal" collection.


2 Replies

  • Anonymous's avatar

    For scripted datasources, when you do a poll now, the resulting dialog box actually does output the full output of the script. So, if you wanted to output additional text, you'd just build that into the script output. Normal polling would pull the text but since it you didn't create a datapoint to try to pull in the data, it's discarded. That way when you do a poll now, it'll do what it always does and you can view the full output with the additional troubleshooting text.

    I do this with my ConnectWise CMDB sync DataSource. It's written in Python, not Groovy, but works the same way. The collector executes the script every hour. When it runs, it collects the metrics regarding the synchronization and some text data. Normally, only the data gets picked up and stored. One of the metrics is "number of devices that failed to sync into CW". When i see that value go above zero, i go in and run a poll now. The output of the script again outputs the non-zero value for failures, but also outputs some text indicating which device(s) failed to sync.

  • Thanks for the comment Stuart, but the request was more to handle where the act of collecting the additional info has an overhead .. and didn't want to add that overhead for the majority of collections, only when issued via the Poll Now (i. e interactively when an individual is investigating)