#include "model.h"
#include "model_pstmt.h"
#include "logfilehandler.h"
Defines | |
| #define | AWARELOG_NODENAME "AwareLog" |
| #define | AWMODEL_PSTMT_INIT |
| #define | DDL "sysmodel.ddl" |
| #define | LOGWATCH(index, expr) |
| #define | MODEL_DISCOVERY_LOGILE "discovery.log" |
| #define | MODEL_LOG_DIR "log" |
| #define | MODEL_MKDIR(path) |
| #define | MODEL_RRD_DIR "rrd" |
| #define | MODEL_SQLITE_DATAFILE "smm.sqlite" |
Functions | |
| void | aw_model_close (aw_model_t *model) |
| Closes connection to the model database and frees resources. | |
| int32_t | aw_model_execute_stmt (aw_model_t *model, aw_model_stmt_t *stmt) |
| Execute compiled sql statment. | |
| void | aw_model_finalize_stmt (aw_model_t *model, aw_model_stmt_t *stmt) |
| Free compiled sql statment. | |
| int32_t | aw_model_open (const byte_t *db, aw_monitor_t *mon, const aw_model_options_t *options, aw_model_t *model) |
| Opens a connection to the model database, creates a new database if there is not one currently. Associates monitor with model. | |
| void | aw_model_reset_stmt (aw_model_t *model, aw_model_stmt_t *stmt) |
| Reset compiled sql statment. | |
|
|
|
|
|
|
|
|
|
|
|
Value: strcpy(regexs[index].events.match.source, nodename); \
regexs[index].events.match.id = model->sysmon.net.event_addr.message_event; \
regexs[index].regex = expr ; \
regexs[index].subst = NULL; \
|
|
|
|
|
|
|
|
|
Value: if ( mkdir(path, omode) == -1 ) { \ aw_log(&(model->mon->logger), AW_ERROR_LOG_LEVEL, "model: Error on init creating dir %s (%s) ", \ model->dirs.root, strerror(errno)); \ goto error; \ }/* end if */ \ |
|
|
|
|
|
|
|
|
Closes connection to the model database and frees resources. aw_model_close
|
|
||||||||||||
|
Execute compiled sql statment. aw_model_execute_stmt
|
|
||||||||||||
|
Free compiled sql statment. aw_model_finalize_stmt
|
|
||||||||||||||||||||
|
Opens a connection to the model database, creates a new database if there is not one currently. Associates monitor with model. aw_model_open
|
|
||||||||||||
|
Reset compiled sql statment. aw_model_reset_stmt
|