Debugging might be the hardest task when you try to create a script datasource using a groovy script. To mitigate this issue, we introduce a built-in command !groovy to help you.
Step 1. Go to Setting tab -> Collectors
Step 2. Click the tools icon of the collector (which you want to use to execute the collecting), and choose "Run debug command ..."
Step 3. Enter "!groovy" (see screenshot below)
Step 4. A dialog with a big text edit box will pop up. Please edit your code there, then click "Submit"
Step 5. The collector will execute the script and show the return value and output in the debug window.
So you can repeat step 3 - step 6 until you get the script right. After you finish debugging the script, you can either copy & paste the source code from the edit box to the file or copy the file <collectorRoot>/tmp/test.groovy (that contains the source code you entered) to wherever you want.
Performance monitoring for all your infrastructure & applications. In minutes, not hours.
Questions? Call Us!
(888) 415-6442 or +1 (805)-617-3884