Class: Cloud66::Commands::Fail2ban
- Inherits:
-
Object
- Object
- Cloud66::Commands::Fail2ban
- Defined in:
- lib/cloud66_agent/commands/fail2ban.rb
Class Method Summary collapse
Class Method Details
.perform(is_banned, ip_address, attack, port) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/cloud66_agent/commands/fail2ban.rb', line 6 def self.perform(is_banned, ip_address, attack, port) data = { is_banned: is_banned, ip_address: ip_address, attack: attack, port: port } Utils::Server.send_fail2ban(data) rescue => exc $logger.error "Command \"fail2ban\" failed: #{exc.}" exit -1 end |