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

SMTPClient — SMTPClient

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

Queries (Overview):

A list of all available queries (check commands)

Command Description
submit_smtp Submit information to the remote SMTP server.

Commands (Overview):

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

Configuration (Overview):

Common Keys:

Path / Section Key Description
/settings/SMTP/client channel CHANNEL
/settings/SMTP/client/targets/default address TARGET ADDRESS
/settings/SMTP/client/targets/default retries RETRIES
/settings/SMTP/client/targets/default timeout TIMEOUT

Advanced keys:

Path / Section Key Default Value Description
/settings/SMTP/client/targets/default host TARGET HOST  
/settings/SMTP/client/targets/default port TARGET PORT  

Sample keys:

Path / Section Key Default Value Description
/settings/SMTP/client/targets/sample address TARGET ADDRESS  
/settings/SMTP/client/targets/sample host TARGET HOST  
/settings/SMTP/client/targets/sample port TARGET PORT  
/settings/SMTP/client/targets/sample retries RETRIES  
/settings/SMTP/client/targets/sample timeout TIMEOUT  

Queries

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

submit_smtp

SMTPClientsubmit_smtp
Submit information to the remote SMTP server.

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)    
retries   legacy version of retry    
source-host   Source/sender host name (default is auto which means use the name of the actual host)    
sender-host   Source/sender host name (default is auto which means use the name of the actual host)    
command   The name of the command that the remote daemon should run    
alias   Same as command    
message   Message    
result   Result code either a number or OK, WARN, CRIT, UNKNOWN    
separator   Separator to use for the batch command (default is )  
batch   Add multiple records using the separator format is: command result message
sender   Length of payload (has to be same as on the server)    
recipient   Length of payload (has to be same as on the server)    
template   Do not initial an ssl handshake with the server, talk in plain text.    
source-host   Source/sender host name (default is auto which means use the name of the actual host)    
sender-host   Source/sender host name (default is auto which means use the name of the actual host)    

Arguments

help (SMTPClient, submit_smtp)
Show help screen (this screen)
help-pb (SMTPClient, submit_smtp)
Show help screen as a protocol buffer payload
show-default (SMTPClient, submit_smtp)
Show default values for a given command
help-short (SMTPClient, submit_smtp)
Show help screen (short format).
host (SMTPClient, submit_smtp)
The host of the host running the server
port (SMTPClient, submit_smtp)
The port of the host running the server
address (SMTPClient, submit_smtp)
The address (host:port) of the host running the server
timeout (SMTPClient, submit_smtp)
Number of seconds before connection times out (default=10)
target (SMTPClient, submit_smtp)
Target to use (lookup connection info from config)
retry (SMTPClient, submit_smtp)
Number of times ti retry a failed connection attempt (default=2)
retries (SMTPClient, submit_smtp)
legacy version of retry
source-host (SMTPClient, submit_smtp)
Source/sender host name (default is auto which means use the name of the actual host)
sender-host (SMTPClient, submit_smtp)
Source/sender host name (default is auto which means use the name of the actual host)
command (SMTPClient, submit_smtp)
The name of the command that the remote daemon should run
alias (SMTPClient, submit_smtp)
Same as command
message (SMTPClient, submit_smtp)
Message
result (SMTPClient, submit_smtp)
Result code either a number or OK, WARN, CRIT, UNKNOWN
separator (SMTPClient, submit_smtp)
Separator to use for the batch command (default is |)
batch (SMTPClient, submit_smtp)
Add multiple records using the separator format is: command|result|message
sender (SMTPClient, submit_smtp)
Length of payload (has to be same as on the server)
recipient (SMTPClient, submit_smtp)
Length of payload (has to be same as on the server)
template (SMTPClient, submit_smtp)
Do not initial an ssl handshake with the server, talk in plain text.
source-host (SMTPClient, submit_smtp)
Source/sender host name (default is auto which means use the name of the actual host)
sender-host (SMTPClient, submit_smtp)
Source/sender host name (default is auto which means use the name of the actual host)

/ settings/ SMTP/ client

/settings/SMTP/client (SMTPClient)

SMTP CLIENT SECTION

Section for SMTP passive check module.
Key Default Value Description
channel SMTP CHANNEL

Sample:

# SMTP CLIENT SECTION
# Section for SMTP passive check module.
[/settings/SMTP/client]
channel=SMTP
channel (SMTPClient, /settings/SMTP/client)

CHANNEL

The channel to listen to.

Path: /settings/SMTP/client

Key: channel

Default value: SMTP

Used by: SMTPClient

Sample:

[/settings/SMTP/client]
# CHANNEL
channel=SMTP

… / handlers

/settings/SMTP/client/handlers (SMTPClient)

CLIENT HANDLER SECTION

Sample:

# CLIENT HANDLER SECTION
#
[/settings/SMTP/client/handlers]

… / targets

/settings/SMTP/client/targets (SMTPClient)

REMOTE TARGET DEFINITIONS

Sample:

# REMOTE TARGET DEFINITIONS
#
[/settings/SMTP/client/targets]

… / targets / default

/settings/SMTP/client/targets/default (SMTPClient)

TARGET

Target definition for: default
Key Default Value Description
address   TARGET ADDRESS
host   TARGET HOST
port   TARGET PORT
retries 3 RETRIES
timeout 30 TIMEOUT

Sample:

# TARGET
# Target definition for: default
[/settings/SMTP/client/targets/default]
address=
host=
port=
retries=3
timeout=30
address (SMTPClient, /settings/SMTP/client/targets/default)

TARGET ADDRESS

Target host address

Path: /settings/SMTP/client/targets/default

Key: address

Default value:

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/default]
# TARGET ADDRESS
address=
host (SMTPClient, /settings/SMTP/client/targets/default)

TARGET HOST

The target server to report results to.

Advanced (means it is not commonly used)

Path: /settings/SMTP/client/targets/default

Key: host

Default value:

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/default]
# TARGET HOST
host=
port (SMTPClient, /settings/SMTP/client/targets/default)

TARGET PORT

The target server port

Advanced (means it is not commonly used)

Path: /settings/SMTP/client/targets/default

Key: port

Default value:

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/default]
# TARGET PORT
port=
retries (SMTPClient, /settings/SMTP/client/targets/default)

RETRIES

Number of times to retry sending.

Path: /settings/SMTP/client/targets/default

Key: retries

Default value: 3

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/default]
# RETRIES
retries=3
timeout (SMTPClient, /settings/SMTP/client/targets/default)

TIMEOUT

Timeout when reading/writing packets to/from sockets.

Path: /settings/SMTP/client/targets/default

Key: timeout

Default value: 30

Used by: SMTPClient

Sample:

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

… / targets / sample

/settings/SMTP/client/targets/sample (SMTPClient)

TARGET

Target definition for: sample
Key Default Value Description
address   TARGET ADDRESS
host   TARGET HOST
port   TARGET PORT
retries 3 RETRIES
timeout 30 TIMEOUT

Sample:

# TARGET
# Target definition for: sample
[/settings/SMTP/client/targets/sample]
address=
host=
port=
retries=3
timeout=30
address (SMTPClient, /settings/SMTP/client/targets/sample)

TARGET ADDRESS

Target host address

Path: /settings/SMTP/client/targets/sample

Key: address

Default value:

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

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/sample]
# TARGET ADDRESS
address=
host (SMTPClient, /settings/SMTP/client/targets/sample)

TARGET HOST

The target server to report results to.

Advanced (means it is not commonly used)

Path: /settings/SMTP/client/targets/sample

Key: host

Default value:

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

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/sample]
# TARGET HOST
host=
port (SMTPClient, /settings/SMTP/client/targets/sample)

TARGET PORT

The target server port

Advanced (means it is not commonly used)

Path: /settings/SMTP/client/targets/sample

Key: port

Default value:

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

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/sample]
# TARGET PORT
port=
retries (SMTPClient, /settings/SMTP/client/targets/sample)

RETRIES

Number of times to retry sending.

Path: /settings/SMTP/client/targets/sample

Key: retries

Default value: 3

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

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/sample]
# RETRIES
retries=3
timeout (SMTPClient, /settings/SMTP/client/targets/sample)

TIMEOUT

Timeout when reading/writing packets to/from sockets.

Path: /settings/SMTP/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: SMTPClient

Sample:

[/settings/SMTP/client/targets/sample]
# TIMEOUT
timeout=30
comments powered by Disqus