diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-10-06 06:58:01 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-10-06 06:58:01 +0000 |
| commit | 7dcfdbd9e8d6ade5db14a38df435f6a009581ade (patch) | |
| tree | 0a2783abc155aa9d10e134e94ad163077d711dc9 /include | |
| parent | 830d850cfba9154d3d745eca095860c8d11a6665 (diff) | |
| download | zabbix-7dcfdbd9e8d6ade5db14a38df435f6a009581ade.tar.gz zabbix-7dcfdbd9e8d6ade5db14a38df435f6a009581ade.tar.xz zabbix-7dcfdbd9e8d6ade5db14a38df435f6a009581ade.zip | |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@2117 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
| -rw-r--r-- | include/db.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/include/db.h b/include/db.h index 5c61ab49..c0a9af51 100644 --- a/include/db.h +++ b/include/db.h @@ -58,6 +58,7 @@ extern int CONFIG_DBPORT; #define DB_MEDIATYPE struct mediatype_type #define DB_ESCALATION_RULE struct escalation_rule_type #define DB_ESCALATION_LOG struct escalation_log_type +#define DB_GRAPH struct graph_type #define DB_GRAPH_ITEM struct graph_item_type #ifdef HAVE_MYSQL @@ -96,9 +97,18 @@ extern int CONFIG_DBPORT; #define HOST_ERROR_LEN 128 #define HOST_ERROR_LEN_MAX HOST_ERROR_LEN+1 +#define ITEM_KEY_LEN 64 +#define ITEM_KEY_LEN_MAX ITEM_KEY_LEN+1 + +#define GRAPH_NAME_LEN 128 +#define GRAPH_NAME_LEN_MAX GRAPH_NAME_LEN+1 + #define GRAPH_ITEM_COLOR_LEN 32 #define GRAPH_ITEM_COLOR_LEN_MAX GRAPH_ITEM_COLOR_LEN+1 +#define ACTION_SUBJECT_LEN 255 +#define ACTION_SUBJECT_LEN_MAX ACTION_SUBJECT_LEN+1 + DB_HOST { int hostid; @@ -113,6 +123,17 @@ DB_HOST int available; }; +DB_GRAPH +{ + int graphid; + char name[GRAPH_NAME_LEN_MAX]; + int width; + int height; + int yaxistype; + double yaxismin; + double yaxismax; +}; + DB_GRAPH_ITEM { int gitemid; @@ -130,7 +151,7 @@ DB_ITEM int type; int status; char *description; - char *key; + char key[ITEM_KEY_LEN_MAX]; char *host; int host_status; int host_available; @@ -234,7 +255,7 @@ DB_ACTION int delay; int lastcheck; int recipient; - char subject[MAX_STRING_LEN]; + char subject[ACTION_SUBJECT_LEN_MAX]; char message[MAX_STRING_LEN]; }; @@ -315,5 +336,12 @@ void DBget_item_from_db(DB_ITEM *item,DB_RESULT *result, int row); int DBadd_new_host(char *server, int port, int status, int useip, char *ip, int disable_until, int available); int DBhost_exists(char *server); +int DBget_item_by_itemid(int itemid,DB_ITEM *item); + int DBget_trigger_by_triggerid(int triggerid,DB_TRIGGER *trigger); + +int DBadd_graph(char *name, int width, int height, int yaxistype, double yaxismin, double yaxismax); +int DBget_graph_item_by_gitemid(int gitemid, DB_GRAPH_ITEM *graph_item); +int DBget_graph_by_graphid(int graphid, DB_GRAPH *graph); +int DBadd_graph_item_to_linked_hosts(int gitemid,int hostid); #endif |
