1.4.1. 创建自动发现规则
自动发现规则使用”脚本“类型,脚本内容填写如下
1.4.2. 添加监控项原型
选择如下键值进行端口探测
名称:服务 {#SERVICE_NAME} 端口检测 键值:net.tcp.port[,{#SERVICE_PORT}]
1.4.3. 定义模板宏
1.4.4. 任意windows操作系统查看监控效果
修改或使用默认模板宏
agent:10050,mstsc:3389,tomcat:7001
1.4.5. 验证监控项

Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
自动发现规则使用”脚本“类型,脚本内容填写如下
var str = JSON.parse(value).service_port;
var arr = str.split(",");
var json = [];
for(var i=0;i<arr.length;i++){
var temp = arr[i].split(":");
var obj = {};
obj["{#SERVICE_NAME}"] = temp[0];
obj["{#SERVICE_PORT}"] = temp[1];
json.push(obj);
}
return JSON.stringify(json);
名称:服务 {#SERVICE_NAME} 端口检测 键值:net.tcp.port[,{#SERVICE_PORT}]
agent:10050,mstsc:3389,tomcat:7001

Was this page helpful?
