Until now it was only possible to run a single script within one Prometheus job, because the script parameter could only be provided one time.
With the changes in this commit it is now possible to run multiple scripts within one Prometheus job, for that the script parameter can be specified multiple times. For each specified script we are running the same logic as for a single script and then we merge the output of each script execution into one result.
Limitations:
The specified parameters are used for all scripts, it is not possible to specifiy different parameters for the scripts.
The timeout specified via the X-Prometheus-Scrape-Timeout-Seconds might not work correctly, if the offset is not large enough, since the timout logic is applied for all scripts.
If there is an error in the logic for one script, e.g. one of the defined scripts can not be found, the other scripts will also return not output.
Until now it was only possible to run a single script within one Prometheus job, because the
script
parameter could only be provided one time.With the changes in this commit it is now possible to run multiple scripts within one Prometheus job, for that the
script
parameter can be specified multiple times. For each specified script we are running the same logic as for a single script and then we merge the output of each script execution into one result.Limitations:
X-Prometheus-Scrape-Timeout-Seconds
might not work correctly, if the offset is not large enough, since the timout logic is applied for all scripts.Closes #100