1. Available tables
The following tables are available for use in Livestatus. Some of them additionally function over the columns of another table. These columns will be identified by the table’s name as a prefix:
Table | Comments |
---|---|
|
Contains all information for the configured hosts. |
|
Contains all information for the configured services, and additionally the columns from |
|
Information for the host groups. |
|
Information for the service groups. |
|
Information for the contact groups. |
|
As for |
|
Like |
|
Like |
|
Information for the contacts. |
|
All configured check commands, as found for a service under Service check command. |
|
All information for the configured time periods. |
|
As for |
|
Contains all information for comments, and in addition the columns from |
|
All information for logged events. These should be filtered by class and time stamp/time period. |
|
Information for the core’s status and performance. |
|
All available tables will be listed here. Additionally, a description of all of a table’s columns is also provided. |
|
The past-statuses for a host/service can be comprehensively searched with this table. |
|
Lists all of the Event Console's events. This table additionally has all columns from |
|
Like |
|
Lists statistics from the performance of the Event Console. |
|
Statistics for how often the rule-matching for an incoming event was successful. |
Should you wish to know which columns a table uses, these can be easily shown with the following command:
OMD[mysite]:~$ lq "GET columns\nColumns: name\nFilter: table = columns"
description
name
table
type
Other tables can also be selected by using filters. All of the columns available for searching by column and table can be seen in the output from the example shown.
2. Available headers
Header | Argument | Function |
---|---|---|
|
Column name |
Restricts the output to the specified columns. |
|
Column name, operator and object name |
Restricts the output to the defined object. See also filter. |
|
Integer |
Links the last |
|
Integer |
Links the last |
|
Integer |
Inverts the last |
|
ASCII-values |
Defines the characters for separating elements. |
|
Name |
Defines an alternative output format for the data. Possible formats are |
|
Operator and column names |
Generates statistics for specified columns. |
|
Integer |
Provides the |
|
Integer |
Provides the |
|
Integer |
Provides the |
|
Integer |
Limits the output to |
|
Integer |
Restricts the time allowed for processing the query to |
|
- |
The first line of the output contains the name of the column used. If the header |
|
User Name |
Restricts the output to the lines that the specified user is authorized to see. |
|
Object Name |
The object for which a specified behavior is expected. This is the object’s name, or respectively in the case of the |
|
Filter condition |
The condition that must be satisfied for the defined object. Any desired number of conditions can be defined – these are linked together with a logical AND. |
|
Integer |
Provides the |
|
Integer |
Provides the |
|
Integer |
Provides the |
|
Keyword * |
Keywords work like a normal condition if they are set by themselves. In combination with the |
|
Integer |
Sets a time limit in milliseconds. Following, for example, 5000 Milliseconds (5 seconds), the query will be executed even if the condition has not been satisfied. |
|
Unix Time |
By using a specified reference time it is attempted to compensate for differing local time stamps in a distributed environment. |
|
fixed16/off |
Returns a status line in the first line of the response. The output itself remains in the first line if the header |
|
on |
Prevents the Livestatus-channel being closed following a query. |
* The following keywords are available for the WaitTrigger
:
check
state
log
downtime
comment
command
program
all
3. Operators for filters
3.1. General operators
Operator * | For numbers | For character strings |
---|---|---|
|
Equality |
Equality |
|
Superset ** |
Contains a character string as a regular expression. |
|
Subset ** |
Case-insensitive equality |
|
Contains at least one of the values ** |
Contains a case-insensitive character string as a regular expression. |
|
Smaller than |
Lexicographically smaller than |
|
Larger than |
Lexicographically larger than |
|
Smaller or equal |
Lexicographically smaller or equal |
|
Larger or equal |
Lexicographically larger or equal |
* All operators can be negated with an exclamation mark (!
).
** These operators are useful when working with lists. Livestatus then interprets the specified values as a quantity.
3.2. Operators for lists
You can check whether an element is included in a list using the following operators:
Operator | Type of check |
---|---|
|
Checks for empty lists * |
|
Equality |
|
Disparity |
|
Case-insensitive equality |
|
Case-insensitive disparity |
|
The character string for a regular expression * |
|
The case-insensitive character string for a regular expression * |
* These operators can be negated with an exclamation mark (!
).
4. Operators for statistics
Operator | Description |
---|---|
|
Generates a sum from the values. |
|
Searches for the smallest value. |
|
Searches for the highest value. |
|
Calculates an average value (mean value). |
|
Outputs the standard deviation. |
|
Inverts the sum of the values according to 1/ |
|
Inverts the mean value of the values according to 1/ |
5. Status codes from the ResponseHeader
Status code | Description |
---|---|
|
The query was successful and the response contains the requested data. |
|
The query contains a faulty header. |
|
The table could not be found. |
|
The time limit for the query has been exceeded. |
|
The query was incompletely transferred. |
|
The query is completely invalid. |
6. Commands
The following commands are available for you in all Checkmk editions:
Command | Description |
---|---|
Host commands | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Service commands | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other commands | |
|
|
|
|
|
|
|
|
|
|
|
|
|
Enable the execution of alert handlers/event handlers globally |
|
Disable the execution of alert handlers/event handlers globally |
|
Commands which are only available with the CMC in the commercial editions:
Command | Description |
---|---|
Host commands | |
|
tba |
|
tba |
Service commands | |
|
tba |
|
tba |
Other commands | |
|
tba |
|
tba |
|
tba |
|
tba |
|
tba |
|
tba |