F5 Syntax

Usage

<custom_item>

description : ["description"]

f5_command : ["/path/to/evaluate"]

json_transform : ["jquery"]

expect : ["lines to match against"]

(optional) not_expect : ["lines to match against"]

(optional) regex : ["lines to filter"]

(optional) required : [YES|NO]

(optional) match_all : [YES|NO]

(optional) min_occurrences : ["numerical value"]

(optional) max_occurrences : ["numerical value"]

</custom_item>

Keywords

f5_command

The path to retrieve data for evaluation.

Example:

f5_command : "/tm/sys/httpd"

Data is retrieved on the target path at http://{HostIPAddress}/mgmt/tm/sys/httpd through the iControl REST API.

json_transform

Performs a JSON transformation against returned data to filter results.

Example:

json_transform : ".maxClients"

expect or not_expect

The evaluation is based on expect or not_expect. Use only one of these fields in a check.

  • For expect, if the regular expression matches a line of text, the check results as PASSED. If there are no matches, the check results as FAILED.
  • For not_expect, if the regular expression matches a line of text, the check results as FAILED. If there are no matches, the check results as PASSED.

For example, you could use not_expect to check that 'telnet' is not found in any line.

regex

(Optional) Filters the full configurations to a smaller set of lines of text based on the regular expression. Multiple regex can be used to narrow down the searchable configuration, and they are applied in the order that they are listed in the check.

required

By default, is set to YES, which requires the item to be found to pass. If set to NO, allows the check to pass if the item is not found.

match_all

(Optional) When set to YES, requires the item to match all lines of text, instead of a single line of text. By default, is set to NO, which requires only one line to match for the check to pass.

min_occurrences

Specifies a number of minimum occurrences that must be met to obtain a passing result.

Useful for matching against multiple NTP lines.

max_occurrences

Specifies a number of maximum occurrences that must be met to obtain a passing result.

Useful for matching against a target having no more than one username line, or multiple SNMP strings being set.

Example

<custom_item>

description : "Limit the number of concurrent sessions for virtual servers."

f5_command : "/tm/ltm/virtual"

json_transform : ".items[] | \"\(.name) - Connection Limit = \(.connectionLimit)\""

regex : "Connection Limit = .+"

expect : "Connection Limit = 5$"

match_all : YES

</custom_item>