SMTPClientSMTPClient — 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 |
|---|---|
smtp_submit |
Submit information to remote host via SMTP. |
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 |
recipient |
RECIPIENT |
/settings/SMTP/client/targets/default |
sender |
SENDER |
/settings/SMTP/client/targets/default |
template |
TEMPLATE |
/settings/SMTP/client/targets/default |
timeout |
TIMEOUT |
Advanced keys:
| Path / Section | Key | Default Value | Description |
|---|---|---|---|
/settings/SMTP/client/targets/default |
alias |
ALIAS | |
/settings/SMTP/client/targets/default |
host |
TARGET HOST | |
/settings/SMTP/client/targets/default |
is template |
IS TEMPLATE | |
/settings/SMTP/client/targets/default |
parent |
PARENT | |
/settings/SMTP/client/targets/default |
port |
TARGET PORT |
A quick reference for all available queries (check commands) in the SMTPClient module.
smtp_submit¶SMTPClientsmtp_submitUsage:
| 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 command that the remote daemon should run | |
alias |
Same as command | |
message |
Message | |
result |
Result code either a number or OK, WARN, CRIT, UNKNOWN | |
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 plaintext. |
help (SMTPClient, smtp_submit)¶help-pb (SMTPClient, smtp_submit)¶show-default (SMTPClient, smtp_submit)¶help-short (SMTPClient, smtp_submit)¶host (SMTPClient, smtp_submit)¶port (SMTPClient, smtp_submit)¶address (SMTPClient, smtp_submit)¶timeout (SMTPClient, smtp_submit)¶target (SMTPClient, smtp_submit)¶retry (SMTPClient, smtp_submit)¶command (SMTPClient, smtp_submit)¶alias (SMTPClient, smtp_submit)¶message (SMTPClient, smtp_submit)¶result (SMTPClient, smtp_submit)¶sender (SMTPClient, smtp_submit)¶recipient (SMTPClient, smtp_submit)¶template (SMTPClient, smtp_submit)¶/settings/SMTP/client (SMTPClient)¶SMTP CLIENT SECTION
Section for SMTP passive check module.
Key Default Value Description channelSMTP 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:
SMTPClientSample:
[/settings/SMTP/client] # CHANNEL channel=SMTP
/settings/SMTP/client/handlers (SMTPClient)¶CLIENT HANDLER SECTION
Sample:
# CLIENT HANDLER SECTION # [/settings/SMTP/client/handlers]
/settings/SMTP/client/targets (SMTPClient)¶REMOTE TARGET DEFINITIONS
Sample:
# REMOTE TARGET DEFINITIONS # [/settings/SMTP/client/targets]
/settings/SMTP/client/targets/default (SMTPClient)¶TARGET DEFENITION
Target definition for: default
Key Default Value Description addressTARGET ADDRESS aliasALIAS hostTARGET HOST is template0 IS TEMPLATE parentdefault PARENT port0 TARGET PORT recipientnscp@localhost RECIPIENT sendernscp@localhost SENDER templateHello, this is %source% reporting %message%! TEMPLATE timeout30 TIMEOUT Sample:
# TARGET DEFENITION # Target definition for: default [/settings/SMTP/client/targets/default] address= alias= host= is template=0 parent=default port=0 recipient=nscp@localhost sender=nscp@localhost template=Hello, this is %source% reporting %message%! timeout=30
address(SMTPClient, /settings/SMTP/client/targets/default)¶TARGET ADDRESS
Target host addressPath: /settings/SMTP/client/targets/default
Key: address
Default value:
Used by:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # TARGET ADDRESS address=
alias(SMTPClient, /settings/SMTP/client/targets/default)¶ALIAS
The alias (service name) to report to serverAdvanced (means it is not commonly used)
Path: /settings/SMTP/client/targets/default
Key: alias
Default value:
Used by:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # ALIAS alias=
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:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # TARGET HOST host=
is template(SMTPClient, /settings/SMTP/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/SMTP/client/targets/default
Key: is template
Default value: 0
Used by:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # IS TEMPLATE is template=0
parent(SMTPClient, /settings/SMTP/client/targets/default)¶PARENT
The parent the target inherits fromAdvanced (means it is not commonly used)
Path: /settings/SMTP/client/targets/default
Key: parent
Default value: default
Used by:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # PARENT parent=default
port(SMTPClient, /settings/SMTP/client/targets/default)¶TARGET PORT
The target server portAdvanced (means it is not commonly used)
Path: /settings/SMTP/client/targets/default
Key: port
Default value: 0
Used by:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # TARGET PORT port=0
recipient(SMTPClient, /settings/SMTP/client/targets/default)¶RECIPIENT
Recipient of email messagePath: /settings/SMTP/client/targets/default
Key: recipient
Default value: nscp@localhost
Used by:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # RECIPIENT recipient=nscp@localhost
sender(SMTPClient, /settings/SMTP/client/targets/default)¶SENDER
Sender of email messagePath: /settings/SMTP/client/targets/default
Key: sender
Default value: nscp@localhost
Used by:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # SENDER sender=nscp@localhost
template(SMTPClient, /settings/SMTP/client/targets/default)¶TEMPLATE
Template for message dataPath: /settings/SMTP/client/targets/default
Key: template
Default value: Hello, this is %source% reporting %message%!
Used by:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # TEMPLATE template=Hello, this is %source% reporting %message%!
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:
SMTPClientSample:
[/settings/SMTP/client/targets/default] # TIMEOUT timeout=30