Beispiel #1
0
int wproc_run_service_job(int jtype, int timeout, service *svc, char *cmd, nagios_macros *mac)
{
	worker_job *job;
	wproc_object_job *oj;

	oj = create_object_job(NULL, svc->host_name, svc->description);
	job = create_job(jtype, oj, timeout, cmd);

	return wproc_run_job(job, mac);
}
Beispiel #2
0
int wproc_run_host_job(int jtype, int timeout, host *hst, char *cmd, nagios_macros *mac)
{
	worker_job *job;
	wproc_object_job *oj;

	oj = create_object_job(NULL, hst->name, NULL);
	job = create_job(jtype, oj, timeout, cmd);

	return wproc_run_job(job, mac);
}
Beispiel #3
0
int wproc_notify(char *cname, char *hname, char *sdesc, char *cmd, nagios_macros *mac)
{
	worker_job *job;
	wproc_object_job *oj;

	oj = create_object_job(cname, hname, sdesc);
	job = create_job(WPJOB_NOTIFY, oj, notification_timeout, cmd);

	return wproc_run_job(job, mac);
}
Beispiel #4
0
int wproc_run_host_job(int jtype, int timeout, host *hst, char *cmd, nagios_macros *mac)
{
	struct wproc_job *job;
	wproc_object_job *oj;

	if (!(oj = create_object_job(NULL, hst->name, NULL)))
		return ERROR;

	job = create_job(jtype, oj, timeout, cmd);

	return wproc_run_job(job, mac);
}