Werk #337: New header for limiting the execution time of a query
Component | Livestatus | ||||||||||||||||||
Title | New header for limiting the execution time of a query | ||||||||||||||||||
Date | Dec 16, 2013 | ||||||||||||||||||
Level | Trivial Change | ||||||||||||||||||
Class | New Feature | ||||||||||||||||||
Compatibility | Compatible - no manual interaction needed | ||||||||||||||||||
Checkmk versions & editions |
|
The new Livestatus header Timelimit: sets an upper limit for the execution time of a query. Specify the timeout as a number of seconds. The following query will stop after 5000 lines of output. If that takes longer than 30 seconds, then the query fails with no output:
query.lql
GET log
Columns: message
Timelimit: 30
Limit: 5000
Please note, that Limit: and Timelimit: have a different behaviour when the limit is reached:
- Limit: end the query, output all rows that have been found so far.
- Timelimit: abort the query with an error, do not output any lines.