`CheckMKClient`
check_mk client can be used both from command line and from queries to check remote systes via check_mk

# `CheckMKClient` — CheckMKClient

check_mk client can be used both from command line and from queries to check remote systes via check_mk

Queries (Overview):

A list of all available queries (check commands)

Command | Description
--- | ---
`check_mk_query` | Request remote information via check_mk.

Commands (Overview):

TODO: Add a list of all external commands (this is not check commands)

Configuration (Overview):

Common Keys:

Path / Section | Key | Description
--- | --- | ---
`/settings/check_mk/client` | `channel` | CHANNEL
`/settings/check_mk/client/targets/default` | `address` | TARGET ADDRESS
`/settings/check_mk/client/targets/default` | `allowed ciphers` | ALLOWED CIPHERS
`/settings/check_mk/client/targets/default` | `certificate` | SSL CERTIFICATE
`/settings/check_mk/client/targets/default` | `timeout` | TIMEOUT
`/settings/check_mk/client/targets/default` | `use ssl` | ENABLE SSL ENCRYPTION
`/settings/check_mk/client/targets/default` | `verify mode` | VERIFY MODE

Advanced keys:

Path / Section | Key | Default Value | Description
--- | --- | --- | ---
`/settings/check_mk/client/targets/default` | `alias` | ALIAS |
`/settings/check_mk/client/targets/default` | `ca` | CA |
`/settings/check_mk/client/targets/default` | `certificate format` | CERTIFICATE FORMAT |
`/settings/check_mk/client/targets/default` | `certificate key` | SSL CERTIFICATE |
`/settings/check_mk/client/targets/default` | `dh` | DH KEY |
`/settings/check_mk/client/targets/default` | `host` | TARGET HOST |
`/settings/check_mk/client/targets/default` | `is template` | IS TEMPLATE |
`/settings/check_mk/client/targets/default` | `parent` | PARENT |
`/settings/check_mk/client/targets/default` | `port` | TARGET PORT |

Sample keys:

Path / Section | Key | Default Value | Description
--- | --- | --- | ---
`/settings/check_mk/client/targets/sample` | `address` | TARGET ADDRESS |
`/settings/check_mk/client/targets/sample` | `alias` | ALIAS |
`/settings/check_mk/client/targets/sample` | `allowed ciphers` | ALLOWED CIPHERS |
`/settings/check_mk/client/targets/sample` | `ca` | CA |
`/settings/check_mk/client/targets/sample` | `certificate` | SSL CERTIFICATE |
`/settings/check_mk/client/targets/sample` | `certificate format` | CERTIFICATE FORMAT |
`/settings/check_mk/client/targets/sample` | `certificate key` | SSL CERTIFICATE |
`/settings/check_mk/client/targets/sample` | `dh` | DH KEY |
`/settings/check_mk/client/targets/sample` | `host` | TARGET HOST |
`/settings/check_mk/client/targets/sample` | `is template` | IS TEMPLATE |
`/settings/check_mk/client/targets/sample` | `parent` | PARENT |
`/settings/check_mk/client/targets/sample` | `port` | TARGET PORT |
`/settings/check_mk/client/targets/sample` | `timeout` | TIMEOUT |
`/settings/check_mk/client/targets/sample` | `use ssl` | ENABLE SSL ENCRYPTION |
`/settings/check_mk/client/targets/sample` | `verify mode` | VERIFY MODE |

## Queries

A quick reference for all available queries (check commands) in the CheckMKClient module.

### `check_mk_query`

`CheckMKClient` `check_mk_query`
Request remote information via check_mk.

Usage:

Option | Default Value | Description
--- | --- | ---
`help` | N/A | Show help screen (this screen)
`help-pb` | N/A | Show help screen as a protocol buffer payload
`show-default` | N/A | Show default values for a given command
`help-short` | N/A | Show help screen (short format).
`host` |  | The host of the host running the server
`port` |  | The port of the host running the server
`address` |  | The address (host:port) of the host running the server
`timeout` |  | Number of seconds before connection times out (default=10)
`target` |  | Target to use (lookup connection info from config)
`retry` |  | Number of times ti retry a failed connection attempt (default=2)
`command` |  | The name of the query that the remote daemon should run
`arguments` |  | list of arguments
`query-command` |  | The name of the query that the remote daemon should run
`query-arguments` |  | list of arguments
`certificate` |  | Length of payload (has to be same as on the server)
`dh` |  | Length of payload (has to be same as on the server)
`certificate-key` |  | Client certificate to use
`certificate-format` |  | Client certificate format
`ca` |  | Certificate authority
`verify` |  | Client certificate format
`allowed-ciphers` |  | Client certificate format
`payload-length` |  | Length of payload (has to be same as on the server)
`buffer-length` |  | Length of payload (has to be same as on the server)
`ssl` | N/A | Initial an ssl handshake with the server.
`timeout` |  |

#### Arguments

`help` (CheckMKClient, check_mk_query)
  Show help screen (this screen)

`help-pb` (CheckMKClient, check_mk_query)
  Show help screen as a protocol buffer payload

`show-default` (CheckMKClient, check_mk_query)
  Show default values for a given command

`help-short` (CheckMKClient, check_mk_query)
  Show help screen (short format).

`host` (CheckMKClient, check_mk_query)
  The host of the host running the server

`port` (CheckMKClient, check_mk_query)
  The port of the host running the server

`address` (CheckMKClient, check_mk_query)
  The address (host:port) of the host running the server

`timeout` (CheckMKClient, check_mk_query)
  Number of seconds before connection times out (default=10)

`target` (CheckMKClient, check_mk_query)
  Target to use (lookup connection info from config)

`retry` (CheckMKClient, check_mk_query)
  Number of times ti retry a failed connection attempt (default=2)

`command` (CheckMKClient, check_mk_query)
  The name of the query that the remote daemon should run

`arguments` (CheckMKClient, check_mk_query)
  list of arguments

`query-command` (CheckMKClient, check_mk_query)
  The name of the query that the remote daemon should run

`query-arguments` (CheckMKClient, check_mk_query)
  list of arguments

`certificate` (CheckMKClient, check_mk_query)
  Length of payload (has to be same as on the server)

`dh` (CheckMKClient, check_mk_query)
  Length of payload (has to be same as on the server)

`certificate-key` (CheckMKClient, check_mk_query)
  Client certificate to use

`certificate-format` (CheckMKClient, check_mk_query)
  Client certificate format

`ca` (CheckMKClient, check_mk_query)
  Certificate authority

`verify` (CheckMKClient, check_mk_query)
  Client certificate format

`allowed-ciphers` (CheckMKClient, check_mk_query)
  Client certificate format

`payload-length` (CheckMKClient, check_mk_query)
  Length of payload (has to be same as on the server)

`buffer-length` (CheckMKClient, check_mk_query)
  Length of payload (has to be same as on the server)

`ssl` (CheckMKClient, check_mk_query)
  Initial an ssl handshake with the server.

`timeout` (CheckMKClient, check_mk_query)

### / settings/ check_mk/ client

`/settings/check_mk/client` (CheckMKClient)

CHECK MK CLIENT SECTION

> Section for NSCP active/passive check module.

> Key | Default Value | Description
> --- | --- | ---
> `channel` | CheckMK | CHANNEL

> Sample:

>     # CHECK MK CLIENT SECTION
>     # Section for NSCP active/passive check module.
>     [/settings/check_mk/client]
>     channel=CheckMK

> `channel` (CheckMKClient, /settings/check_mk/client)

>   CHANNEL

>   The channel to listen to.

>   Path: /settings/check_mk/client

>   Key: channel

>   Default value: CheckMK

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client]
>       # CHANNEL
>       channel=CheckMK

### … / handlers

`/settings/check_mk/client/handlers` (CheckMKClient)

CLIENT HANDLER SECTION

> Sample:

>     # CLIENT HANDLER SECTION
>     #
>     [/settings/check_mk/client/handlers]

### … / scripts

`/settings/check_mk/client/scripts` (CheckMKClient)

REMOTE TARGET DEFINITIONS

> Sample:

>     # REMOTE TARGET DEFINITIONS
>     #
>     [/settings/check_mk/client/scripts]

### … / targets

`/settings/check_mk/client/targets` (CheckMKClient)

REMOTE TARGET DEFINITIONS

> Sample:

>     # REMOTE TARGET DEFINITIONS
>     #
>     [/settings/check_mk/client/targets]

### … / targets / default

`/settings/check_mk/client/targets/default` (CheckMKClient)

TARGET DEFENITION

> Target definition for: default

> Key | Default Value | Description
> --- | --- | ---
> `address` |  | TARGET ADDRESS
> `alias` |  | ALIAS
> `allowed ciphers` | ADH | ALLOWED CIPHERS
> `ca` |  | CA
> `certificate` |  | SSL CERTIFICATE
> `certificate format` | PEM | CERTIFICATE FORMAT
> `certificate key` |  | SSL CERTIFICATE
> `dh` | ${certificate-path}/nrpe_dh_512.pem | DH KEY
> `host` |  | TARGET HOST
> `is template` | 0 | IS TEMPLATE
> `parent` | default | PARENT
> `port` | 0 | TARGET PORT
> `timeout` | 30 | TIMEOUT
> `use ssl` | 1 | ENABLE SSL ENCRYPTION
> `verify mode` | none | VERIFY MODE

> Sample:

>     # TARGET DEFENITION
>     # Target definition for: default
>     [/settings/check_mk/client/targets/default]
>     address=
>     alias=
>     allowed ciphers=ADH
>     ca=
>     certificate=
>     certificate format=PEM
>     certificate key=
>     dh=${certificate-path}/nrpe_dh_512.pem
>     host=
>     is template=0
>     parent=default
>     port=0
>     timeout=30
>     use ssl=1
>     verify mode=none

> `address` (CheckMKClient, /settings/check_mk/client/targets/default)

>   TARGET ADDRESS

>   Target host address

>   Path: /settings/check_mk/client/targets/default

>   Key: address

>   Default value:

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # TARGET ADDRESS
>       address=

> `alias` (CheckMKClient, /settings/check_mk/client/targets/default)

>   ALIAS

>   The alias (service name) to report to server

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: alias

>   Default value:

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # ALIAS
>       alias=

> `allowed ciphers` (CheckMKClient, /settings/check_mk/client/targets/default)

>   ALLOWED CIPHERS

>   A better value is: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH

>   Path: /settings/check_mk/client/targets/default

>   Key: allowed ciphers

>   Default value: ADH

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # ALLOWED CIPHERS
>       allowed ciphers=ADH

> `ca` (CheckMKClient, /settings/check_mk/client/targets/default)

>   CA

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: ca

>   Default value:

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # CA
>       ca=

> `certificate` (CheckMKClient, /settings/check_mk/client/targets/default)

>   SSL CERTIFICATE

>   Path: /settings/check_mk/client/targets/default

>   Key: certificate

>   Default value:

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # SSL CERTIFICATE
>       certificate=

> `certificate format` (CheckMKClient, /settings/check_mk/client/targets/default)

>   CERTIFICATE FORMAT

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: certificate format

>   Default value: PEM

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # CERTIFICATE FORMAT
>       certificate format=PEM

> `certificate key` (CheckMKClient, /settings/check_mk/client/targets/default)

>   SSL CERTIFICATE

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: certificate key

>   Default value:

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # SSL CERTIFICATE
>       certificate key=

> `dh` (CheckMKClient, /settings/check_mk/client/targets/default)

>   DH KEY

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: dh

>   Default value: ${certificate-path}/nrpe_dh_512.pem

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # DH KEY
>       dh=${certificate-path}/nrpe_dh_512.pem

> `host` (CheckMKClient, /settings/check_mk/client/targets/default)

>   TARGET HOST

>   The target server to report results to.

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: host

>   Default value:

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # TARGET HOST
>       host=

> `is template` (CheckMKClient, /settings/check_mk/client/targets/default)

>   IS TEMPLATE

>   Declare this object as a template (this means it will not be available as a separate object)

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: is template

>   Default value: 0

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # IS TEMPLATE
>       is template=0

> `parent` (CheckMKClient, /settings/check_mk/client/targets/default)

>   PARENT

>   The parent the target inherits from

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: parent

>   Default value: default

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # PARENT
>       parent=default

> `port` (CheckMKClient, /settings/check_mk/client/targets/default)

>   TARGET PORT

>   The target server port

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/default

>   Key: port

>   Default value: 0

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # TARGET PORT
>       port=0

> `timeout` (CheckMKClient, /settings/check_mk/client/targets/default)

>   TIMEOUT

>   Timeout when reading/writing packets to/from sockets.

>   Path: /settings/check_mk/client/targets/default

>   Key: timeout

>   Default value: 30

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # TIMEOUT
>       timeout=30

> `use ssl` (CheckMKClient, /settings/check_mk/client/targets/default)

>   ENABLE SSL ENCRYPTION

>   This option controls if SSL should be enabled.

>   Path: /settings/check_mk/client/targets/default

>   Key: use ssl

>   Default value: 1

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # ENABLE SSL ENCRYPTION
>       use ssl=1

> `verify mode` (CheckMKClient, /settings/check_mk/client/targets/default)

>   VERIFY MODE

>   Path: /settings/check_mk/client/targets/default

>   Key: verify mode

>   Default value: none

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/default]
>       # VERIFY MODE
>       verify mode=none

### … / targets / sample

`/settings/check_mk/client/targets/sample` (CheckMKClient)

TARGET DEFENITION

> Target definition for: sample

> Key | Default Value | Description
> --- | --- | ---
> `address` |  | TARGET ADDRESS
> `alias` |  | ALIAS
> `allowed ciphers` | ADH | ALLOWED CIPHERS
> `ca` |  | CA
> `certificate` |  | SSL CERTIFICATE
> `certificate format` | PEM | CERTIFICATE FORMAT
> `certificate key` |  | SSL CERTIFICATE
> `dh` | ${certificate-path}/nrpe_dh_512.pem | DH KEY
> `host` |  | TARGET HOST
> `is template` | 0 | IS TEMPLATE
> `parent` | default | PARENT
> `port` | 0 | TARGET PORT
> `timeout` | 30 | TIMEOUT
> `use ssl` | 1 | ENABLE SSL ENCRYPTION
> `verify mode` | none | VERIFY MODE

> Sample:

>     # TARGET DEFENITION
>     # Target definition for: sample
>     [/settings/check_mk/client/targets/sample]
>     address=
>     alias=
>     allowed ciphers=ADH
>     ca=
>     certificate=
>     certificate format=PEM
>     certificate key=
>     dh=${certificate-path}/nrpe_dh_512.pem
>     host=
>     is template=0
>     parent=default
>     port=0
>     timeout=30
>     use ssl=1
>     verify mode=none

> `address` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   TARGET ADDRESS

>   Target host address

>   Path: /settings/check_mk/client/targets/sample

>   Key: address

>   Default value:

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # TARGET ADDRESS
>       address=

> `alias` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   ALIAS

>   The alias (service name) to report to server

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: alias

>   Default value:

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # ALIAS
>       alias=

> `allowed ciphers` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   ALLOWED CIPHERS

>   A better value is: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH

>   Path: /settings/check_mk/client/targets/sample

>   Key: allowed ciphers

>   Default value: ADH

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # ALLOWED CIPHERS
>       allowed ciphers=ADH

> `ca` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   CA

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: ca

>   Default value:

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # CA
>       ca=

> `certificate` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   SSL CERTIFICATE

>   Path: /settings/check_mk/client/targets/sample

>   Key: certificate

>   Default value:

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # SSL CERTIFICATE
>       certificate=

> `certificate format` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   CERTIFICATE FORMAT

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: certificate format

>   Default value: PEM

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # CERTIFICATE FORMAT
>       certificate format=PEM

> `certificate key` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   SSL CERTIFICATE

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: certificate key

>   Default value:

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # SSL CERTIFICATE
>       certificate key=

> `dh` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   DH KEY

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: dh

>   Default value: ${certificate-path}/nrpe_dh_512.pem

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # DH KEY
>       dh=${certificate-path}/nrpe_dh_512.pem

> `host` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   TARGET HOST

>   The target server to report results to.

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: host

>   Default value:

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # TARGET HOST
>       host=

> `is template` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   IS TEMPLATE

>   Declare this object as a template (this means it will not be available as a separate object)

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: is template

>   Default value: 0

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # IS TEMPLATE
>       is template=0

> `parent` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   PARENT

>   The parent the target inherits from

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: parent

>   Default value: default

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # PARENT
>       parent=default

> `port` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   TARGET PORT

>   The target server port

>   Advanced (means it is not commonly used)

>   Path: /settings/check_mk/client/targets/sample

>   Key: port

>   Default value: 0

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # TARGET PORT
>       port=0

> `timeout` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   TIMEOUT

>   Timeout when reading/writing packets to/from sockets.

>   Path: /settings/check_mk/client/targets/sample

>   Key: timeout

>   Default value: 30

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # TIMEOUT
>       timeout=30

> `use ssl` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   ENABLE SSL ENCRYPTION

>   This option controls if SSL should be enabled.

>   Path: /settings/check_mk/client/targets/sample

>   Key: use ssl

>   Default value: 1

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # ENABLE SSL ENCRYPTION
>       use ssl=1

> `verify mode` (CheckMKClient, /settings/check_mk/client/targets/sample)

>   VERIFY MODE

>   Path: /settings/check_mk/client/targets/sample

>   Key: verify mode

>   Default value: none

>   Sample key: This key is provided as a sample to show how to configure objects

>   Used by: `CheckMKClient`

>   Sample:

>       [/settings/check_mk/client/targets/sample]
>       # VERIFY MODE
>       verify mode=none

comments powered by Disqus