feat(monitor): 修改监控配置,显示机器名进程名

This commit is contained in:
liangtongchuan
2023-04-12 14:16:26 +08:00
parent b665786f99
commit 31db7061b7
6 changed files with 1206 additions and 95 deletions

View File

@@ -1,5 +1,5 @@
// config
const fs = require('fs');
module.exports = {
// I. 必须的配置
server: 'ws://172.16.4.147:9092', // 填写前一节中部署的 xtransit-server 地址
@@ -20,5 +20,8 @@ module.exports = {
logger: console, // 可以传入应用日志句柄方便日志统一管理,需要实现 error, info, warn 和 debug 四个方法
logLevel: 2, // 默认内置 logger 的日志级别0 error1 info2 warning3 debug,
titles: [], // 数组,如果应用使用了 process.title 自定义了名称,可以通过配置这里上报进程数据
customAgent: () => {
const hostname = fs.readFileSync('/etc/aliashost', 'utf8').trim();
return hostname;
}
};