Code

sysdbql(7): Updated documentation for the LIST command.
[sysdb.git] / doc / sysdbql.7.txt
index aa3add33085e74d8b03b3968fd7afb83bdcf7270..7e5945e5066b56fcc51d3b663aee0b299f489ba6 100644 (file)
@@ -10,6 +10,7 @@ SYNOPSIS
 --------
 
   LIST hosts;
+  LIST services;
 
   FETCH host 'some.host.name';
 
@@ -30,11 +31,13 @@ QUERY COMMANDS
 Each command is terminated by a semicolon. The following commands are
 available to retrieve information from SysDB:
 
-*LIST* hosts [*FILTER* '<filter_condition>']::
-Retrieve a sorted (by name) list of all hosts currently stored in SysDB. The
-return value is a list of hosts where each host specification includes its
-name, the timestamp of the last update of the object known to SysDB and an
-approximation of the interval with which the host was updated. If a filter
+*LIST* hosts|services|metrics [*FILTER* '<filter_condition>']::
+Retrieve a sorted (by name) list of all hosts currently stored in SysDB along
+with their services or metrics if requested. The return value is a list of
+hosts where each host specification includes its name, the timestamp of the
+last update of the object known to SysDB and an approximation of the interval
+with which the host was updated. When listing services or metrics, the
+respective objects will be included for each host as well. If a filter
 condition is specified, only objects matching that filter will be included in
 the reply. See the section "FILTER clause" for more details about how to
 specify the search and filter conditions.
@@ -58,6 +61,14 @@ matching that filter will be included in the reply. See the sections "MATCHING
 clause" and "FILTER clause" for more details about how to specify the search
 and filter conditions.
 
+*TIMESERIES* '<hostname>'.'<metric>' [START '<datetime>'] [END '<datetime>']::
+Retrieve a time-series for the specified host's metric. The data is retrieved
+from a backend data-store based on information provided by the respective
+query plugin. The return value includes the actual start and end time of the
+time-series and one or multiple sequences of time-stamp / value pairs. If the
+metric does not exist or if the backend data-store is not supported, an error
+is returned.
+
 MATCHING clause
 ~~~~~~~~~~~~~~~
 The *MATCHING* clause in a query specifies a boolean expression which is used
@@ -97,7 +108,8 @@ The following fields may be queried:
 '<value>' may either be a string (when matching by object names) or match the
 type of the attribute's value (when matching attribute values). Attribute
 values may either be a string, integer, decimal number, or a date-time value
-(booleans and binary data are not supported by the frontend yet).
+(booleans and binary data are not supported by the frontend yet). See the
+section "DATA TYPES" for more details about how specify each data-type.
 
 When comparing an attribute's value using a regular expression matcher, the
 value will be cast to a string before doing so. No other casts are supported
@@ -164,6 +176,41 @@ operators). The backend field may only be matched by (in)equality. Each object
 may be provided by multiple backends. The filter matches if the specified
 value matches any of them.
 
+DATA TYPES
+----------
+The SysDB query language natively supports various data-types. Constants of
+all types may be used in any place where a value is expected.
+
+*String constants*::
+       A string constant is an arbitrary sequence of characters enclosed in
+       single quotes ('''). Single quotes may be included in a string constant by
+       specifying two adjacent single quotes.
+
+*Integer constants*::
+       An integer constant may be specified either as a sequence of digits or in
+       scientific notation written in the form "'a' E 'b'" (without spaces) where
+       'a' and 'b' are integers. A leading plus or minus sign specifies the sign
+       of the constant.
+
+*Floating-point constants*::
+       A floating-point constant is a sequence of digits containing a decimal
+       point. Digits before or after the decimal point (but not both) are
+       optional. Floating-point constants may also be specified in scientific
+       notation by appending the letter "E" and a positive or negative integer
+       exponent. A leading plus or minus sign specifies the sign of the constant.
+
+*Date and time constants*::
+       A date constant may be specified as 'YYYY-MM-DD' and time constants may be
+       specified as 'HH:MM:SS.nnnnnnnnn' where seconds and nanoseconds are
+       optional.
+
+*Interval constants*::
+       An interval may be specified by one or multiple quantity and unit pairs.
+       The quantity may be any integer constant and the unit may be any of the
+       following: *Y* (years), *M* (months), *D* (days), *h* (hours), *m*
+       (minutes), *s* (seconds), *ms* (milliseconds), *us* (microseconds), or
+       *ns* (nanoseconds). Note that years and months are approximations.
+
 RESPONSE FORMAT
 ---------------
 The JavaScript Object Notation (JSON) format, as specified in RFC 4627, is
@@ -233,7 +280,7 @@ SEE ALSO
 --------
 manpage:sysdb[1], manpage:sysdb[7]
 
-The SysDB homepage: http://sysdb.io/
+The SysDB homepage: https://sysdb.io/
 
 AUTHOR
 ------