Send netdisco-users mailing list submissions to
netdisco-users@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
netdisco-users-requ...@lists.sourceforge.net
You can reach the person managing the list at
netdisco-users-ow...@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:
1. Re: Netdisco Reports question (Brian Kelly)
--- Begin Message ---
Very cool! Added that one to my config!
I’ll share one here too in case anyone is interested. It’s a report that finds
any interfaces that haven’t been used in a period of time. I do hardcode some
devices to ignore that I didn’t want included in the report.
BK
—
reports:
- tag: unused_access_ports_18_months
category: Port
label: 'Unused Configured Access Ports (18 months)'
columns:
- { host: Device_name}
- { ip: ip}
- { port: Port}
- { name: Description}
- { vlan: VLAN}
- { pvid: PVID}
- { status: Status}
- { status_admin: 'Status Admin'}
- { last_change: 'Last change'}
query: |
SELECT device.name AS host,
device_port.ip,
device_port.port,
device_port.name,
device_port.vlan,
device_port.pvid,
device_port.up AS status,
device_port.up_admin AS status_admin,
to_char(
(device.last_discover - (device.uptime -
device_port.lastchange) / 100 * interval '1 second'),
'YYYY-MM-DD HH24:MI:SS'
) as last_change
FROM device_port
LEFT JOIN device ON device_port.ip = device.ip
WHERE device_port.up = 'down'
AND device_port.up_admin = 'up'
AND device.name NOT LIKE '%-CS%'
AND device.name NOT LIKE '%-AS%'
AND device_port.port NOT LIKE '%Vlan%'
AND (
device_port.pvid != '1'
AND
device_port.vlan != '1'
)
AND ( device.last_discover
- (device.uptime - device_port.lastchange) / 100 *
interval '1 second')
< (now() - interval '18 months'
)
ORDER BY host, device_port
—
> On Mar 7, 2023, at 4:59 AM, Oliver Gorwits <oli...@cpan.org> wrote:
>
> Great news! thanks for the update :)
>
> I could add this to standard reports in next release
>
> regards
> Oliver
>
> On Tue, 7 Mar 2023 at 09:45, Muris <alcat...@gmail.com
> <mailto:alcat...@gmail.com>> wrote:
> Hey all I managed to get this to work, a space was the issue, it’s quite
> picky how you space it out, here is a report I’ve done for this which reports
> devices added into netdisco the past 2 months sorted by latest date, this is
> added into the deployment.yml file under reports section, then at the top you
> will get an extra menu in the web interface under Device > Recent Devices
> added past 2 months
>
>
>
> reports:
>
> - tag: recent
>
> category: Device
>
> label: 'Recent Devices Added Past 2 months'
>
> columns:
>
> - {ip: 'Device IP'}
>
> - {name: 'Device Name'}
>
> - {creation: 'Date Added'}
>
> - {location: 'Location'}
>
> - {contact: 'Contact'}
>
> - {serial: 'Serial'}
>
> - {model: 'Model'}
>
> - {vendor: 'Vendor'}
>
> - {os: 'Operating System'}
>
> - {os_ver: 'OS Version'}
>
> query: |
>
> SELECT ip AS ip, name AS name, creation AS creation, location AS
> location, contact AS contact, serial AS serial, model AS model, vendor AS
> vendor, os AS os, os_ver AS os_ver
>
> FROM device
>
> WHERE creation > now() - interval '8 weeks'
>
> ORDER BY creation DESC
>
>
>
>
>
> From: Muris <alcat...@gmail.com <mailto:alcat...@gmail.com>>
> Date: Tuesday, 28 February 2023 at 23:06
> To: "netdisco-users@lists.sourceforge.net
> <mailto:netdisco-users@lists.sourceforge.net>"
> <netdisco-users@lists.sourceforge.net
> <mailto:netdisco-users@lists.sourceforge.net>>
> Subject: Netdisco Reports question
>
>
>
> Hi,
>
>
>
> Im trying to do a web report for the following SQL query which lists devices
> recently added into net disco for past 2 weeks
>
>
>
> netdisco-do psql -e "select ip, name from device where creation > now() -
> interval '2 weeks'"
>
>
>
> In the deployment YML I have something like this, which doesn’t work, any
> ideas?
>
>
>
> - tag: recent
>
> label: 'Recent Devices Added past 2 weeks'
>
> category: Device
>
> columns:
>
> - {ip: 'Device IP'}
>
> - {name: 'Device Name'}
>
> query: |
>
> SELECT ip, name,
>
> FROM device
>
> WHERE creation > now() - interval '2 weeks'
>
> ORDER by name
>
> _______________________________________________
> Netdisco mailing list
> netdisco-users@lists.sourceforge.net
> <mailto:netdisco-users@lists.sourceforge.net>
> https://sourceforge.net/p/netdisco/mailman/netdisco-users/
> <https://sourceforge.net/p/netdisco/mailman/netdisco-users/>_______________________________________________
> Netdisco mailing list
> netdisco-users@lists.sourceforge.net
> https://sourceforge.net/p/netdisco/mailman/netdisco-users/
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users