mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Update test check output.
This commit is contained in:
parent
50d506dfd7
commit
eb20b7e33e
@ -28,8 +28,16 @@ REGISTER_SCRIPTFUNCTION(NullCheck, &NullCheckTask::ScriptFunc);
|
|||||||
|
|
||||||
Dictionary::Ptr NullCheckTask::ScriptFunc(const Service::Ptr&)
|
Dictionary::Ptr NullCheckTask::ScriptFunc(const Service::Ptr&)
|
||||||
{
|
{
|
||||||
|
char name[255];
|
||||||
|
|
||||||
|
if (gethostname(name, sizeof(name)) < 0)
|
||||||
|
strcpy(name, "<unknown host>");
|
||||||
|
|
||||||
|
String output = "Hello from ";
|
||||||
|
output += name;
|
||||||
|
|
||||||
Dictionary::Ptr cr = boost::make_shared<Dictionary>();
|
Dictionary::Ptr cr = boost::make_shared<Dictionary>();
|
||||||
cr->Set("output", "This is a test.");
|
cr->Set("output", output);
|
||||||
cr->Set("state", StateOK);
|
cr->Set("state", StateOK);
|
||||||
|
|
||||||
return cr;
|
return cr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user