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
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  

Queries

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

smtp_submit

SMTPClientsmtp_submit
Submit information to remote host via SMTP.

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 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.

Arguments

help (SMTPClient, smtp_submit)
Show help screen (this screen)
help-pb (SMTPClient, smtp_submit)
Show help screen as a protocol buffer payload
show-default (SMTPClient, smtp_submit)
Show default values for a given command
help-short (SMTPClient, smtp_submit)
Show help screen (short format).
host (SMTPClient, smtp_submit)
The host of the host running the server
port (SMTPClient, smtp_submit)
The port of the host running the server
address (SMTPClient, smtp_submit)
The address (host:port) of the host running the server
timeout (SMTPClient, smtp_submit)
Number of seconds before connection times out (default=10)
target (SMTPClient, smtp_submit)
Target to use (lookup connection info from config)
retry (SMTPClient, smtp_submit)
Number of times ti retry a failed connection attempt (default=2)
command (SMTPClient, smtp_submit)
The name of the command that the remote daemon should run
alias (SMTPClient, smtp_submit)
Same as command
message (SMTPClient, smtp_submit)
Message
result (SMTPClient, smtp_submit)
Result code either a number or OK, WARN, CRIT, UNKNOWN
sender (SMTPClient, smtp_submit)
Length of payload (has to be same as on the server)
recipient (SMTPClient, smtp_submit)
Length of payload (has to be same as on the server)
template (SMTPClient, smtp_submit)
Do not initial an ssl handshake with the server, talk in plaintext.

/ 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 DEFENITION

Target definition for: default
Key Default Value Description
address   TARGET ADDRESS
alias   ALIAS
host   TARGET HOST
is template 0 IS TEMPLATE
parent default PARENT
port 0 TARGET PORT
recipient nscp@localhost RECIPIENT
sender nscp@localhost SENDER
template Hello, this is %source% reporting %message%! TEMPLATE
timeout 30 TIMEOUT

Sample:

# TARGET DEFENITION
# Target definition for: default
[/settings/SMTP/client/targets/default]
address=
alias=
host=
is template=0
parent=default
port=0
[email protected]
[email protected]
template=Hello, this is %source% reporting %message%!
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=
alias (SMTPClient, /settings/SMTP/client/targets/default)

ALIAS

The alias (service name) to report to server

Advanced (means it is not commonly used)

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

Key: alias

Default value:

Used by: SMTPClient

Sample:

[/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: SMTPClient

Sample:

[/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: SMTPClient

Sample:

[/settings/SMTP/client/targets/default]
# IS TEMPLATE
is template=0
parent (SMTPClient, /settings/SMTP/client/targets/default)

PARENT

The parent the target inherits from

Advanced (means it is not commonly used)

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

Key: parent

Default value: default

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/default]
# PARENT
parent=default
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: 0

Used by: SMTPClient

Sample:

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

RECIPIENT

Recipient of email message

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

Key: recipient

Default value: nscp@localhost

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/default]
# RECIPIENT
[email protected]
sender (SMTPClient, /settings/SMTP/client/targets/default)

SENDER

Sender of email message

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

Key: sender

Default value: nscp@localhost

Used by: SMTPClient

Sample:

[/settings/SMTP/client/targets/default]
# SENDER
[email protected]
template (SMTPClient, /settings/SMTP/client/targets/default)

TEMPLATE

Template for message data

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

Key: template

Default value: Hello, this is %source% reporting %message%!

Used by: SMTPClient

Sample:

[/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: SMTPClient

Sample:

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