593 |
} |
} |
594 |
; |
; |
595 |
|
|
596 |
alert : alertmail '{' alertoptionlist '}' formatlist { |
alert : alertmail '{' eventoptionlist '}' formatlist { |
597 |
addmail($<string>1, &mailset, eventset); |
addmail($<string>1, &mailset, eventset); |
598 |
} |
} |
599 |
| alertmail formatlist { |
| alertmail formatlist { |
605 |
| ALERT STRING { $<string>$= append_hostname($2); } |
| ALERT STRING { $<string>$= append_hostname($2); } |
606 |
; |
; |
607 |
|
|
608 |
alertoptionlist : alertoption |
eventoptionlist : eventoption |
609 |
| alertoptionlist alertoption |
| eventoptionlist eventoption |
610 |
; |
; |
611 |
|
|
612 |
alertoption : START { eventset |= EVENT_START; } |
eventoption : START { eventset |= EVENT_START; } |
613 |
| STOP { eventset |= EVENT_STOP; } |
| STOP { eventset |= EVENT_STOP; } |
614 |
| RESTART { eventset |= EVENT_RESTART; } |
| RESTART { eventset |= EVENT_RESTART; } |
615 |
| CHECKSUM { eventset |= EVENT_CHECKSUM; } |
| CHECKSUM { eventset |= EVENT_CHECKSUM; } |
784 |
; |
; |
785 |
|
|
786 |
space : SPACE operator value unit action { |
space : SPACE operator value unit action { |
787 |
|
DeviceInfo_T di; |
788 |
DeviceInfo_T di= NEW(di); |
NEW(di); |
|
|
|
789 |
DeviceInfo_Usage(di, current->path); |
DeviceInfo_Usage(di, current->path); |
|
|
|
790 |
deviceset.resource= RESOURCE_ID_SPACE; |
deviceset.resource= RESOURCE_ID_SPACE; |
791 |
deviceset.operator= $<number>2; |
deviceset.operator= $<number>2; |
792 |
deviceset.limit_absolute= (int)((float)$<real>3 / |
deviceset.limit_absolute= (int)((float)$<real>3 / |
793 |
(float)di->f_bsize * |
(float)di->f_bsize * |
794 |
(float)$<number>4 ); |
(float)$<number>4 ); |
795 |
deviceset.action= $<number>5; |
deviceset.action= $<number>5; |
|
|
|
796 |
free(di); |
free(di); |
797 |
|
|
798 |
} |
} |
981 |
*/ |
*/ |
982 |
static void adddependant(char *dependant) { |
static void adddependant(char *dependant) { |
983 |
|
|
984 |
Dependant_T d= NEW(d); |
Dependant_T d; |
985 |
|
|
986 |
ASSERT(dependant); |
ASSERT(dependant); |
987 |
|
|
988 |
|
NEW(d); |
989 |
|
|
990 |
if (current->dependantlist != NULL) { |
if (current->dependantlist != NULL) { |
991 |
d->next= current->dependantlist; |
d->next= current->dependantlist; |
992 |
} |
} |
1003 |
*/ |
*/ |
1004 |
static void addchecksum(char *filename, char *sum) { |
static void addchecksum(char *filename, char *sum) { |
1005 |
|
|
1006 |
Checksum_T c= NEW(c); |
Checksum_T c; |
1007 |
|
|
1008 |
ASSERT(filename); |
ASSERT(filename); |
1009 |
|
|
1010 |
|
NEW(c); |
1011 |
c->file= filename; |
c->file= filename; |
1012 |
|
|
1013 |
if(sum) { |
if(sum) { |
1042 |
*/ |
*/ |
1043 |
static void addmail(char *mailto, Mail_T f, unsigned int events) { |
static void addmail(char *mailto, Mail_T f, unsigned int events) { |
1044 |
|
|
1045 |
Mail_T m= NEW(m); |
Mail_T m; |
1046 |
|
|
1047 |
ASSERT(mailto); |
ASSERT(mailto); |
1048 |
|
|
1049 |
|
NEW(m); |
1050 |
if(events != EVENT_NULL) { |
if(events != EVENT_NULL) { |
1051 |
m->events= events; |
m->events= events; |
1052 |
} else { |
} else { |
1072 |
*/ |
*/ |
1073 |
static void addport(struct PortSet *pp) { |
static void addport(struct PortSet *pp) { |
1074 |
|
|
1075 |
|
Port_T p; |
1076 |
char address[STRLEN]; |
char address[STRLEN]; |
|
Port_T p= NEW(p); |
|
1077 |
|
|
1078 |
ASSERT(pp); |
ASSERT(pp); |
1079 |
|
|
1080 |
|
NEW(p); |
1081 |
p->socket= pp->socket; |
p->socket= pp->socket; |
1082 |
p->hostname= pp->hostname; |
p->hostname= pp->hostname; |
1083 |
p->port= pp->port; |
p->port= pp->port; |
1136 |
*/ |
*/ |
1137 |
static void addresource(struct ResourceSet *rr) { |
static void addresource(struct ResourceSet *rr) { |
1138 |
|
|
1139 |
Resource_T r= NEW(r); |
Resource_T r; |
1140 |
|
|
1141 |
ASSERT(rr); |
ASSERT(rr); |
1142 |
|
|
1143 |
|
NEW(r); |
1144 |
if(! Run.doprocess) { |
if(! Run.doprocess) { |
1145 |
|
|
1146 |
log("%s: Cannot activate service check at line %d\n" |
log("%s: Cannot activate service check at line %d\n" |
1178 |
*/ |
*/ |
1179 |
static void addtimestamp(struct TimestampSet *ts) { |
static void addtimestamp(struct TimestampSet *ts) { |
1180 |
|
|
1181 |
Timestamp_T t= NEW(t); |
Timestamp_T t; |
1182 |
|
|
1183 |
ASSERT(ts); |
ASSERT(ts); |
1184 |
|
|
1185 |
|
NEW(t); |
1186 |
t->pathname= ts->pathname; |
t->pathname= ts->pathname; |
1187 |
t->operator= ts->operator; |
t->operator= ts->operator; |
1188 |
t->time= ts->time; |
t->time= ts->time; |
1201 |
*/ |
*/ |
1202 |
static void adddevice(struct DeviceSet *ds) { |
static void adddevice(struct DeviceSet *ds) { |
1203 |
|
|
1204 |
Device_T d= NEW(d); |
Device_T d; |
1205 |
|
|
1206 |
ASSERT(ds); |
ASSERT(ds); |
1207 |
|
|
1208 |
|
NEW(d); |
1209 |
d->resource= ds->resource; |
d->resource= ds->resource; |
1210 |
d->operator= ds->operator; |
d->operator= ds->operator; |
1211 |
d->limit_absolute= ds->limit_absolute; |
d->limit_absolute= ds->limit_absolute; |
1225 |
*/ |
*/ |
1226 |
static void createinfo() { |
static void createinfo() { |
1227 |
|
|
1228 |
DeviceInfo_T di= NEW(di); |
ProcInfo_T pi; |
1229 |
ProcInfo_T pi= NEW(pi); |
DeviceInfo_T di; |
1230 |
|
|
1231 |
|
NEW(di); |
1232 |
|
NEW(pi); |
1233 |
current->devinfo=di; |
current->devinfo=di; |
1234 |
current->procinfo=pi; |
current->procinfo=pi; |
1235 |
|
|