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 (Muris)
2. Re: Netdisco Reports question (Oliver Gorwits)
--- Begin Message ---
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>
Date: Tuesday, 28 February 2023 at 23:06
To: "netdisco-users@lists.sourceforge.net"
<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
--- End Message ---
--- Begin Message ---
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> 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>
> *Date: *Tuesday, 28 February 2023 at 23:06
> *To: *"netdisco-users@lists.sourceforge.net" <
> 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
> 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