mirror of https://gitee.com/bigwinds/arangodb
Bugfix/inspector thread (#5553)
This commit is contained in:
parent
de04250fbb
commit
1671201241
|
@ -60,9 +60,7 @@ RestStatus RestStatusHandler::execute() {
|
||||||
result.add("server", VPackValue("arango"));
|
result.add("server", VPackValue("arango"));
|
||||||
result.add("version", VPackValue(ARANGODB_VERSION));
|
result.add("version", VPackValue(ARANGODB_VERSION));
|
||||||
|
|
||||||
#if defined(TRI_HAVE_POSIX_THREADS)
|
result.add("pid", VPackValue(Thread::currentProcessId()));
|
||||||
result.add("pid", VPackValue(getpid()));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_ENTERPRISE
|
#ifdef USE_ENTERPRISE
|
||||||
result.add("license", VPackValue("enterprise"));
|
result.add("license", VPackValue("enterprise"));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* jshint -W051, -W020 */
|
/* jshint -W051, -W020 */
|
||||||
/* global global:true, window, require */
|
/* global global:true, require */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// /////////////////////////////////////////////////////////////////////////////
|
// /////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -87,6 +87,7 @@ if (arango.lastErrorMessage()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
require("@arangodb/inspector");
|
require("@arangodb/inspector");
|
||||||
require("internal").exit();
|
require("process").exit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -584,12 +584,14 @@ function getServerData(arango) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const version = arango.GET('_api/version'); // version api
|
const version = arango.GET('_api/version?details=true'); // version api
|
||||||
const log = arango.GET('_admin/log'); // log api
|
const log = arango.GET('_admin/log'); // log api
|
||||||
const statistics = arango.GET('_admin/statistics'); // statistics api
|
const statistics = arango.GET('_admin/statistics'); // statistics api
|
||||||
var agencyConfig;
|
var agencyConfig;
|
||||||
|
var agencyState;
|
||||||
if (server.startsWith("AGNT")) {
|
if (server.startsWith("AGNT")) {
|
||||||
agencyConfig = arango.GET('_api/agency/config');
|
agencyConfig = arango.GET('_api/agency/config');
|
||||||
|
agencyState = arango.GET('_api/agency/state');
|
||||||
}
|
}
|
||||||
const status = arango.GET('_admin/status');
|
const status = arango.GET('_admin/status');
|
||||||
const time = require('internal').time();
|
const time = require('internal').time();
|
||||||
|
@ -646,6 +648,7 @@ function getServerData(arango) {
|
||||||
|
|
||||||
if (agencyConfig !== undefined) {
|
if (agencyConfig !== undefined) {
|
||||||
report[server].config = agencyConfig;
|
report[server].config = agencyConfig;
|
||||||
|
report[server].state = agencyState;
|
||||||
}
|
}
|
||||||
if (top !== undefined) {
|
if (top !== undefined) {
|
||||||
report[server].top = top;
|
report[server].top = top;
|
||||||
|
|
Loading…
Reference in New Issue