Enable online modification of monitors

The monitor parameters can now be changed via maxadmin. These changes are
not persisted to disk yet.
This commit is contained in:
Markus Makela
2016-11-10 10:22:45 +02:00
parent 35d2959395
commit 4b82f83637
3 changed files with 95 additions and 7 deletions

View File

@ -137,6 +137,9 @@ typedef enum
#define MONITOR_INTERVAL 10000 // in milliseconds
#define MONITOR_DEFAULT_ID 1UL // unsigned long value
#define MAX_MONITOR_USER_LEN 512
#define MAX_MONITOR_PASSWORD_LEN 512
/*
* Create declarations of the enum for monitor events and also the array of
* structs containing the matching names. The data is taken from def_monitor_event.h
@ -177,8 +180,8 @@ typedef struct monitor_servers
struct monitor
{
char *name; /**< The name of the monitor module */
char *user; /*< Monitor username */
char *password; /*< Monitor password */
char user[MAX_MONITOR_USER_LEN]; /*< Monitor username */
char password[MAX_MONITOR_PASSWORD_LEN]; /*< Monitor password */
SPINLOCK lock;
CONFIG_PARAMETER* parameters; /*< configuration parameters */
MONITOR_SERVERS* databases; /*< List of databases the monitor monitors */