icinga2/lib/methods/pluginchecktask.hpp

34 lines
764 B
C++
Raw Permalink Normal View History

/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
#ifndef PLUGINCHECKTASK_H
#define PLUGINCHECKTASK_H
2014-05-25 10:23:35 -04:00
#include "methods/i2-methods.hpp"
#include "base/process.hpp"
#include "icinga/service.hpp"
2013-03-16 16:18:53 -04:00
namespace icinga
{
2012-09-17 07:35:55 -04:00
/**
* Implements service checks based on external plugins.
2012-09-17 07:35:55 -04:00
*
* @ingroup methods
2012-09-17 07:35:55 -04:00
*/
2017-12-31 01:22:16 -05:00
class PluginCheckTask
{
public:
static void ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr,
const WaitGroup::Ptr& producer, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
private:
PluginCheckTask();
static void ProcessFinishedHandler(const Checkable::Ptr& service, const CheckResult::Ptr& cr,
const WaitGroup::Ptr& producer, const Value& commandLine, const ProcessResult& pr);
};
}
#endif /* PLUGINCHECKTASK_H */