summaryrefslogtreecommitdiffstats
path: root/lib/methods/pluginchecktask.hpp
blob: a4fc3a3850d048e009977caf7b5977e222fd3745 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */

#ifndef PLUGINCHECKTASK_H
#define PLUGINCHECKTASK_H

#include "methods/i2-methods.hpp"
#include "base/process.hpp"
#include "icinga/service.hpp"

namespace icinga
{

/**
 * Implements service checks based on external plugins.
 *
 * @ingroup methods
 */
class PluginCheckTask
{
public:
	static void ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr,
		const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);

private:
	PluginCheckTask();

	static void ProcessFinishedHandler(const Checkable::Ptr& service,
		const CheckResult::Ptr& cr, const Value& commandLine, const ProcessResult& pr);
};

}

#endif /* PLUGINCHECKTASK_H */