#include "dnxJobList.h"
#include <time.h>
Go to the source code of this file.
Defines | |
#define | DNX_DISPATH_PORT 12480 |
#define | DNX_COLLECT_PORT 12481 |
#define | DNX_TCP_LISTEN 5 |
Functions | |
char * | versionText (void) |
Format version text to an allocated string buffer. | |
int | dnxPostResult (void *data, time_t start_time, unsigned delta, int early_timeout, int res_code, char *res_data) |
Post a completed service request to the Nagios service result buffer. | |
void | dnxJobCleanup (DnxNewJob *pJob) |
Release all resources associated with a job object. | |
int | dnxAuditJob (DnxNewJob *pJob, char *action) |
Send an audit message to the dnx server audit log. |
Definition in file dnxNebMain.h.
#define DNX_COLLECT_PORT 12481 |
Definition at line 36 of file dnxNebMain.h.
#define DNX_DISPATH_PORT 12480 |
Definition at line 35 of file dnxNebMain.h.
#define DNX_TCP_LISTEN 5 |
Definition at line 37 of file dnxNebMain.h.
int dnxAuditJob | ( | DnxNewJob * | pJob, | |
char * | action | |||
) |
Send an audit message to the dnx server audit log.
[in] | pJob | - the job to be audited. |
[in] | action | - the audit action that we're logging. |
Definition at line 953 of file dnxServerMain.c.
References DnxNodeRequest::address, DnxNodeRequest::addrstr, DnxCfgData::auditFilePath, DnxServerCfg::auditFilePath, DnxNewJob::cmd, DNX_OK, dnxAudit(), DnxXID::objSerial, DnxXID::objSlot, DnxNewJob::pNode, DnxNodeRequest::xid, and DnxNewJob::xid.
Referenced by dnxCollector(), dnxDispatcher(), dnxPostNewJob(), and dnxTimer().
void dnxJobCleanup | ( | DnxNewJob * | pJob | ) |
Release all resources associated with a job object.
[in] | pJob | - the job to be freed. |
Definition at line 942 of file dnxServerMain.c.
References DnxNewJob::cmd, DnxNewJob::payload, DnxNewJob::pNode, and xfree.
Referenced by dnxCollector(), and dnxTimer().
int dnxPostResult | ( | void * | data, | |
time_t | start_time, | |||
unsigned | delta, | |||
int | early_timeout, | |||
int | res_code, | |||
char * | res_data | |||
) |
Post a completed service request to the Nagios service result buffer.
If early_timeout
is true (1), then res_code
will be reset to STATE_UNKNOWN, so you might as well pass zero for res_code
.
[in] | data | - An opaque pointer to the nagios service structure and other relevant results data. |
[in] | start_time | - the nagios service object start time. |
[in] | delta | - the running time of the nagios service object in seconds. |
[in] | early_timeout | - boolean; true means the job DID time out. |
[in] | res_code | - the result code of this job. |
[in] | res_data | - the resulting STDOUT output text of this job. |
Definition at line 746 of file dnxNebMain.c.
References DnxJobData::chkopts, dnxStatsInc(), POST_RESULTS_FAILED, POST_RESULTS_OK, DnxJobData::reschedule, RESULTS_FAILED, RESULTS_OK, RESULTS_TIMED_OUT, DnxJobData::schedule, and DnxJobData::svc.
char* versionText | ( | void | ) |
Format version text to an allocated string buffer.
Caller is responsible to free memory buffer returned.
Definition at line 836 of file dnxServerMain.c.
References DNX_DEFAULT_DBGLOG, DNX_DEFAULT_LOG, DNX_DEFAULT_SERVER_CONFIG_FILE, PACKAGE_BUGREPORT, s_progname, VERSION, versionText(), and xstrdup.