Skip to main content

Protocol SFTP

Pack Assets​

Templates​

The Centreon Pack SFTP brings a host template:

  • App-Protocol-Sftp-custom

It brings the following Service Templates:

Service AliasService TemplateDefaultDiscovery
ConnectionApp-Protocol-Sftp-ConnectionX
Files-CountApp-Protocol-Sftp-Files-Count
Files-DateApp-Protocol-Sftp-Files-Date
ScenarioApp-Protocol-Sftp-Scenario

Collected metrics & status​

Metric nameDescriptionUnit
connection statusConnection status
connection.time.secondsConnection time to established the sftp sessions

Prerequisites​

To monitor your SFTP server, you can use pubkey authentication and/or username authentication.

Setup​

  1. Install the Centreon package on every Centreon poller expected to monitor Protocol SFTP resources:
yum install centreon-plugin-Applications-Protocol-Sftp
  1. On the Centreon web interface, install the Protocol SFTP Centreon Pack on the Configuration > Monitoring Connector Manager page.

Configuration​

Host​

  • Log into Centreon and add a new host through Configuration > Hosts.
  • Fill the Name, Alias & IP Address / DNS fields according to your Protocol SFTP server settings.
  • Apply the App-Protocol-Sftp-custom template to the host.
  • Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
MandatoryNameDescription
PROTOCOLSFTPUSERNAMEsftp username
PROTOCOLSFTPPASSWORDsftp password
PROTOCOLSFTPEXTRAOPTIONSAny extra option you may want to add to the command (eg. a --verbose flag)

How to check in the CLI that the configuration is OK and what are the main options for?​

Once the plugin is installed, log into your Centreon poller's CLI using the centreon-engine user account (su - centreon-engine) and test the plugin by running the following command:

/usr/lib/centreon/plugins/centreon_protocol_sftp.pl \
--plugin=apps::protocols::sftp::plugin \
--mode=connection \
--hostname='10.0.0.1' \
--ssh-username='my-username' \
--ssh-password='my-password' \
--verbose

The expected command output is shown below:

OK: authentication succeeded - connection time: 1.372s | 'connection.time.seconds'=1.372s;;;0;

All available options for a given mode can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins/centreon_protocol_sftp.pl \
--plugin=apps::protocols::sftp::plugin \
--mode=connection \
--help

All available modes can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins/centreon_protocol_sftp.pl \
--plugin=apps::protocols::sftp::plugin \
--list-mode

Troubleshooting​

Please find the troubleshooting documentation for plugins in this chapter.