The Calculator writes some metric back to Introscope. It looks like that Introscope just uses the provided metric value for all passed script iterations, meaning if value 10 is returned after 2 minutes execution time, I can see the value 10 for that metric for start, start + 15s, start + 30s, ... end of script (~2 minutes). Quite interesting this behaviour.
Thanks for your responses.
12/01/14 03:40:29.819 PM CET [WARN] [master clock] [Manager.Clock] Timeslice processing delayed due to system activity. Combining data from timeslices 94496314 to 94496321
My current conclusion:
I have neither tried it out nor do I know 100% how the scripts are executed and what happens in parallel and what not.
Are other metrics processed normally while the script is running for 2 minutes? Or don't you get any metrics at all while your script is sleeping?
Of course you don't get any metrics reported from your script while it is sleeping. EM is a real-time process. Once once computation cycle is over after 15s you cannot change what is reported in that interval. Metrics from agents or scripts are always only reported, stored and use for other computations (calculators, alerts, ...) in the current interval. If for some reason the computation for that interval is not finished it will be combined with the next interval. Therefore you get the "combining timeslices" warning.
If your script takes more than 15s it is not suited for running in the EM!!! Actually it should be completed in a few milliseconds.
Why do you think or what are you doing that your scripts should take several seconds?
thanks for your response.
> Are other metrics processed normally while the script is running for 2 minutes? Or don't you get any metrics at all while your script is sleeping?
> Of course you don't get any metrics reported from your script while it is sleep ...
Thanks for the information which help a lot to understand how Introscope works and what the specific log warning means.
> If your script takes more than 15s it is not suited for running in the EM!!! Actually it should be completed in a few milliseconds. Why do you think or what are you doing that your scripts should take several seconds?
I don't think that the script will ever take longer than 2-3 seconds. It should be less then 1 sec or even less than 300-500 ms. But you never know if due to unknown circumstances the script will take more than 15 seconds. Therefore, it is always good to know how a tool will handle this situation. Especially if this could cause problems for your whole monitoring environment.
always glad to help.
To reduce the impact of the script iterate over as few metrics as possible. Specify the regular expressions in getAgentRegex() and getMetricRegex() as strictly as possible - which requires a naming convention for agents and metrics which is a Best Practice anyways.
thanks for pointing this out. We follow already this Best Practice. Agent names and metric use a naming convention. The regular expressions are as strict as they could be.