Forum Discussion
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.
Related Content
- 7 months ago
- 2 years ago
- 8 months ago