Checkmk Conference#7 is going live today! Join it here!

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
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 1.2.5i1
Level Trivial Change
Class New Feature
Compatibility Compatible - no manual interaction needed

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.
  • To the list of all Werks