This commit is contained in:
Jamie Cameron
2017-05-13 15:13:43 -07:00
parent c031ac4b76
commit 60351e59c7
2 changed files with 26 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# fail2ban-monitor.pl
# Monitor the fail2ban server on this host
# Check to see if fail2ban is running
sub get_fail2ban_status
{
return { 'up' => -1 } if (!&foreign_check($_[1]));
&foreign_require($_[1], "fail2ban-lib.pl");
local %pconfig = &foreign_config($_[1]);
return { 'up' => -1 } if (&foreign_call($_[1], "check_fail2ban"));
if (&foreign_call($_[1], "is_fail2ban_running")) {
return { 'up' => 1 };
}
else {
return { 'up' => 0 };
}
}
sub parse_fail2ban_dialog
{
&depends_check($_[0], "fail2ban");
}
1;
+1
View File
@@ -33,6 +33,7 @@ type_sslcert=SSL Certificate
type_ftp=Remote FTP Service
type_sendmail=Sendmail Server
type_postfix=Postfix Server
type_fail2ban=Fail2Ban Server
type_ping=Remote Ping
type_proc=Check Process
type_mysql=MySQL Database Server