You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

n9e_mon.sql 21 kB

5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
Rdb (#479) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * Rdb with session & monapi with telegraf (#456) * use collector interface * mysql can work fine * add basecollector * add prober & monapi.plugins * enable mysql plugins work * rename collector -> manager * add white list access check for rdb * add cache module for authConfig & session * rollback n9e_rdb_3.3.0.sql * add sql ddl document * add white_list, pwd, login access control * add email code for login & reset password * use sessionUsername instead of cookieUsername * remove cookie name and data from session * rename userName to username * add remote_addr with session connection * add get user by sid with cache * enable cookie life time could be zero * go mod tidy * add plugins config for prober * add prober plugin expression parse * update transfer default config for m3 * Rdb (#458) * bugfix: session gc * use flag for pwdMustInclude * change user login function * delete invite token after use * bugfix: login response * add sessionStart middle ware * add auth module * add i18n for rdb * add i18n.zh for rdb.auth * add mon plugins(redis, mongodb) * update config * add sub struct into definitions * clean up sid cache after session destory * bugfix: get user return nil when not found * update i18n * bugfix: ignore cache nologin user * add user for callback output * add password change api * update default configfile & sql patch * merge mon http middleware from rdb * remove sso logout, sso already supporte one time auth
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. set names utf8;
  2. drop database if exists n9e_mon;
  3. create database n9e_mon;
  4. use n9e_mon;
  5. create table `maskconf` (
  6. `id` int unsigned not null auto_increment,
  7. `nid` int unsigned not null,
  8. `category` int(1) NOT NULL COMMENT '1 机器 2业务',
  9. `metric` varchar(255) not null,
  10. `tags` varchar(255) not null default '',
  11. `cause` varchar(255) not null default '',
  12. `user` varchar(64) not null default 'operate user',
  13. `btime` bigint not null default 0 comment 'begin time',
  14. `etime` bigint not null default 0 comment 'end time',
  15. primary key (`id`),
  16. key(`nid`)
  17. ) engine=innodb default charset=utf8;
  18. create table `maskconf_endpoints` (
  19. `id` int unsigned not null auto_increment,
  20. `mask_id` int unsigned not null,
  21. `endpoint` varchar(255) not null,
  22. primary key (`id`),
  23. key(`mask_id`)
  24. ) engine=innodb default charset=utf8;
  25. create table `maskconf_nids` (
  26. `id` int unsigned not null auto_increment,
  27. `mask_id` int unsigned not null,
  28. `nid` varchar(255) not null,
  29. `path` varchar(255) not null,
  30. primary key (`id`),
  31. key(`mask_id`)
  32. ) engine=innodb default charset=utf8;
  33. create table `screen` (
  34. `id` int unsigned not null auto_increment,
  35. `node_id` int unsigned not null comment 'service tree node id',
  36. `name` varchar(255) not null,
  37. `last_updator` varchar(64) not null default '',
  38. `last_updated` timestamp not null default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  39. primary key (`id`),
  40. key(`node_id`)
  41. ) engine=innodb default charset=utf8;
  42. create table `screen_subclass` (
  43. `id` int unsigned not null auto_increment,
  44. `screen_id` int unsigned not null,
  45. `name` varchar(255) not null,
  46. `weight` int not null default 0,
  47. primary key (`id`),
  48. key(`screen_id`)
  49. ) engine=innodb default charset=utf8;
  50. create table `chart` (
  51. `id` int unsigned not null auto_increment,
  52. `subclass_id` int unsigned not null,
  53. `configs` varchar(8192),
  54. `weight` int not null default 0,
  55. primary key (`id`),
  56. key(`subclass_id`)
  57. ) engine=innodb default charset=utf8;
  58. create table `tmp_chart` (
  59. `id` int unsigned not null auto_increment,
  60. `configs` varchar(8192),
  61. `creator` varchar(64) not null,
  62. `last_updated` timestamp not null default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  63. primary key (`id`)
  64. ) engine=innodb default charset=utf8;
  65. create table `event_cur` (
  66. `id` bigint(20) unsigned not null AUTO_INCREMENT comment 'id',
  67. `sid` bigint(20) unsigned not null default 0 comment 'sid',
  68. `sname` varchar(255) not null default '' comment 'name, 报警通知名称',
  69. `node_path` varchar(255) not null default '' comment 'node path',
  70. `nid` int unsigned not null default '0' comment 'node id',
  71. `endpoint` varchar(255) not null default '' comment 'endpoint',
  72. `endpoint_alias` varchar(255) not null default '' comment 'endpoint alias',
  73. `cur_node_path` varchar(255) not null default '' comment 'cur_node_path',
  74. `cur_nid` varchar(45) not null default '' comment 'cur_nid',
  75. `priority` tinyint(4) not null default 2 comment '优先级',
  76. `event_type` varchar(45) not null default '' comment 'alert|recovery',
  77. `category` tinyint(4) not null default 2 comment '1阈值 2智能',
  78. `status` int(10) not null default 0 comment 'event status',
  79. `detail` text comment 'counter points pred_points 详情',
  80. `hashid` varchar(128) not null default '' comment 'sid+counter hash',
  81. `etime` bigint(20) not null default 0 comment 'event ts',
  82. `value` varchar(255) not null default '' comment '当前值',
  83. `users` varchar(512) not null default '[]' comment 'notify users',
  84. `groups` varchar(512) not null default '[]' comment 'notify groups',
  85. `runbook` varchar(1024) NOT NULL DEFAULT '' COMMENT 'runbook url',
  86. `info` varchar(512) not null default '' comment 'strategy info',
  87. `ignore_alert` int(2) not null default 0 comment 'ignore event',
  88. `claimants` varchar(512) not null default '[]' comment 'claimants',
  89. `need_upgrade` int(2) not null default 0 comment 'need upgrade',
  90. `alert_upgrade` text comment 'alert upgrade',
  91. `created` DATETIME not null default '1971-1-1 00:00:00' comment 'created',
  92. KEY `idx_id` (`id`),
  93. KEY `idx_sid` (`sid`),
  94. KEY `idx_hashid` (`hashid`),
  95. KEY `idx_node_path` (`node_path`),
  96. KEY `idx_etime` (`etime`)
  97. ) engine=innodb default charset=utf8 comment 'event';
  98. create table `event` (
  99. `id` bigint(20) unsigned not null AUTO_INCREMENT comment 'id',
  100. `sid` bigint(20) unsigned not null default 0 comment 'sid',
  101. `sname` varchar(255) not null default '' comment 'name, 报警通知名称',
  102. `node_path` varchar(255) not null default '' comment 'node path',
  103. `nid` int unsigned not null default '0' comment 'node id',
  104. `endpoint` varchar(255) not null default '' comment 'endpoint',
  105. `endpoint_alias` varchar(255) not null default '' comment 'endpoint alias',
  106. `cur_node_path` varchar(255) not null default '' comment 'cur_node_path',
  107. `cur_nid` varchar(45) not null default '' comment 'cur_nid',
  108. `priority` tinyint(4) not null default 2 comment '优先级',
  109. `event_type` varchar(45) not null default '' comment 'alert|recovery',
  110. `category` tinyint(4) not null default 2 comment '1阈值 2智能',
  111. `status` int(10) not null default 0 comment 'event status',
  112. `detail` text comment 'counter points pred_points 详情',
  113. `hashid` varchar(128) not null default '' comment 'sid+counter hash',
  114. `etime` bigint(20) not null default 0 comment 'event ts',
  115. `value` varchar(255) not null default '' comment '当前值',
  116. `users` varchar(512) not null default '[]' comment 'notify users',
  117. `groups` varchar(512) not null default '[]' comment 'notify groups',
  118. `runbook` varchar(1024) NOT NULL DEFAULT '' COMMENT 'runbook url',
  119. `info` varchar(512) not null default '' comment 'strategy info',
  120. `need_upgrade` int(2) not null default 0 comment 'need upgrade',
  121. `alert_upgrade` text not null comment 'alert upgrade',
  122. `created` DATETIME not null default '1971-1-1 00:00:00' comment 'created',
  123. PRIMARY KEY (`id`),
  124. KEY `idx_id` (`id`),
  125. KEY `idx_sid` (`sid`),
  126. KEY `idx_hashid` (`hashid`),
  127. KEY `idx_node_path` (`node_path`),
  128. KEY `idx_etime` (`etime`),
  129. KEY `idx_event_type` (`event_type`),
  130. KEY `idx_status` (`status`)
  131. ) engine=innodb default charset=utf8 comment 'event';
  132. CREATE TABLE `stra` (
  133. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  134. `name` varchar(255) NOT NULL COMMENT 'strategy name',
  135. `category` int(1) NOT NULL COMMENT '1 机器 2业务',
  136. `nid` int(10) NOT NULL COMMENT '服务树节点id',
  137. `excl_nid` varchar(255) NOT NULL COMMENT '被排除的服务树叶子节点id',
  138. `alert_dur` int(4) NOT NULL COMMENT '单位秒,持续异常n秒则产生异常event',
  139. `recovery_dur` int(4) NOT NULL DEFAULT 0 COMMENT '单位秒,持续正常n秒则产生恢复event,0表示立即产生恢复event',
  140. `exprs` varchar(1024) NOT NULL DEFAULT '' COMMENT '规则表达式',
  141. `tags` varchar(1024) DEFAULT '' COMMENT 'tags过滤',
  142. `enable_stime` char(5) NOT NULL DEFAULT '00:00' COMMENT '策略生效开始时间',
  143. `enable_etime` char(5) NOT NULL DEFAULT '23:59' COMMENT '策略生效终止时间',
  144. `enable_days_of_week` varchar(1024) NOT NULL DEFAULT '[0,1,2,3,4,5,6]' COMMENT '策略生效日期',
  145. `converge` varchar(45) NOT NULL DEFAULT '' COMMENT 'n秒最多报m次警',
  146. `recovery_notify` int(1) NOT NULL DEFAULT 1 COMMENT '1 发送恢复通知 0不发送恢复通知',
  147. `priority` int(1) NOT NULL DEFAULT 3 COMMENT '告警等级',
  148. `notify_group` varchar(255) NOT NULL DEFAULT '' COMMENT '告警通知组',
  149. `notify_user` varchar(255) NOT NULL DEFAULT '' COMMENT '告警通知人',
  150. `callback` varchar(1024) NOT NULL DEFAULT '' COMMENT 'callback url',
  151. `runbook` varchar(1024) NOT NULL DEFAULT '' COMMENT 'runbook url',
  152. `work_groups` varchar(255) NOT NULL DEFAULT '' COMMENT 'work_groups',
  153. `creator` varchar(64) NOT NULL COMMENT '创建者',
  154. `created` timestamp NOT NULL DEFAULT '1971-01-01 00:00:00' COMMENT 'created',
  155. `last_updator` varchar(64) NOT NULL DEFAULT '',
  156. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  157. `need_upgrade` int(2) not null default 0 comment 'need upgrade',
  158. `alert_upgrade` text comment 'alert upgrade',
  159. PRIMARY KEY (`id`),
  160. KEY `idx_nid` (`nid`)
  161. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  162. CREATE TABLE `stra_log` (
  163. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  164. `sid` bigint(20) NOT NULL DEFAULT '0' COMMENT 'collect id',
  165. `action` varchar(255) NOT NULL DEFAULT '' COMMENT '动作 update, delete',
  166. `body` text COMMENT '修改之前采集的内容',
  167. `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
  168. `created` timestamp NOT NULL DEFAULT '1971-01-01 00:00:00' COMMENT 'created',
  169. PRIMARY KEY (`id`),
  170. KEY `idx_sid` (`sid`)
  171. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  172. CREATE TABLE `port_collect` (
  173. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  174. `collect_type` varchar(64) NOT NULL DEFAULT 'PORT' COMMENT 'type',
  175. `nid` int(10) NOT NULL COMMENT '服务树节点id',
  176. `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name',
  177. `tags` varchar(255) NOT NULL DEFAULT '' COMMENT 'tags',
  178. `port` int(11) NOT NULL DEFAULT '0' COMMENT 'port',
  179. `step` int(11) NOT NULL DEFAULT '0' COMMENT '采集周期',
  180. `timeout` int(11) NOT NULL DEFAULT '0' COMMENT 'connect time',
  181. `comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment',
  182. `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
  183. `created` datetime NOT NULL COMMENT 'created',
  184. `last_updator` varchar(64) NOT NULL DEFAULT '' COMMENT 'last_updator',
  185. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'last_updated',
  186. PRIMARY KEY (`id`),
  187. KEY `idx_nid` (`nid`),
  188. KEY `idx_collect_type` (`collect_type`)
  189. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'port collect';
  190. CREATE TABLE `proc_collect` (
  191. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  192. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  193. `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name',
  194. `tags` varchar(255) NOT NULL DEFAULT '' COMMENT 'tags',
  195. `collect_type` varchar(64) NOT NULL DEFAULT 'PROC' COMMENT 'type',
  196. `collect_method` varchar(64) NOT NULL DEFAULT 'name' COMMENT '采集方式',
  197. `target` varchar(255) NOT NULL DEFAULT '' COMMENT '采集对象',
  198. `step` int(11) NOT NULL DEFAULT '0' COMMENT '采集周期',
  199. `comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment',
  200. `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
  201. `created` datetime NOT NULL COMMENT 'created',
  202. `last_updator` varchar(64) NOT NULL DEFAULT '' COMMENT 'last_updator',
  203. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  204. PRIMARY KEY (`id`),
  205. KEY `idx_nid` (`nid`),
  206. KEY `idx_collect_type` (`collect_type`)
  207. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'proc collect';
  208. CREATE TABLE `log_collect` (
  209. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  210. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  211. `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name',
  212. `tags` varchar(2048) NOT NULL DEFAULT '' COMMENT 'tags',
  213. `collect_type` varchar(64) NOT NULL DEFAULT 'LOG' COMMENT 'type',
  214. `step` int(11) NOT NULL DEFAULT '0' COMMENT '采集周期',
  215. `file_path` varchar(255) NOT NULL DEFAULT '' COMMENT 'file path',
  216. `time_format` varchar(128) NOT NULL DEFAULT '' COMMENT 'time format',
  217. `pattern` varchar(1024) NOT NULL DEFAULT '' COMMENT 'pattern',
  218. `func` varchar(64) NOT NULL DEFAULT '' COMMENT 'func',
  219. `degree` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'degree',
  220. `func_type` varchar(64) NOT NULL DEFAULT '' COMMENT 'func_type',
  221. `aggregate` varchar(64) NOT NULL DEFAULT '' COMMENT 'aggr',
  222. `unit` varchar(64) NOT NULL DEFAULT '' COMMENT 'unit',
  223. `zero_fill` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'zero fill',
  224. `comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment',
  225. `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
  226. `created` datetime NOT NULL COMMENT 'created',
  227. `last_updator` varchar(64) NOT NULL DEFAULT '' COMMENT 'last_updator',
  228. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  229. PRIMARY KEY (`id`),
  230. KEY `idx_nid` (`nid`),
  231. KEY `idx_collect_type` (`collect_type`)
  232. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'log collect';
  233. CREATE TABLE `plugin_collect` (
  234. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  235. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  236. `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name',
  237. `collect_type` varchar(64) NOT NULL DEFAULT 'PROC' COMMENT 'type',
  238. `step` int(11) NOT NULL DEFAULT '0' COMMENT '采集周期',
  239. `file_path` varchar(255) NOT NULL COMMENT 'file_path',
  240. `params` varchar(255) NOT NULL COMMENT 'params',
  241. `stdin` text NOT NULL COMMENT 'stdin',
  242. `env` text NOT NULL COMMENT 'env',
  243. `comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment',
  244. `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
  245. `created` datetime NOT NULL COMMENT 'created',
  246. `last_updator` varchar(64) NOT NULL DEFAULT '' COMMENT 'last_updator',
  247. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  248. PRIMARY KEY (`id`),
  249. KEY `idx_nid` (`nid`),
  250. KEY `idx_collect_type` (`collect_type`)
  251. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'plugin collect';
  252. CREATE TABLE `api_collect` (
  253. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  254. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  255. `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name',
  256. `domain` varchar(255) NOT NULL DEFAULT '' COMMENT 'domain',
  257. `collect_type` varchar(64) NOT NULL DEFAULT 'API' COMMENT 'type',
  258. `path` varchar(255) NOT NULL DEFAULT '/' COMMENT 'path&querystring',
  259. `header` varchar(1024) NOT NULL DEFAULT '' COMMENT 'headers',
  260. `step` int(11) NOT NULL DEFAULT '0' COMMENT 'step',
  261. `timeout` int(11) NOT NULL DEFAULT '0' COMMENT 'total timeout',
  262. `protocol` varchar(20) NOT NULL DEFAULT 'http' COMMENT 'protocol',
  263. `port` varchar(20) NOT NULL DEFAULT '0' COMMENT 'port',
  264. `method` varchar(10) NOT NULL DEFAULT 'get' COMMENT 'method',
  265. `max_redirect` smallint(2) NOT NULL DEFAULT '0' COMMENT 'max_redirect',
  266. `post_body` text COMMENT 'post_body',
  267. `expected_code` varchar(255) NOT NULL DEFAULT '[]' COMMENT 'expected_code',
  268. `expected_string` varchar(255) NOT NULL DEFAULT '' COMMENT 'expected_string',
  269. `unexpected_string` varchar(255) NOT NULL DEFAULT '' COMMENT 'unexpected_string',
  270. `region` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'region',
  271. `comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment',
  272. `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
  273. `created` datetime NOT NULL COMMENT 'created',
  274. `last_updator` varchar(64) NOT NULL DEFAULT '' COMMENT 'last_updator',
  275. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  276. PRIMARY KEY (`id`),
  277. KEY `idx_nid` (`nid`),
  278. KEY `idx_collect_type` (`collect_type`)
  279. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'api collect';
  280. CREATE TABLE `snmp_collect` (
  281. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  282. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  283. `collect_type` varchar(64) NOT NULL DEFAULT 'SNMP' COMMENT 'collect_type',
  284. `oid_type` int(1) NOT NULL DEFAULT 1 COMMENT 'oid_type',
  285. `module` varchar(255) NOT NULL DEFAULT '' COMMENT 'module',
  286. `metric` varchar(255) NOT NULL DEFAULT '' COMMENT 'metric',
  287. `metric_type` varchar(255) NOT NULL DEFAULT '' COMMENT 'metric_type',
  288. `oid` varchar(255) NOT NULL DEFAULT '' COMMENT 'oid',
  289. `indexes` text NOT NULL COMMENT 'indexes',
  290. `port` int(5) NOT NULL DEFAULT 161 COMMENT 'port',
  291. `step` int(11) NOT NULL DEFAULT '0' COMMENT 'step',
  292. `timeout` int(11) NOT NULL DEFAULT '0' COMMENT 'total timeout',
  293. `comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment',
  294. `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
  295. `created` datetime NOT NULL COMMENT 'created',
  296. `last_updator` varchar(64) NOT NULL DEFAULT '' COMMENT 'last_updator',
  297. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  298. PRIMARY KEY (`id`),
  299. KEY `idx_nid` (`nid`),
  300. KEY `idx_module` (`module`),
  301. KEY `idx_collect_type` (`collect_type`)
  302. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'api collect';
  303. CREATE TABLE `collect_rule` (
  304. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  305. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  306. `step` int(11) NOT NULL DEFAULT '0' COMMENT 'step',
  307. `timeout` int(11) NOT NULL DEFAULT '0' COMMENT 'total timeout',
  308. `collect_type` varchar(64) NOT NULL DEFAULT '' COMMENT 'collector name',
  309. `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name',
  310. `region` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'region',
  311. `comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment',
  312. `data` blob NULL COMMENT 'data',
  313. `tags` varchar(512) NOT NULL DEFAULT '' COMMENT 'tags',
  314. `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
  315. `last_updator` varchar(64) NOT NULL DEFAULT '' COMMENT 'last_updator',
  316. `created` datetime NOT NULL COMMENT 'created',
  317. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  318. PRIMARY KEY (`id`),
  319. KEY `idx_nid` (`nid`),
  320. KEY `idx_collect_type` (`collect_type`)
  321. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'api collect';
  322. CREATE TABLE `aggr_calc` (
  323. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  324. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  325. `category` int(1) NOT NULL COMMENT '1 机器 2业务',
  326. `new_metric` varchar(255) NOT NULL DEFAULT '' COMMENT 'new_metric',
  327. `new_step` int(11) NOT NULL DEFAULT '0' COMMENT 'new_step',
  328. `groupby` varchar(255) NOT NULL DEFAULT '' COMMENT 'groupby',
  329. `raw_metrics` text comment 'raw_metrics',
  330. `global_operator` varchar(32) NOT NULL DEFAULT '' COMMENT 'global_operator',
  331. `expression` varchar(255) NOT NULL DEFAULT '' COMMENT 'expression',
  332. `rpn` varchar(255) NOT NULL DEFAULT '' COMMENT 'rpn',
  333. `status` int(1) NOT NULL COMMENT '',
  334. `quota` int(10) NOT NULL COMMENT '',
  335. `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
  336. `creator` varchar(64) NOT NULL COMMENT '创建者',
  337. `created` timestamp NOT NULL DEFAULT '1971-01-01 00:00:00' COMMENT 'created',
  338. `last_updator` varchar(64) NOT NULL DEFAULT '',
  339. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  340. PRIMARY KEY (`id`),
  341. KEY `idx_nid` (`nid`),
  342. KEY `idx_new_metric` (`new_metric`)
  343. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'aggr_calc';
  344. CREATE TABLE `nginx_log_stra` (
  345. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  346. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  347. `service` varchar(255) NOT NULL DEFAULT '' COMMENT 'service',
  348. `interval` int(11) NOT NULL DEFAULT '0' COMMENT 'interval',
  349. `domain` varchar(2048) NOT NULL DEFAULT '' COMMENT 'domain',
  350. `url_path_prefix` varchar(2048) NOT NULL DEFAULT '' COMMENT 'url_path_prefix',
  351. `append_tags` varchar(2048) NOT NULL DEFAULT '' COMMENT 'append_tags',
  352. `creator` varchar(64) NOT NULL COMMENT '创建者',
  353. `created` timestamp NOT NULL DEFAULT '1971-01-01 00:00:00' COMMENT 'created',
  354. `last_updator` varchar(64) NOT NULL DEFAULT '',
  355. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  356. PRIMARY KEY (`id`),
  357. KEY `idx_nid` (`nid`)
  358. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'nginx_log_stra';
  359. CREATE TABLE `binlog_stra` (
  360. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  361. `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
  362. `metric` varchar(255) NOT NULL DEFAULT '' COMMENT 'metric',
  363. `interval` int(11) NOT NULL DEFAULT '0' COMMENT 'interval',
  364. `db` varchar(2048) NOT NULL DEFAULT '' COMMENT 'db',
  365. `column_change` varchar(2048) NOT NULL DEFAULT '' COMMENT 'column_change',
  366. `tags_column` varchar(2048) NOT NULL DEFAULT '' COMMENT 'tags_column',
  367. `append_tags` varchar(2048) NOT NULL DEFAULT '' COMMENT 'append_tags',
  368. `func` varchar(255) NOT NULL DEFAULT '' COMMENT 'func',
  369. `sql_type` varchar(255) NOT NULL DEFAULT '' COMMENT 'sql_type',
  370. `value_column` varchar(255) NOT NULL DEFAULT '' COMMENT 'value_column',
  371. `creator` varchar(64) NOT NULL COMMENT '创建者',
  372. `created` timestamp NOT NULL DEFAULT '1971-01-01 00:00:00' COMMENT 'created',
  373. `last_updator` varchar(64) NOT NULL DEFAULT '',
  374. `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  375. PRIMARY KEY (`id`),
  376. KEY `idx_nid` (`nid`)
  377. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'binlog_stra';
  378. CREATE TABLE `collect_hist` (
  379. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  380. `cid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'collect id',
  381. `collect_type` varchar(255) NOT NULL DEFAULT '' COMMENT '采集的种类 log,port,proc,api',
  382. `action` varchar(8) NOT NULL DEFAULT '' COMMENT '动作 update, delete',
  383. `body` text COMMENT '修改之前采集的内容',
  384. `creator` varchar(128) NOT NULL DEFAULT '' COMMENT 'creator',
  385. `created` datetime NOT NULL DEFAULT '1971-01-01 00:00:00' COMMENT 'created',
  386. PRIMARY KEY (`id`),
  387. KEY `idx_cid` (`cid`)
  388. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'hist';