Nagios-plugin for Hetzner FTP-Space


The robot of Hetzner`s, but I would monitor the utilization of the

backup space with Nagios.

My plugin for nagios requieres sftp for the ftp-server access. The setup for sftp ist documented very well here.

The plugin is very quick&dirty and doesn´t match the requirements for nagios completly, but it works very well. The values for warn and crit are defined direct in the script und sftp must be available within the script.

Setting up nagios ist very simple:


define host{
use remote-server
host_name u4711.your-backup.de
alias Backup idefix
}
define command{
command_name check_ftpspace
command_line sudo $USER1$/check_ftpspace $ARG1$
}
define service{
use local-service-graph
host_name u4711.your-backup.de
service_description Backup-Space idefix
check_command check_ftpspace!u4711
notifications_enabled 1
}

$USER1$ is the libexec-dir.
Sudo is only needed, if the script-user can´t connect via sftp to the backup-space.
host_name und check_command must set to your config.

Example: /usr/local/nagios/libexec/check_ftpspace u4711

WARN: 92.2GB/100GB used (92%)|USED=92.2;92.00;97.00

aus.

check_ftpspace

Leave a comment

Your email address will not be published. Required fields are marked *