feat: add Syslog configuration to Network Services (v0.10.8 Beta)
New Syslog page under Network Services exposes RouterOS logging actions and routing rules with full CRUD. Logging actions define destinations (remote syslog server, memory, disk, echo); logging rules define which topics route to which action. Single Device and All Devices modes are functionally identical — All Devices applies changes across every online device in parallel and shows per-entry coverage badges indicating which devices have each action or rule. Toggle enable/disable works in both modes. Remote actions display address:port with facility/severity in a single Destination column; memory/disk/echo rows show no irrelevant remote fields. Syslog KPI card added to the Network Services overview.
This commit is contained in:
@@ -2476,6 +2476,44 @@ export class DeviceCollector {
|
||||
}
|
||||
}
|
||||
|
||||
// Syslog (logging actions + rules) ───────────────────────────────────────────
|
||||
|
||||
async getSyslogActions(): Promise<Record<string, string>[]> {
|
||||
return this.client.execute('/system/logging/action/print', { detail: '' }).catch(() => [] as Record<string, string>[]);
|
||||
}
|
||||
|
||||
async addSyslogAction(params: Record<string, string>): Promise<void> {
|
||||
await this.client.execute('/system/logging/action/add', params);
|
||||
}
|
||||
|
||||
async updateSyslogAction(id: string, params: Record<string, string>): Promise<void> {
|
||||
await this.client.execute('/system/logging/action/set', { '.id': id, ...params });
|
||||
}
|
||||
|
||||
async removeSyslogAction(id: string): Promise<void> {
|
||||
await this.client.execute('/system/logging/action/remove', { '.id': id });
|
||||
}
|
||||
|
||||
async getSyslogRules(): Promise<Record<string, string>[]> {
|
||||
return this.client.execute('/system/logging/print', { detail: '' }).catch(() => [] as Record<string, string>[]);
|
||||
}
|
||||
|
||||
async addSyslogRule(params: Record<string, string>): Promise<void> {
|
||||
await this.client.execute('/system/logging/add', params);
|
||||
}
|
||||
|
||||
async updateSyslogRule(id: string, params: Record<string, string>): Promise<void> {
|
||||
await this.client.execute('/system/logging/set', { '.id': id, ...params });
|
||||
}
|
||||
|
||||
async removeSyslogRule(id: string): Promise<void> {
|
||||
await this.client.execute('/system/logging/remove', { '.id': id });
|
||||
}
|
||||
|
||||
async toggleSyslogRule(id: string, disabled: boolean): Promise<void> {
|
||||
await this.client.execute('/system/logging/set', { '.id': id, 'disabled': disabled ? 'yes' : 'no' });
|
||||
}
|
||||
|
||||
// WireGuard ───────────────────────────────────────────────────────────────────
|
||||
|
||||
async getWireGuardInterfaces(): Promise<Record<string, string>[]> {
|
||||
|
||||
Reference in New Issue
Block a user