feat: report local network types
This commit is contained in:
@@ -11,7 +11,7 @@ const { collect } = require('./metrics');
|
||||
const { getDashboardInfo, resolveOpenclawConfigFile, startTtyd, FrpcManager } = require('./frpc'); // getDashboardInfo 也用于心跳中定期刷新
|
||||
const { ProvisionManager } = require('./provisioning');
|
||||
const { BtMonitor } = require('./bt-monitor');
|
||||
const { hasInternet, hasWiredInternetProbe, getLocalIps } = require('./network');
|
||||
const { hasInternet, hasWiredInternetProbe, getLocalIps, getLocalNetworks } = require('./network');
|
||||
const { applyFullProviderFromVps, removeProviderByName, refreshModelsIfChanged, isFullProvider } = require('./openclaw-provider');
|
||||
const led = require('./led');
|
||||
|
||||
@@ -371,8 +371,9 @@ class ClawClient {
|
||||
box_id: this._boxId,
|
||||
claw_id: this._cfg.claw_id ?? null,
|
||||
token: this._cfg.token ?? null,
|
||||
local_ip: getLocalIps(),
|
||||
external_ip: this._externalIp ?? null,
|
||||
local_ip: getLocalIps(),
|
||||
local_networks: getLocalNetworks(),
|
||||
external_ip: this._externalIp ?? null,
|
||||
location: this._location ?? null,
|
||||
...this._dashInfo,
|
||||
};
|
||||
@@ -595,8 +596,10 @@ class ClawClient {
|
||||
// 每 METRICS_EVERY_N 次心跳(30 秒)采集一次指标,其余发轻量心跳
|
||||
const msg = {
|
||||
type: 'heartbeat',
|
||||
claw_id: this._cfg.claw_id,
|
||||
token: this._cfg.token,
|
||||
claw_id: this._cfg.claw_id,
|
||||
token: this._cfg.token,
|
||||
local_ip: getLocalIps(),
|
||||
local_networks: getLocalNetworks(),
|
||||
...this._dashInfo,
|
||||
};
|
||||
if (this._hbCount % METRICS_EVERY_N === 0) {
|
||||
|
||||
Reference in New Issue
Block a user