monitoring/commands: Add (ENABLE|DISABLE)_FLAP_DETECTION commands

`ToggleFlapDetection' is the command object for enabling/disabling host and service flap detection on an Icinga instance.

refs #6593
This commit is contained in:
Eric Lippmann 2014-09-01 15:08:01 +02:00
parent 010c5b45ba
commit 5474c661e1
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<?php
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Module\Monitoring\Command\Instance;
use Icinga\Module\Monitoring\Command\Common\ToggleFeature;
/**
* Enable/disable host and service flap detection on an Icinga instance
*/
class ToggleFlapDetection extends ToggleFeature
{
/**
* (non-PHPDoc)
* @see \Icinga\Module\Monitoring\Command\IcingaCommand::getCommandString() For the method documentation.
*/
public function getCommandString()
{
return $this->enable === true ? 'ENABLE_FLAP_DETECTION' : 'DISABLE_FLAP_DETECTION';
}
}