From c033687ec16f5c895f0b269223cd0b09c80f5230 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 6 Mar 2023 17:14:03 +0000 Subject: [PATCH] #921 Devices with Multiple Addresses report --- share/config.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/share/config.yml b/share/config.yml index 83902506..3f092dc7 100644 --- a/share/config.yml +++ b/share/config.yml @@ -174,11 +174,11 @@ system_reports: label: 'Error Disabled Ports' category: Port columns: - - { ip: Device } - - { dns: DNS } - - { port: Port } - - { name: Description } - - { reason: Reason } + - { ip: Device } + - { dns: DNS } + - { port: Port } + - { name: Description } + - { reason: Reason } query: | SELECT dp.ip, d.dns, dp.port, dp.name, properties.error_disable_cause AS reason FROM device_port dp @@ -186,6 +186,21 @@ system_reports: LEFT JOIN device d USING (ip) WHERE properties.error_disable_cause IS NOT NULL ORDER BY dp.ip, dp.port + - tag: deviceaddresscount + label: 'Devices with Multiple Addresses' + category: Device + columns: + - { 'ip': 'Device IP', _searchable: true } + - { 'devname': 'Name' } + - { 'count': 'Addresses Count' } + - { 'contact': 'Contact' } + - { 'location': 'Location' } + query: | + SELECT ip, COALESCE(NULLIF(device.dns,''), NULLIF(name,''), '(none)') AS devname, count(alias), contact, location + FROM device_ip LEFT JOIN device USING (ip) + GROUP BY ip, devname, contact, location + HAVING count(alias) > 1 + ORDER BY count(alias) DESC table_pagesize: 10 table_showrecordsmenu: - [10, 25, 50, 100, '-1']