Changeset 6209
- Timestamp:
- 08/20/08 17:31:11 (5 months ago)
- Location:
- trunk/centstorage
- Files:
-
- 21 added
- 22 modified
-
Makefile (modified) (2 diffs)
-
Makefile.am (modified) (1 diff)
-
Makefile.in (modified) (1 diff)
-
config.status (modified) (7 diffs)
-
configure (modified) (7 diffs)
-
configure.in (modified) (5 diffs)
-
includes/centstorage.h (modified) (3 diffs)
-
includes/config.h (modified) (1 diff)
-
lib/libmd5/Makefile (modified) (1 diff)
-
modules/purge (added)
-
modules/purge/Makefile (added)
-
modules/purge/Makefile.am (added)
-
modules/purge/Makefile.in (added)
-
modules/purge/purge.c (added)
-
modules/purge/purge.h (added)
-
modules/rebuild (added)
-
modules/rebuild/Makefile (added)
-
modules/rebuild/Makefile.am (added)
-
modules/rebuild/Makefile.in (added)
-
modules/rebuild/rebuild.c (added)
-
modules/rebuild/rebuild.h (added)
-
modules/recup_perf_datas/Makefile (modified) (2 diffs)
-
modules/recup_perf_datas/Makefile.am (modified) (1 diff)
-
modules/recup_perf_datas/Makefile.in (modified) (1 diff)
-
modules/recup_perf_datas/connection_SSL.c (modified) (1 diff)
-
modules/recup_perf_datas/insertValInDataBase.c (modified) (3 diffs)
-
modules/recup_perf_datas/insertValInDataBase.h (modified) (4 diffs)
-
modules/recup_perf_datas_client/Makefile (modified) (1 diff)
-
modules/recup_perf_datas_client/clientConf.c (modified) (4 diffs)
-
modules/recup_perf_datas_client/parseFile.c (modified) (4 diffs)
-
modules/sync (added)
-
modules/sync/Makefile (added)
-
modules/sync/Makefile.am (added)
-
modules/sync/Makefile.in (added)
-
modules/sync/sync.c (added)
-
modules/sync/sync.h (added)
-
oci (added)
-
oci/usr (added)
-
src/Conf.c (modified) (24 diffs)
-
src/Makefile (modified) (1 diff)
-
src/centstorage.c (modified) (2 diffs)
-
src/runCentStorage.c (modified) (1 diff)
-
usr (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centstorage/Makefile
r6171 r6209 101 101 CC = gcc 102 102 CCDEPMODE = depmode=gcc3 103 CFLAGS = -I/usr/include/o ci/ -I/usr/include/openssl -I/usr/include103 CFLAGS = -I/usr/include/openssl -I/usr/include 104 104 CPP = gcc -E 105 CPPFLAGS = -I/usr/include/oci/105 CPPFLAGS = 106 106 CYGPATH_W = echo 107 107 DBLDFLAGS = -L/usr/lib/mysql 108 DBLIBS = -lmysqlclient -lpq -lnnz11 -lclntsh -locijdbc11 -lm108 DBLIBS = -lmysqlclient -lpq 109 109 DEFS = -DHAVE_CONFIG_H 110 110 DEPDIR = .deps … … 195 195 top_srcdir = . 196 196 EXTRA_DIST = reconf configure CentStorage.conf CentStorageCtl CentStorage.pid 197 SUBDIRS = src lib/libmd5 includes modules/recup_perf_datas \ 198 modules/recup_perf_datas_client 197 SUBDIRS = src \ 198 lib/libmd5 \ 199 includes \ 200 modules/recup_perf_datas \ 201 modules/recup_perf_datas_client \ 202 modules/purge \ 203 modules/rebuild \ 204 modules/sync 199 205 200 206 all: all-recursive -
trunk/centstorage/Makefile.am
r5739 r6209 22 22 EXTRA_DIST = reconf configure CentStorage.conf CentStorageCtl CentStorage.pid 23 23 24 SUBDIRS = src lib/libmd5 includes modules/recup_perf_datas \ 25 modules/recup_perf_datas_client 24 SUBDIRS = src \ 25 lib/libmd5 \ 26 includes \ 27 modules/recup_perf_datas \ 28 modules/recup_perf_datas_client \ 29 modules/purge \ 30 modules/rebuild \ 31 modules/sync -
trunk/centstorage/Makefile.in
r5925 r6209 195 195 top_srcdir = @top_srcdir@ 196 196 EXTRA_DIST = reconf configure CentStorage.conf CentStorageCtl CentStorage.pid 197 SUBDIRS = src lib/libmd5 includes modules/recup_perf_datas \ 198 modules/recup_perf_datas_client 197 SUBDIRS = src \ 198 lib/libmd5 \ 199 includes \ 200 modules/recup_perf_datas \ 201 modules/recup_perf_datas_client \ 202 modules/purge \ 203 modules/rebuild \ 204 modules/sync 199 205 200 206 all: all-recursive -
trunk/centstorage/config.status
r6122 r6209 302 302 303 303 # Files that config.status was made for. 304 config_files=" Makefile src/Makefile lib/libmd5/Makefile modules/recup_perf_datas/Makefile modules/re cup_perf_datas_client/Makefile"304 config_files=" Makefile src/Makefile lib/libmd5/Makefile modules/recup_perf_datas/Makefile modules/rebuild/Makefile modules/sync/Makefile modules/purge/Makefile modules/recup_perf_datas_client/Makefile" 305 305 config_headers=" includes/config.h" 306 306 config_commands=" depfiles" … … 336 336 config.status 337 337 configured by ./configure, generated by GNU Autoconf 2.61, 338 with options \" '--with-oracle-inc=/usr/include/oci/'\"338 with options \"\" 339 339 340 340 Copyright (C) 2006 Free Software Foundation, Inc. … … 411 411 412 412 if $ac_cs_recheck; then 413 echo "running CONFIG_SHELL=/bin/bash /bin/bash ./configure " '--with-oracle-inc=/usr/include/oci/'$ac_configure_extra_args " --no-create --no-recursion" >&6413 echo "running CONFIG_SHELL=/bin/bash /bin/bash ./configure " $ac_configure_extra_args " --no-create --no-recursion" >&6 414 414 CONFIG_SHELL=/bin/bash 415 415 export CONFIG_SHELL 416 exec /bin/bash "./configure" '--with-oracle-inc=/usr/include/oci/'$ac_configure_extra_args --no-create --no-recursion416 exec /bin/bash "./configure" $ac_configure_extra_args --no-create --no-recursion 417 417 fi 418 418 … … 442 442 "lib/libmd5/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libmd5/Makefile" ;; 443 443 "modules/recup_perf_datas/Makefile") CONFIG_FILES="$CONFIG_FILES modules/recup_perf_datas/Makefile" ;; 444 "modules/rebuild/Makefile") CONFIG_FILES="$CONFIG_FILES modules/rebuild/Makefile" ;; 445 "modules/sync/Makefile") CONFIG_FILES="$CONFIG_FILES modules/sync/Makefile" ;; 446 "modules/purge/Makefile") CONFIG_FILES="$CONFIG_FILES modules/purge/Makefile" ;; 444 447 "modules/recup_perf_datas_client/Makefile") CONFIG_FILES="$CONFIG_FILES modules/recup_perf_datas_client/Makefile" ;; 445 448 … … 571 574 s,@host_os@,|#_!!_#|linux-gnu,g 572 575 s,@CC@,|#_!!_#|gcc,g 573 s,@CFLAGS@,|#_!!_#| -I/usr/include/o ci/ -I/usr/include/openssl -I/usr/include,g576 s,@CFLAGS@,|#_!!_#| -I/usr/include/openssl -I/usr/include,g 574 577 s,@LDFLAGS@,|#_!!_#| -L/usr/lib/mysql -L/usr/lib,g 575 s,@CPPFLAGS@,|#_!!_#| -I/usr/include/oci/,g578 s,@CPPFLAGS@,|#_!!_#|,g 576 579 s,@ac_ct_CC@,|#_!!_#|gcc,g 577 580 s,@EXEEXT@,|#_!!_#|,g … … 594 597 s,@XML_HEADER@,|#_!!_#|-I/usr/include/libxml,g 595 598 s,@HAVE_SSL@,|#_!!_#|,g 596 s,@DBLIBS@,|#_!!_#| -lmysqlclient -lpq -lnnz11 -lclntsh -locijdbc11 -lm,g599 s,@DBLIBS@,|#_!!_#| -lmysqlclient -lpq,g 597 600 s,@DBLDFLAGS@,|#_!!_#| -L/usr/lib/mysql,g 598 601 s,@LIBOBJS@,|#_!!_#|,g … … 891 894 s,^\([ #]*\)[^ ]*\([ ]*USE_MYSQL\)[ (].*,\1define\2 1 , 892 895 s,^\([ #]*\)[^ ]*\([ ]*USE_PGSQL\)[ (].*,\1define\2 1 , 893 s,^\([ #]*\)[^ ]*\([ ]*USE_ORACLE\)[ (].*,\1define\2 ,894 896 s,^\([ #]*\)[^ ]*\([ ]*HAVE_SSL\)[ (].*,\1define\2 1 , 895 897 s/ $// -
trunk/centstorage/configure
r6185 r6209 1739 1739 ac_compiler_gnu=$ac_cv_c_compiler_gnu 1740 1740 1741 ac_config_headers="$ac_config_headers includes/config.h" 1741 1742 ac_config_headers="$ac_config_headers includes/config.h" 1742 1743 1743 1744 … … 2221 2222 2222 2223 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' 2223 2224 2225 2226 2224 2227 2225 … … 5822 5820 5823 5821 ORACLELIBFOUND=no 5824 5825 { echo "$as_me:$LINENO: checking for ocierr in -lclntsh" >&5 5822 { echo "$as_me:$LINENO: checking for ocierr in -lclntsh" >&5 5826 5823 echo $ECHO_N "checking for ocierr in -lclntsh... $ECHO_C" >&6; } 5827 5824 if test "${ac_cv_lib_clntsh_ocierr+set}" = set; then … … 5889 5886 ORACLELIBFOUND=no 5890 5887 fi 5891 5892 5888 5893 5889 if test x$ORACLELIBFOUND = xno; then … … 6073 6069 fi 6074 6070 fi 6075 6076 6077 6071 6078 6072 # Check whether --enable-ssl was given. … … 6202 6196 6203 6197 6204 ac_config_files="$ac_config_files Makefile src/Makefile lib/libmd5/Makefile modules/recup_perf_datas/Makefile modules/re cup_perf_datas_client/Makefile"6198 ac_config_files="$ac_config_files Makefile src/Makefile lib/libmd5/Makefile modules/recup_perf_datas/Makefile modules/rebuild/Makefile modules/sync/Makefile modules/purge/Makefile modules/recup_perf_datas_client/Makefile" 6205 6199 6206 6200 … … 6715 6709 "lib/libmd5/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libmd5/Makefile" ;; 6716 6710 "modules/recup_perf_datas/Makefile") CONFIG_FILES="$CONFIG_FILES modules/recup_perf_datas/Makefile" ;; 6711 "modules/rebuild/Makefile") CONFIG_FILES="$CONFIG_FILES modules/rebuild/Makefile" ;; 6712 "modules/sync/Makefile") CONFIG_FILES="$CONFIG_FILES modules/sync/Makefile" ;; 6713 "modules/purge/Makefile") CONFIG_FILES="$CONFIG_FILES modules/purge/Makefile" ;; 6717 6714 "modules/recup_perf_datas_client/Makefile") CONFIG_FILES="$CONFIG_FILES modules/recup_perf_datas_client/Makefile" ;; 6718 6715 -
trunk/centstorage/configure.in
r6185 r6209 25 25 AC_DEFINE([USE_PGSQL], [], [using libmysqlclient]) 26 26 AC_DEFINE([HAVE_SSL], [], [compiling with ssl]) 27 AC_INIT dnl (src/centstorage.c)27 AC_INIT 28 28 AM_CONFIG_HEADER(includes/config.h) 29 29 AC_PREFIX_DEFAULT(/usr/local/) … … 289 289 290 290 ORACLELIBFOUND=no 291 292 dnl check compress lib for Mac OSX as well...293 dnl AC_CHECK_LIB(z,compress)294 dnl AC_CHECK_LIB(mysqlclient,_store_result,ORACLELIBFOUND=yes,ORACLELIBFOUND=no)295 dnl LD_LIBRARY_PATH=/home/nagios/ndoutils-1.4b7-oracle/liboci/lib/oracle_instantclient_10_2/lib296 dnl LD_RUN_PATH=/home/nagios/ndoutils-1.4b7-oracle/liboci/lib/oracle_instantclient_10_2/lib297 291 AC_CHECK_LIB(clntsh,ocierr,ORACLELIBFOUND=yes,ORACLELIBFOUND=no) 298 299 292 dnl Did we find the ORACLE libraries? 300 293 if test x$ORACLELIBFOUND = xno; then … … 348 341 fi 349 342 fi 350 351 352 dnl AC_DEFINE([HAVE_KRB5_H], [], [*** define HAVE_KRB5_H ***])353 dnl AC_DEFINE([HAVE_SSL], [], [define have ssl])354 343 355 344 dnl Does user want to check for SSL? … … 375 364 ssl_lib_dir=$withval 376 365 ]) 377 dnl AC_ARG_WITH(kerberos-inc,--with-kerberos-inc=DIR sets location of the Kerberos include files,[378 dnl kerberos_inc_dir=$withval379 dnl ])380 366 381 367 dnl Check for SSL support … … 462 448 AC_SUBST(LDFLAGS) 463 449 AC_SUBST(LIBS) 464 AC_OUTPUT(Makefile \ 465 src/Makefile \ 466 lib/libmd5/Makefile \ 467 modules/recup_perf_datas/Makefile \ 450 AC_OUTPUT(Makefile \ 451 src/Makefile \ 452 lib/libmd5/Makefile \ 453 modules/recup_perf_datas/Makefile \ 454 modules/rebuild/Makefile \ 455 modules/sync/Makefile \ 456 modules/purge/Makefile \ 468 457 modules/recup_perf_datas_client/Makefile) 469 458 -
trunk/centstorage/includes/centstorage.h
r5649 r6209 25 25 #include <Conf.h> 26 26 27 #define USAGE "CentStorage: Usage: CentStorage [-f ConfFile] [-l logfile]"27 #define USAGE "CentStorage: Usage: CentStorage [-f ConfFile] [-l logfile]" 28 28 29 29 #define WELCOME_MESSAGE "##################################################\n\ … … 33 33 #define EXIT_MESSAGE "Good bye" 34 34 35 #define CENTSTORAGE_START " [Core] CentStorage started"36 #define ERROR_INFOS_LOGS "Cannot log informations."35 #define CENTSTORAGE_START " [Core] CentStorage started" 36 #define ERROR_INFOS_LOGS "Cannot log informations." 37 37 38 38 … … 40 40 for the configuration. The -f optin allow the user tu choose his own configuration 41 41 file*/ 42 #define DEFAULT_CONF_FILE "CentStorage.conf"42 #define DEFAULT_CONF_FILE "CentStorage.conf" 43 43 44 44 typedef struct argv_s -
trunk/centstorage/includes/config.h
r6122 r6209 90 90 91 91 /* Define if using Oracle */ 92 #define USE_ORACLE 92 /* #undef USE_ORACLE */ 93 93 94 94 /* using libmysqlclient */ -
trunk/centstorage/lib/libmd5/Makefile
r6173 r6209 52 52 CC = gcc 53 53 CCDEPMODE = depmode=gcc3 54 CFLAGS = -I/usr/include/o ci/ -I/usr/include/openssl -I/usr/include54 CFLAGS = -I/usr/include/openssl -I/usr/include 55 55 CPP = gcc -E 56 CPPFLAGS = -I/usr/include/oci/56 CPPFLAGS = 57 57 CYGPATH_W = echo 58 58 DBLDFLAGS = -L/usr/lib/mysql 59 DBLIBS = -lmysqlclient -lpq -lnnz11 -lclntsh -locijdbc11 -lm59 DBLIBS = -lmysqlclient -lpq 60 60 DEFS = -DHAVE_CONFIG_H 61 61 DEPDIR = .deps -
trunk/centstorage/modules/recup_perf_datas/Makefile
r6173 r6209 100 100 CC = gcc 101 101 CCDEPMODE = depmode=gcc3 102 CFLAGS = -I/usr/include/o ci/ -I/usr/include/openssl -I/usr/include102 CFLAGS = -I/usr/include/openssl -I/usr/include 103 103 CPP = gcc -E 104 CPPFLAGS = -I/usr/include/oci/104 CPPFLAGS = 105 105 CYGPATH_W = echo 106 106 DBLDFLAGS = -L/usr/lib/mysql 107 DBLIBS = -lmysqlclient -lpq -lnnz11 -lclntsh -locijdbc11 -lm107 DBLIBS = -lmysqlclient -lpq 108 108 DEFS = -DHAVE_CONFIG_H 109 109 DEPDIR = .deps … … 212 212 213 213 dir_INCLUDES = ../../includes 214 INCLUDES = -I$(dir_INCLUDES) -I. - pg -I/usr/include/libxml215 recup_perf_datas_so_LDADD = -lpthread -lxml2 -lmysqlclient -lpq -lnnz11 -lclntsh -locijdbc11 -lm214 INCLUDES = -I$(dir_INCLUDES) -I. -I/usr/include/libxml 215 recup_perf_datas_so_LDADD = -lpthread -lxml2 -lmysqlclient -lpq 216 216 recup_perf_datas_so_CFLAGS = -fPIC 217 #options -shares and -nostartfiles required to compile a shared library218 217 recup_perf_datas_so_LDFLAGS = -shared -W -Wall -ansi -pedantic \ 219 218 -L/usr/lib/mysql `xml2-config --cflags` -
trunk/centstorage/modules/recup_perf_datas/Makefile.am
r6163 r6209 42 42 dir_INCLUDES = ../../includes 43 43 44 INCLUDES = -I$(dir_INCLUDES) -I. -pg@XML_HEADER@44 INCLUDES = -I$(dir_INCLUDES) -I. @XML_HEADER@ 45 45 46 46 recup_perf_datas_so_LDADD = -lpthread @XML_LIBS@ @DBLIBS@ 47 47 48 48 recup_perf_datas_so_CFLAGS = @MOD_CFLAGS@ 49 #options -shares and -nostartfiles required to compile a shared library 50 recup_perf_datas_so_LDFLAGS = @MOD_LDFLAGS@ -W -Wall -ansi -pedantic \49 50 recup_perf_datas_so_LDFLAGS = @MOD_LDFLAGS@ -W -Wall -ansi -pedantic \ 51 51 @DBLDFLAGS@ `xml2-config --cflags` 52 52 -
trunk/centstorage/modules/recup_perf_datas/Makefile.in
r6163 r6209 212 212 213 213 dir_INCLUDES = ../../includes 214 INCLUDES = -I$(dir_INCLUDES) -I. -pg@XML_HEADER@214 INCLUDES = -I$(dir_INCLUDES) -I. @XML_HEADER@ 215 215 recup_perf_datas_so_LDADD = -lpthread @XML_LIBS@ @DBLIBS@ 216 216 recup_perf_datas_so_CFLAGS = @MOD_CFLAGS@ 217 #options -shares and -nostartfiles required to compile a shared library218 217 recup_perf_datas_so_LDFLAGS = @MOD_LDFLAGS@ -W -Wall -ansi -pedantic \ 219 218 @DBLDFLAGS@ `xml2-config --cflags` -
trunk/centstorage/modules/recup_perf_datas/connection_SSL.c
r6192 r6209 345 345 free(serverCrt); 346 346 free(tmp); 347 348 pthread_mutex_destroy(&SSL_mutex); 349 pthread_mutex_destroy(&SSL_conf_mutex); 350 347 351 pthread_exit(NULL); 348 352 } -
trunk/centstorage/modules/recup_perf_datas/insertValInDataBase.c
r6192 r6209 115 115 { 116 116 nb_request = 0; 117 data_request = malloc( DATA_BIN_SIZE);117 data_request = malloc(REQUEST_SIZE * confModule->nb_request); 118 118 if (!data_request) 119 119 { … … 444 444 if (!data_request) 445 445 { 446 data_request = malloc( DATA_BIN_SIZE);446 data_request = malloc(REQUEST_SIZE * confModule->nb_request); 447 447 if (!data_request) 448 448 { … … 710 710 PQclear(res); 711 711 free(data_request); 712 data_request = NULL; 712 713 } 713 714 -
trunk/centstorage/modules/recup_perf_datas/insertValInDataBase.h
r6192 r6209 41 41 #include <parseDatas.h> 42 42 43 #define REQUEST_SIZE 25644 #define DATA_BIN_SIZE 409645 #define PGSQL_REQ_SIZE 51243 #define REQUEST_SIZE 128 44 //#define DATA_BIN_SIZE 4096 45 #define PGSQL_REQ_SIZE 128 46 46 47 47 /* error messages */ … … 65 65 ORDER BY metric_id DESC LIMIT 1" 66 66 67 #define BUILD_REQUEST(begin, request, host, svce) { \67 #define BUILD_REQUEST(begin, request, host, svce) { \ 68 68 sprintf(request, "%s%s\' AND service_description=\'%s\'", \ 69 69 begin, host, svce); } … … 90 90 91 91 #define CONCAT_REQUEST_FIELDS(request, value, name) { \ 92 if (value) \93 { \94 strcat(request, ", "); \95 strcat(request, name); \96 } \92 if (value) \ 93 { \ 94 strcat(request, ", "); \ 95 strcat(request, name); \ 96 } \ 97 97 } 98 98 … … 111 111 #define REQUEST_INSERT_METRIC_PG "INSERT INTO metrics (metric_id, index_id, metric_name" 112 112 113 #define BUILD_INSERT_METRIC_REQUEST_PG(begin, request, index_id, metric_name, \114 unit, warn, crit, min, max) { \115 strcpy(request, begin); \116 CONCAT_REQUEST_FIELDS(request, unit, "unit_name"); \117 CONCAT_REQUEST_FIELDS(request, warn, "warn"); \118 CONCAT_REQUEST_FIELDS(request, crit, "crit"); \119 CONCAT_REQUEST_FIELDS(request, min, "min"); \120 CONCAT_REQUEST_FIELDS(request, max, "max"); \121 strcat(request, ") VALUES ("); \122 strcat(request, "nextval(\'metrics_metric_id_seq\'),"); \123 CONCAT_REQUEST_VAL(request, index_id); \124 CONCAT_REQUEST_VAL(request, metric_name); \125 CONCAT_REQUEST_VAL(request, unit); \126 CONCAT_REQUEST_VAL(request, warn); \127 CONCAT_REQUEST_VAL(request, crit); \128 CONCAT_REQUEST_VAL(request, min); \129 CONCAT_REQUEST_VAL(request, max); \130 request[strlen(request) - 1] = ')'; \113 #define BUILD_INSERT_METRIC_REQUEST_PG(begin, request, index_id, metric_name, \ 114 unit, warn, crit, min, max) { \ 115 strcpy(request, begin); \ 116 CONCAT_REQUEST_FIELDS(request, unit, "unit_name"); \ 117 CONCAT_REQUEST_FIELDS(request, warn, "warn"); \ 118 CONCAT_REQUEST_FIELDS(request, crit, "crit"); \ 119 CONCAT_REQUEST_FIELDS(request, min, "min"); \ 120 CONCAT_REQUEST_FIELDS(request, max, "max"); \ 121 strcat(request, ") VALUES ("); \ 122 strcat(request, "nextval(\'metrics_metric_id_seq\'),"); \ 123 CONCAT_REQUEST_VAL(request, index_id); \ 124 CONCAT_REQUEST_VAL(request, metric_name); \ 125 CONCAT_REQUEST_VAL(request, unit); \ 126 CONCAT_REQUEST_VAL(request, warn); \ 127 CONCAT_REQUEST_VAL(request, crit); \ 128 CONCAT_REQUEST_VAL(request, min); \ 129 CONCAT_REQUEST_VAL(request, max); \ 130 request[strlen(request) - 1] = ')'; \ 131 131 } 132 132 #endif 133 133 134 #define BUILD_INSERT_METRIC_REQUEST(begin, request, index_id, metric_name, \135 unit, warn, crit, min, max) { \136 strcpy(request, begin); \137 CONCAT_REQUEST_FIELDS(request, unit, "unit_name"); \138 CONCAT_REQUEST_FIELDS(request, warn, "warn"); \139 CONCAT_REQUEST_FIELDS(request, crit, "crit"); \140 CONCAT_REQUEST_FIELDS(request, min, "min"); \141 CONCAT_REQUEST_FIELDS(request, max, "max"); \142 strcat(request, ") VALUES ("); \143 CONCAT_REQUEST_VAL(request, index_id); \144 CONCAT_REQUEST_VAL(request, metric_name); \145 CONCAT_REQUEST_VAL(request, unit); \146 CONCAT_REQUEST_VAL(request, warn); \147 CONCAT_REQUEST_VAL(request, crit); \148 CONCAT_REQUEST_VAL(request, min); \149 CONCAT_REQUEST_VAL(request, max); \150 request[strlen(request) - 1] = ')'; \151 }134 #define BUILD_INSERT_METRIC_REQUEST(begin, request, index_id, metric_name, \ 135 unit, warn, crit, min, max) { \ 136 strcpy(request, begin); \ 137 CONCAT_REQUEST_FIELDS(request, unit, "unit_name"); \ 138 CONCAT_REQUEST_FIELDS(request, warn, "warn"); \ 139 CONCAT_REQUEST_FIELDS(request, crit, "crit"); \ 140 CONCAT_REQUEST_FIELDS(request, min, "min"); \ 141 CONCAT_REQUEST_FIELDS(request, max, "max"); \ 142 strcat(request, ") VALUES ("); \
