#include "dnxProtocol.h"
#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | DnxNewJob |
A structure to manage new jobs dispatched to nodes. More... | |
Functions | |
char * | versionText (void) |
Format version text to an allocated string buffer. | |
void | dnxReconfigure (void) |
Configuration changes have been made; reread the config file. | |
int | dnxPostResult (void *payload, unsigned long serial, 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 dnxServerMain.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.
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.
int dnxPostResult | ( | void * | payload, | |
unsigned long | serial, | |||
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] | payload | - An opaque pointer to the nagios service structure and other relevant results data. |
[in] | serial | - the job serial number. |
[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 881 of file dnxServerMain.c.
References DnxResultTransfer::delta, DNX_ERR_MEMORY, DNX_MSG_RESULT_TRANSFER, DNX_MSG_SIGNATURE, DNX_PLGFD, dnxDebug(), dnxStatsInc(), DnxResultTransfer::early_timeout, DnxResultTransfer::hdr, DnxMsgHeader::msgtype, DnxResultTransfer::payload, POST_RESULTS_FAILED, POST_RESULTS_OK, DnxResultTransfer::res_code, DnxResultTransfer::res_data, RESULTS_FAILED, RESULTS_OK, RESULTS_TIMED_OUT, DnxResultTransfer::serial, DnxMsgHeader::signature, DnxResultTransfer::start_time, DnxMsgHeader::structsz, xfree, and xmalloc.
void dnxReconfigure | ( | void | ) |
Configuration changes have been made; reread the config file.
Normally, this routine would be called by the signal handler, but we may do things in here that are not legal in a signal handlers. So instead this routine is called from the agent thread, and the signal handler merely notifies the agent that a reconfigure should be done.
Definition at line 863 of file dnxServerMain.c.
References copyCfgData(), dnxCfgParserParse(), dnxErrorString(), dnxLog(), freeCfgData(), and logGblConfigChanges().
Referenced by dnxAgentServer().
char* versionText | ( | void | ) |
Format version text to an allocated string buffer.
Caller is responsible to free memory buffer returned, using xfree.
Definition at line 836 of file dnxServerMain.c.