diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-08-24 07:26:15 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-08-24 07:26:15 +0000 |
| commit | f1a5c13a6d8cb10e69878c6cfa48ef66e005a482 (patch) | |
| tree | 5e5436610f85b03fd3cec24287f75ff6d4ab07c4 /include | |
| parent | 560e22e2931420fc9a803feb60b87549f4e8402a (diff) | |
- new hos status: 'deleted' (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@937 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
| -rw-r--r-- | include/common.h | 1 | ||||
| -rw-r--r-- | include/db.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h index 0605f620..0e638186 100644 --- a/include/common.h +++ b/include/common.h @@ -67,6 +67,7 @@ #define HOST_STATUS_NOT_MONITORED 1 #define HOST_STATUS_UNREACHABLE 2 #define HOST_STATUS_TEMPLATE 3 +#define HOST_STATUS_DELETED 4 /* Use host IP or host name */ #define HOST_USE_HOSTNAME 0 diff --git a/include/db.c b/include/db.c index 1f170a8c..78450151 100644 --- a/include/db.c +++ b/include/db.c @@ -535,7 +535,7 @@ void DBupdate_triggers_status_after_restart(void) now=time(NULL); - sprintf(sql,"select distinct t.triggerid from hosts h,items i,triggers t,functions f where f.triggerid=t.triggerid and f.itemid=i.itemid and h.hostid=i.hostid and i.nextcheck+i.delay<%d and i.key_<>'%s' and h.status<>%d",now,SERVER_STATUS_KEY, HOST_STATUS_TEMPLATE); + sprintf(sql,"select distinct t.triggerid from hosts h,items i,triggers t,functions f where f.triggerid=t.triggerid and f.itemid=i.itemid and h.hostid=i.hostid and i.nextcheck+i.delay<%d and i.key_<>'%s' and h.status not in (%d,%d)",now,SERVER_STATUS_KEY, HOST_STATUS_DELETED, HOST_STATUS_TEMPLATE); zabbix_log(LOG_LEVEL_DEBUG,"SQL [%s]",sql); result = DBselect(sql); |
