CPU
@@ -59,12 +59,12 @@
/>
-
-
-
+
+
+
- 内存
+ 内存
{{ record.memory_info?.value || 0 }}%
-
-
-
-
- 硬盘
- {{ record.disk_info?.value || 0 }}%
-
-
-
-
-
@@ -195,8 +179,8 @@ import {
import type { FormItem } from '@/components/search-form/types'
import SearchTable from '@/components/search-table/index.vue'
import { searchFormConfig } from './config/search-form'
-import FormDialog from '../pc/components/FormDialog.vue'
-import QuickConfigDialog from '../pc/components/QuickConfigDialog.vue'
+import FormDialog from './components/FormDialog.vue'
+import QuickConfigDialog from './components/QuickConfigDialog.vue'
import { columns as columnsConfig } from './config/columns'
import {
fetchServerList,
@@ -209,201 +193,161 @@ const router = useRouter()
const mockServerData = [
{
id: 1,
- unique_id: 'SRV-2024-0001',
- name: 'Web中间件-01',
- type: 'Web中间件',
- os: 'CentOS 7.9',
- location: '数据中心A-1楼-机柜01-U1',
- tags: 'Web,应用',
+ unique_id: 'MW-2024-0001',
+ name: 'Nginx 服务器 -01',
+ middleware: 'nginx',
+ version: '1.24.0',
+ location: '数据中心 A-1 楼 -机柜 01-U1',
+ tags: 'Web,负载均衡',
ip: '192.168.1.101',
remote_access: true,
agent_config: true,
- cpu: '8核 Intel Xeon',
- memory: '32GB',
- disk: '1TB SSD',
- cpu_info: { value: 45, total: '8核', used: '3.6核' },
+ cpu_info: { value: 45, total: '8 核', used: '3.6 核' },
memory_info: { value: 62, total: '32GB', used: '19.8GB' },
- disk_info: { value: 78, total: '1TB', used: '780GB' },
data_collection: true,
status: 'online',
},
{
id: 2,
- unique_id: 'SRV-2024-0002',
- name: '数据库中间件-01',
- type: '数据库中间件',
- os: 'Ubuntu 22.04',
- location: '数据中心A-1楼-机柜02-U1',
- tags: '数据库,MySQL',
+ unique_id: 'MW-2024-0002',
+ name: 'Redis 缓存 -01',
+ middleware: 'redis',
+ version: '7.2.3',
+ location: '数据中心 A-1 楼 -机柜 02-U1',
+ tags: '缓存,高性能',
ip: '192.168.1.102',
remote_access: true,
agent_config: true,
- cpu: '16核 AMD EPYC',
- memory: '64GB',
- disk: '2TB NVMe',
- cpu_info: { value: 78, total: '16核', used: '12.5核' },
+ cpu_info: { value: 78, total: '16 核', used: '12.5 核' },
memory_info: { value: 85, total: '64GB', used: '54.4GB' },
- disk_info: { value: 92, total: '2TB', used: '1.84TB' },
data_collection: true,
status: 'online',
},
{
id: 3,
- unique_id: 'SRV-2024-0003',
- name: '应用中间件-01',
- type: '应用中间件',
- os: 'Windows Server 2019',
- location: '数据中心A-2楼-机柜05-U2',
- tags: '应用,.NET',
+ unique_id: 'MW-2024-0003',
+ name: 'Tomcat 应用 -01',
+ middleware: 'tomcat',
+ version: '10.1.15',
+ location: '数据中心 A-2 楼 -机柜 05-U2',
+ tags: '应用,Java',
ip: '192.168.1.103',
remote_access: false,
agent_config: false,
- cpu: '4核 Intel Xeon',
- memory: '16GB',
- disk: '500GB SSD',
- cpu_info: { value: 0, total: '4核', used: '0核' },
+ cpu_info: { value: 0, total: '4 核', used: '0 核' },
memory_info: { value: 0, total: '16GB', used: '0GB' },
- disk_info: { value: 0, total: '500GB', used: '0GB' },
data_collection: false,
status: 'offline',
},
{
id: 4,
- unique_id: 'SRV-2024-0004',
- name: '缓存中间件-01',
- type: '缓存中间件',
- os: 'CentOS 8.5',
- location: '数据中心A-2楼-机柜06-U1',
- tags: '缓存,Redis',
+ unique_id: 'MW-2024-0004',
+ name: 'Kafka 消息队列 -01',
+ middleware: 'kafka',
+ version: '3.6.0',
+ location: '数据中心 A-2 楼 -机柜 06-U1',
+ tags: '消息队列,分布式',
ip: '192.168.1.104',
remote_access: true,
agent_config: true,
- cpu: '8核 Intel Xeon',
- memory: '32GB',
- disk: '1TB SSD',
- cpu_info: { value: 35, total: '8核', used: '2.8核' },
+ cpu_info: { value: 35, total: '8 核', used: '2.8 核' },
memory_info: { value: 68, total: '32GB', used: '21.8GB' },
- disk_info: { value: 42, total: '1TB', used: '420GB' },
data_collection: true,
status: 'online',
},
{
id: 5,
- unique_id: 'SRV-2024-0005',
- name: '文件中间件-01',
- type: '文件中间件',
- os: 'Debian 11',
- location: '数据中心B-1楼-机柜03-U1',
- tags: '文件,NFS',
+ unique_id: 'MW-2024-0005',
+ name: 'Elasticsearch-01',
+ middleware: 'elasticsearch',
+ version: '8.11.1',
+ location: '数据中心 B-1 楼 -机柜 03-U1',
+ tags: '搜索,日志分析',
ip: '192.168.2.101',
remote_access: true,
agent_config: true,
- cpu: '12核 Intel Xeon',
- memory: '48GB',
- disk: '10TB HDD',
- cpu_info: { value: 28, total: '12核', used: '3.4核' },
+ cpu_info: { value: 28, total: '12 核', used: '3.4 核' },
memory_info: { value: 45, total: '48GB', used: '21.6GB' },
- disk_info: { value: 88, total: '10TB', used: '8.8TB' },
data_collection: true,
status: 'maintenance',
},
{
id: 6,
- unique_id: 'SRV-2024-0006',
- name: '测试中间件-01',
- type: '测试中间件',
- os: 'CentOS 7.9',
- location: '数据中心B-2楼-机柜10-U1',
- tags: '测试,开发',
+ unique_id: 'MW-2024-0006',
+ name: 'RabbitMQ-01',
+ middleware: 'rabbitmq',
+ version: '3.12.10',
+ location: '数据中心 B-2 楼 -机柜 10-U1',
+ tags: '消息队列,AMQP',
ip: '192.168.2.102',
remote_access: false,
agent_config: false,
- cpu: '4核 Intel Xeon',
- memory: '8GB',
- disk: '256GB SSD',
- cpu_info: { value: 0, total: '4核', used: '0核' },
+ cpu_info: { value: 0, total: '4 核', used: '0 核' },
memory_info: { value: 0, total: '8GB', used: '0GB' },
- disk_info: { value: 0, total: '256GB', used: '0GB' },
data_collection: false,
status: 'retired',
},
{
id: 7,
- unique_id: 'SRV-2024-0007',
- name: '监控中间件-01',
- type: '监控中间件',
- os: 'Ubuntu 20.04',
- location: '数据中心A-1楼-机柜08-U1',
- tags: '监控,Prometheus',
+ unique_id: 'MW-2024-0007',
+ name: 'Nginx 反向代理 -01',
+ middleware: 'nginx',
+ version: '1.25.3',
+ location: '数据中心 A-1 楼 -机柜 08-U1',
+ tags: '反向代理,负载均衡',
ip: '192.168.1.105',
remote_access: true,
agent_config: true,
- cpu: '8核 Intel Xeon',
- memory: '32GB',
- disk: '1TB SSD',
- cpu_info: { value: 55, total: '8核', used: '4.4核' },
+ cpu_info: { value: 55, total: '8 核', used: '4.4 核' },
memory_info: { value: 72, total: '32GB', used: '23.0GB' },
- disk_info: { value: 65, total: '1TB', used: '650GB' },
data_collection: true,
status: 'online',
},
{
id: 8,
- unique_id: 'SRV-2024-0008',
- name: '备份中间件-01',
- type: '备份中间件',
- os: 'Rocky Linux 9',
- location: '数据中心B-1楼-机柜04-U1',
- tags: '备份,存储',
+ unique_id: 'MW-2024-0008',
+ name: 'Redis 集群 -01',
+ middleware: 'redis',
+ version: '7.0.15',
+ location: '数据中心 B-1 楼 -机柜 04-U1',
+ tags: '缓存,集群',
ip: '192.168.2.103',
remote_access: true,
agent_config: true,
- cpu: '16核 AMD EPYC',
- memory: '64GB',
- disk: '20TB HDD',
- cpu_info: { value: 42, total: '16核', used: '6.7核' },
+ cpu_info: { value: 42, total: '16 核', used: '6.7 核' },
memory_info: { value: 38, total: '64GB', used: '24.3GB' },
- disk_info: { value: 75, total: '20TB', used: '15TB' },
data_collection: true,
status: 'online',
},
{
id: 9,
- unique_id: 'SRV-2024-0009',
- name: 'CI/CD中间件-01',
- type: 'CI/CD中间件',
- os: 'Ubuntu 22.04',
- location: '数据中心A-2楼-机柜07-U1',
- tags: 'CI/CD,Jenkins',
+ unique_id: 'MW-2024-0009',
+ name: 'Tomcat 集群 -01',
+ middleware: 'tomcat',
+ version: '9.0.83',
+ location: '数据中心 A-2 楼 -机柜 07-U1',
+ tags: '应用,集群',
ip: '192.168.1.106',
remote_access: true,
agent_config: true,
- cpu: '8核 Intel Xeon',
- memory: '16GB',
- disk: '500GB SSD',
- cpu_info: { value: 68, total: '8核', used: '5.4核' },
+ cpu_info: { value: 68, total: '8 核', used: '5.4 核' },
memory_info: { value: 75, total: '16GB', used: '12GB' },
- disk_info: { value: 55, total: '500GB', used: '275GB' },
data_collection: true,
status: 'online',
},
{
id: 10,
- unique_id: 'SRV-2024-0010',
- name: '日志中间件-01',
- type: '日志中间件',
- os: 'CentOS Stream 9',
- location: '数据中心B-2楼-机柜12-U1',
- tags: '日志,ELK',
+ unique_id: 'MW-2024-0010',
+ name: 'Kafka 日志 -01',
+ middleware: 'kafka',
+ version: '3.5.2',
+ location: '数据中心 B-2 楼 -机柜 12-U1',
+ tags: '日志,流处理',
ip: '192.168.2.104',
remote_access: true,
agent_config: true,
- cpu: '12核 Intel Xeon',
- memory: '48GB',
- disk: '2TB SSD',
- cpu_info: { value: 0, total: '12核', used: '0核' },
+ cpu_info: { value: 0, total: '12 核', used: '0 核' },
memory_info: { value: 0, total: '48GB', used: '0GB' },
- disk_info: { value: 0, total: '2TB', used: '0TB' },
data_collection: true,
status: 'offline',
},
diff --git a/src/views/ops/pages/dc/network/components/FormDialog.vue b/src/views/ops/pages/dc/network/components/FormDialog.vue
index d9b9e14..b3be647 100644
--- a/src/views/ops/pages/dc/network/components/FormDialog.vue
+++ b/src/views/ops/pages/dc/network/components/FormDialog.vue
@@ -1,7 +1,7 @@
-
-
+
+
-
-
- Windows
- Linux
- 其它
+
+
+ 交换机
+ 路由器
+ 防火墙
+ 负载均衡
+ 无线控制器
+ 其它
+
+
+
+ 华为
+ 华三
+ 思科
+ 深信服
+ F5
+ 锐捷
+ TP-LINK
+ 其它
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SNMP
+ TELNET
+ SSH
+ HTTP
+ HTTPS
+
+
+
+
+
+
+
+
+
+
+
@@ -50,41 +94,6 @@
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1分钟
- 5分钟
- 10分钟
- 30分钟
-
-
-
-
-
()
const confirmLoading = ref(false)
-const selectedLocation = ref('')
const isEdit = computed(() => !!props.record?.id)
const formData = reactive({
unique_id: '',
name: '',
- server_type: '',
- os: '',
- location: '',
- tags: '',
+ type: '',
+ manu: '',
+ model_num: '',
+ protocol: '',
ip: '',
- remote_port: '',
- agent_url: '',
- data_collection: false,
- collection_interval: 5,
+ tags: '',
+ location: '',
remark: '',
})
const rules = {
- name: [{ required: true, message: '请输入办公名称' }],
- server_type: [{ required: true, message: '请选择办公类型' }],
- os: [{ required: true, message: '请选择操作系统' }],
+ name: [{ required: true, message: '请输入设备名称' }],
+ type: [{ required: true, message: '请选择设备类型' }],
+ manu: [{ required: true, message: '请选择厂商' }],
}
-const locationOptions = ref([
- { label: 'A数据中心-3层-24机柜-5U位', value: 'A数据中心-3层-24机柜-5U位' },
- { label: 'A数据中心-3层-24机柜-6U位', value: 'A数据中心-3层-24机柜-6U位' },
- { label: 'B数据中心-1层-12机柜-1U位', value: 'B数据中心-1层-12机柜-1U位' },
- { label: 'B数据中心-1层-12机柜-2U位', value: 'B数据中心-1层-12机柜-2U位' },
- { label: 'C数据中心-2层-8机柜-3U位', value: 'C数据中心-2层-8机柜-3U位' },
-])
-
watch(
() => props.visible,
(val) => {
@@ -158,15 +156,13 @@ watch(
Object.assign(formData, {
unique_id: '',
name: '',
- server_type: '',
- os: '',
- location: '',
- tags: '',
+ type: '',
+ manu: '',
+ model_num: '',
+ protocol: '',
ip: '',
- remote_port: '',
- agent_url: '',
- data_collection: false,
- collection_interval: 5,
+ tags: '',
+ location: '',
remark: '',
})
}
@@ -174,10 +170,6 @@ watch(
}
)
-const handleLocationSelect = (value: string) => {
- formData.location = value
-}
-
const handleOk = async () => {
try {
await formRef.value?.validate()
@@ -208,4 +200,4 @@ const handleCancel = () => {
emit('update:visible', false)
formRef.value?.resetFields()
}
-
+
\ No newline at end of file
diff --git a/src/views/ops/pages/dc/network/config/columns.ts b/src/views/ops/pages/dc/network/config/columns.ts
index e835509..91ab230 100644
--- a/src/views/ops/pages/dc/network/config/columns.ts
+++ b/src/views/ops/pages/dc/network/config/columns.ts
@@ -7,7 +7,7 @@ export const columns = [
},
{
dataIndex: 'unique_id',
- title: '唯一标识',
+ title: 'OID',
width: 150,
},
{
@@ -21,8 +21,13 @@ export const columns = [
width: 120,
},
{
- dataIndex: 'os',
- title: '操作系统',
+ dataIndex: 'manu',
+ title: '厂商',
+ width: 150,
+ },
+ {
+ dataIndex: 'model_num',
+ title: '型号',
width: 150,
},
{
@@ -41,40 +46,15 @@ export const columns = [
width: 150,
},
{
- dataIndex: 'remote_access',
- title: '远程访问',
+ dataIndex: 'protocol',
+ title: '通讯协议',
width: 100,
- slotName: 'remote_access',
},
{
- dataIndex: 'agent_config',
- title: 'Agent配置',
+ dataIndex: 'indicator',
+ title: '网络设备指标',
width: 150,
- slotName: 'agent_config',
- },
- {
- dataIndex: 'cpu',
- title: 'CPU使用率',
- width: 150,
- slotName: 'cpu',
- },
- {
- dataIndex: 'memory',
- title: '内存使用率',
- width: 150,
- slotName: 'memory',
- },
- {
- dataIndex: 'disk',
- title: '硬盘使用率',
- width: 150,
- slotName: 'disk',
- },
- {
- dataIndex: 'data_collection',
- title: '数据采集',
- width: 100,
- slotName: 'data_collection',
+ slotName: 'indicator',
},
{
dataIndex: 'status',
diff --git a/src/views/ops/pages/dc/network/index.vue b/src/views/ops/pages/dc/network/index.vue
index 7471e91..0a27d3b 100644
--- a/src/views/ops/pages/dc/network/index.vue
+++ b/src/views/ops/pages/dc/network/index.vue
@@ -109,29 +109,12 @@
-
-
-
-
- 快捷配置
-
管理
-
-
-
-
- 重启
-
@@ -144,12 +127,6 @@
编辑
-
-
-
-
- 远程控制
-
@@ -195,8 +172,7 @@ import {
import type { FormItem } from '@/components/search-form/types'
import SearchTable from '@/components/search-table/index.vue'
import { searchFormConfig } from './config/search-form'
-import FormDialog from '../pc/components/FormDialog.vue'
-import QuickConfigDialog from '../pc/components/QuickConfigDialog.vue'
+import FormDialog from './components/FormDialog.vue'
import { columns as columnsConfig } from './config/columns'
import {
fetchServerList,
@@ -209,204 +185,116 @@ const router = useRouter()
const mockServerData = [
{
id: 1,
- unique_id: 'SRV-2024-0001',
- name: 'Web网络设备-01',
- type: 'Web网络设备',
- os: 'CentOS 7.9',
- location: '数据中心A-1楼-机柜01-U1',
- tags: 'Web,应用',
- ip: '192.168.1.101',
- remote_access: true,
- agent_config: true,
- cpu: '8核 Intel Xeon',
- memory: '32GB',
- disk: '1TB SSD',
- cpu_info: { value: 45, total: '8核', used: '3.6核' },
- memory_info: { value: 62, total: '32GB', used: '19.8GB' },
- disk_info: { value: 78, total: '1TB', used: '780GB' },
- data_collection: true,
+ unique_id: 'NET-2024-0001',
+ name: '核心交换机 -01',
+ type: '交换机',
+ manu: '华为',
+ model_num: 'CE6857-48S6CQ',
+ location: '数据中心 A-3 层 -24 机柜 -5U 位',
+ tags: '核心,生产',
+ ip: '192.168.1.1',
+ protocol: 'SNMP',
+ indicator: 'CPU:45%,内存:62%',
status: 'online',
},
{
id: 2,
- unique_id: 'SRV-2024-0002',
- name: '数据库网络设备-01',
- type: '数据库网络设备',
- os: 'Ubuntu 22.04',
- location: '数据中心A-1楼-机柜02-U1',
- tags: '数据库,MySQL',
- ip: '192.168.1.102',
- remote_access: true,
- agent_config: true,
- cpu: '16核 AMD EPYC',
- memory: '64GB',
- disk: '2TB NVMe',
- cpu_info: { value: 78, total: '16核', used: '12.5核' },
- memory_info: { value: 85, total: '64GB', used: '54.4GB' },
- disk_info: { value: 92, total: '2TB', used: '1.84TB' },
- data_collection: true,
+ unique_id: 'NET-2024-0002',
+ name: '汇聚路由器 -01',
+ type: '路由器',
+ manu: '思科',
+ model_num: 'ISR4451-X/K9',
+ location: '数据中心 A-3 层 -24 机柜 -6U 位',
+ tags: '汇聚,生产',
+ ip: '192.168.1.2',
+ protocol: 'SNMP',
+ indicator: 'CPU:78%,内存:85%',
status: 'online',
},
{
id: 3,
- unique_id: 'SRV-2024-0003',
- name: '应用网络设备-01',
- type: '应用网络设备',
- os: 'Windows Server 2019',
- location: '数据中心A-2楼-机柜05-U2',
- tags: '应用,.NET',
- ip: '192.168.1.103',
- remote_access: false,
- agent_config: false,
- cpu: '4核 Intel Xeon',
- memory: '16GB',
- disk: '500GB SSD',
- cpu_info: { value: 0, total: '4核', used: '0核' },
- memory_info: { value: 0, total: '16GB', used: '0GB' },
- disk_info: { value: 0, total: '500GB', used: '0GB' },
- data_collection: false,
+ unique_id: 'NET-2024-0003',
+ name: '接入交换机 -01',
+ type: '交换机',
+ manu: '华三',
+ model_num: 'S5560X-54C-EI',
+ location: '数据中心 B-1 层 -12 机柜 -1U 位',
+ tags: '接入,办公',
+ ip: '192.168.2.1',
+ protocol: 'SNMP',
+ indicator: '-',
status: 'offline',
},
{
id: 4,
- unique_id: 'SRV-2024-0004',
- name: '缓存网络设备-01',
- type: '缓存网络设备',
- os: 'CentOS 8.5',
- location: '数据中心A-2楼-机柜06-U1',
- tags: '缓存,Redis',
- ip: '192.168.1.104',
- remote_access: true,
- agent_config: true,
- cpu: '8核 Intel Xeon',
- memory: '32GB',
- disk: '1TB SSD',
- cpu_info: { value: 35, total: '8核', used: '2.8核' },
- memory_info: { value: 68, total: '32GB', used: '21.8GB' },
- disk_info: { value: 42, total: '1TB', used: '420GB' },
- data_collection: true,
+ unique_id: 'NET-2024-0004',
+ name: '防火墙 -01',
+ type: '防火墙',
+ manu: '深信服',
+ model_num: 'AF-2000',
+ location: '数据中心 B-1 层 -12 机柜 -2U 位',
+ tags: '安全,边界',
+ ip: '192.168.1.254',
+ protocol: 'SNMP',
+ indicator: 'CPU:35%,内存:68%',
status: 'online',
},
{
id: 5,
- unique_id: 'SRV-2024-0005',
- name: '文件网络设备-01',
- type: '文件网络设备',
- os: 'Debian 11',
- location: '数据中心B-1楼-机柜03-U1',
- tags: '文件,NFS',
- ip: '192.168.2.101',
- remote_access: true,
- agent_config: true,
- cpu: '12核 Intel Xeon',
- memory: '48GB',
- disk: '10TB HDD',
- cpu_info: { value: 28, total: '12核', used: '3.4核' },
- memory_info: { value: 45, total: '48GB', used: '21.6GB' },
- disk_info: { value: 88, total: '10TB', used: '8.8TB' },
- data_collection: true,
+ unique_id: 'NET-2024-0005',
+ name: '负载均衡器 -01',
+ type: '负载均衡',
+ manu: 'F5',
+ model_num: 'BIG-IP i2800',
+ location: '数据中心 C-2 层 -8 机柜 -3U 位',
+ tags: '负载,应用',
+ ip: '192.168.3.1',
+ protocol: 'SNMP',
+ indicator: 'CPU:28%,内存:45%',
status: 'maintenance',
},
{
id: 6,
- unique_id: 'SRV-2024-0006',
- name: '测试网络设备-01',
- type: '测试网络设备',
- os: 'CentOS 7.9',
- location: '数据中心B-2楼-机柜10-U1',
- tags: '测试,开发',
- ip: '192.168.2.102',
- remote_access: false,
- agent_config: false,
- cpu: '4核 Intel Xeon',
- memory: '8GB',
- disk: '256GB SSD',
- cpu_info: { value: 0, total: '4核', used: '0核' },
- memory_info: { value: 0, total: '8GB', used: '0GB' },
- disk_info: { value: 0, total: '256GB', used: '0GB' },
- data_collection: false,
+ unique_id: 'NET-2024-0006',
+ name: '无线控制器 -01',
+ type: '无线控制器',
+ manu: '锐捷',
+ model_num: 'WS6008',
+ location: '数据中心 A-1 层 -05 机柜 -8U 位',
+ tags: '无线,办公',
+ ip: '192.168.4.1',
+ protocol: 'SNMP',
+ indicator: '-',
status: 'retired',
},
{
id: 7,
- unique_id: 'SRV-2024-0007',
- name: '监控网络设备-01',
- type: '监控网络设备',
- os: 'Ubuntu 20.04',
- location: '数据中心A-1楼-机柜08-U1',
- tags: '监控,Prometheus',
- ip: '192.168.1.105',
- remote_access: true,
- agent_config: true,
- cpu: '8核 Intel Xeon',
- memory: '32GB',
- disk: '1TB SSD',
- cpu_info: { value: 55, total: '8核', used: '4.4核' },
- memory_info: { value: 72, total: '32GB', used: '23.0GB' },
- disk_info: { value: 65, total: '1TB', used: '650GB' },
- data_collection: true,
+ unique_id: 'NET-2024-0007',
+ name: '光模块交换机 -01',
+ type: '交换机',
+ manu: '华为',
+ model_num: 'CE8850-64CQ-EI',
+ location: '数据中心 A-2 层 -15 机柜 -10U 位',
+ tags: '高速,存储网络',
+ ip: '192.168.5.1',
+ protocol: 'SNMP',
+ indicator: 'CPU:55%,内存:72%',
status: 'online',
},
{
id: 8,
- unique_id: 'SRV-2024-0008',
- name: '备份网络设备-01',
- type: '备份网络设备',
- os: 'Rocky Linux 9',
- location: '数据中心B-1楼-机柜04-U1',
- tags: '备份,存储',
- ip: '192.168.2.103',
- remote_access: true,
- agent_config: true,
- cpu: '16核 AMD EPYC',
- memory: '64GB',
- disk: '20TB HDD',
- cpu_info: { value: 42, total: '16核', used: '6.7核' },
- memory_info: { value: 38, total: '64GB', used: '24.3GB' },
- disk_info: { value: 75, total: '20TB', used: '15TB' },
- data_collection: true,
+ unique_id: 'NET-2024-0008',
+ name: '管理交换机 -01',
+ type: '交换机',
+ manu: 'TP-LINK',
+ model_num: 'TL-SG3428',
+ location: '数据中心 B-2 层 -18 机柜 -12U 位',
+ tags: '管理,带外',
+ ip: '192.168.100.1',
+ protocol: 'SNMP',
+ indicator: 'CPU:42%,内存:38%',
status: 'online',
},
- {
- id: 9,
- unique_id: 'SRV-2024-0009',
- name: 'CI/CD网络设备-01',
- type: 'CI/CD网络设备',
- os: 'Ubuntu 22.04',
- location: '数据中心A-2楼-机柜07-U1',
- tags: 'CI/CD,Jenkins',
- ip: '192.168.1.106',
- remote_access: true,
- agent_config: true,
- cpu: '8核 Intel Xeon',
- memory: '16GB',
- disk: '500GB SSD',
- cpu_info: { value: 68, total: '8核', used: '5.4核' },
- memory_info: { value: 75, total: '16GB', used: '12GB' },
- disk_info: { value: 55, total: '500GB', used: '275GB' },
- data_collection: true,
- status: 'online',
- },
- {
- id: 10,
- unique_id: 'SRV-2024-0010',
- name: '日志网络设备-01',
- type: '日志网络设备',
- os: 'CentOS Stream 9',
- location: '数据中心B-2楼-机柜12-U1',
- tags: '日志,ELK',
- ip: '192.168.2.104',
- remote_access: true,
- agent_config: true,
- cpu: '12核 Intel Xeon',
- memory: '48GB',
- disk: '2TB SSD',
- cpu_info: { value: 0, total: '12核', used: '0核' },
- memory_info: { value: 0, total: '48GB', used: '0GB' },
- disk_info: { value: 0, total: '2TB', used: '0TB' },
- data_collection: true,
- status: 'offline',
- },
]
// 状态管理