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: [EXTERNAL MSG:]Re:  Adding Community String
      (Christopher Doolan)
   2. Re: perl script for custom reports (Michael Butash)
--- Begin Message ---
Hi Denny, this worked for me:

device_auth:
   - tab: 'default_v2_readonly'
     community: 'PRIVATE'
     read: true
     write: false

Regards
Chris

From: Denny Sabu <denny.s...@sensato.co>
Sent: Saturday, 26 June 2021 12:00 AM
To: Miha Kralj <miha.kr...@gmail.com>
Cc: netdisco-users@lists.sourceforge.net
Subject: Re: [Netdisco] [EXTERNAL MSG:]Re: Adding Community String

Hi,

I am still getting the same "Could not SNMP connect to [IP]" error when trying 
to do a discover scan.

The syntax matches - Are there any other debugging steps or resources I can use 
to help resolve this?

From: Miha Kralj <miha.kr...@gmail.com<mailto:miha.kr...@gmail.com>>
Date: Wednesday, June 23, 2021 at 2:14 AM
To: Denny Sabu <denny.s...@sensato.co<mailto:denny.s...@sensato.co>>
Cc: 
netdisco-users@lists.sourceforge.net<mailto:netdisco-users@lists.sourceforge.net>
 
<netdisco-users@lists.sourceforge.net<mailto:netdisco-users@lists.sourceforge.net>>
Subject: [EXTERNAL MSG:]Re: [Netdisco] Adding Community String
WARNING: This email originated from outside of Sensato. Do not click links or 
open attachments unless you verify by phone with the sender.

Hi,
the syntax should be like:

device_auth:
  - tag: 'default_v2_readonly'
    community: 'public'
    community: 'blah1'
    community: 'blah2'

On Tue, Jun 22, 2021 at 9:41 PM Denny Sabu 
<denny.s...@sensato.co<mailto:denny.s...@sensato.co>> wrote:
Hello All,

I'm trying to add a community string to the deployments.yml file,

I've added a community tag

community:
 - public
- private
- ******

This doesn't seem to work, so I also added to the device_auth section:

device_auth
[...]
- tag: "private_str"
community: '*****'
read: true
write: false

However, netdisco doesn't seem to be able to connect.

I can snmpwalk the machine from the same server with the community string and 
it connects, but a ./netdisco-do discover -d [IP] ends with "Could not SNMP 
connect to [IP]"

Thanks in advance.
_______________________________________________
Netdisco mailing list
netdisco-users@lists.sourceforge.net<mailto:netdisco-users@lists.sourceforge.net>
https://sourceforge.net/p/netdisco/mailman/netdisco-users/
__________________________________________________________________

This email (including any attached files) is confidential and is 

for the intended recipient(s) only. If you received this email by 

mistake, please, as a courtesy, tell the sender, then delete this 

email.

The views and opinions are the originator's and do not necessarily 

reflect those of the University of Southern Queensland. Although 

all reasonable precautions were taken to ensure that this email 

contained no viruses at the time it was sent we accept no 

liability for any losses arising from its receipt.

The University of Southern Queensland is a registered provider 

of education with the Australian Government.

(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081)

--- End Message ---
--- Begin Message ---
Thank you for adding this Oliver!

I spent some time being not a developer to futz with building new
reporting, and made a basic report that's been on my wish list for some
time to just dump some raw data, which is awesome.  I'll include below,
pretty weak, but my needs are few.

Second ambition was trying to create a better node report for device
inventory.  I really like the node view, but it annoys me to death IP isn't
listed with the node to sort on.  I was trying to look at replicating the
built-in node/NetBIOS Inventory report to at least dump out raw data, with
an IP address.  It raised questions like how to create sub menus like you
do with entering a list of nb domains, and navigation if even possible.  Is
it?

I have to relearn sql every so often among years how to navigate around
postgres, write queries, and I always feel stupid, but I don't do it enough
to commit to memory as I'll not deal with it for another 3-5 years.  Not
sure if easier to make a new, probably inferior report, or fix the original
to just include a missing IP column.  I was trying to figure out where
report code was generated for the internal functions built-in, but figure
I'd just ask - where might I find this to tweak upon (and/or actually
recommend an update)?

Also around the reports added to deployment.yml, is it possible to glob
column data together, say for example like the NetBIOS Inventory report the
whole '\\$nbdomain\$nbname', or even where that gets globed in with
$node_nbt.nbuser@$node_ip.ip to include in output?  I am not a dev, pretty
crappy at it actually as not a proud network engineer, but rather than spit
out a bunch of csv to import into libreoffice, and write a bunch of calc
scripts to generate device configs to paste directly as one less step.

I'm sure folks will probably disapprove of my sql query of a jackass, but
for the random googling "make sql query go", works for me.  If someone
wants to fix it or do it better, cool too, I might learn something about
how I did this with crap sql queries that could be better by a not dev/sql
guy.  I've needed an export of devices with all their data, and not found
anything quite like it.  My braindead report experiment is sort of a
feature request of mine for years as meager as it is, I did today playing
with this, so winning!

I have other issues with my attempts around nbt in multiple tables to
combine data, but I'm sure this is just my being stupid with sql while I
(re)learn, so will hold that for later.  :)

reports:
  - tag: deviceshowallinventory
    label: 'Device Show All Inventory'
    category: Device
    columns:
    - { name: Device_Name}
    - { ip: IP}
    - { dns: FQDN}
    - { vendor: Vendor}
    - { os: Operating_System}
    - { os_ver: OS_Version}
    - { serial: Serial_Number}
    - { last_discover: Last_Discovery}
    query: |
      SELECT name AS name, ip AS ip, dns AS dns, vendor AS vendor, os AS
os, os_ver AS os_ver, serial AS serial, last_discover AS last_discover
        FROM device
      ORDER BY name

-mb

On Wed, Jun 23, 2021 at 1:59 PM Oliver Gorwits <oli...@cpan.org> wrote:

> A wiki page might do as well - can be collaboratively edited with
> suggested reports and grouped by topic similar to the menus
>
> ....time passes...
>
> I created one :) https://github.com/netdisco/netdisco/wiki/Custom-Reports
>
> On Wed, 23 Jun 2021 at 21:36, Michael Butash <mich...@butash.net> wrote:
>
>> Probably nice to make a /contrib directory for these folks could drop
>> into a repo for other user-created reports they find useful.
>>
>> Reading this thread, I was wondering about looking at making a custom
>> report to fix nbt node views.  It's really quite annoying it doesn't give
>> the ip address in the main view, would be nice to add a like report with
>> just that if not adding to the existing one.
>>
>> -mb
>>
>>
>> On Tue, Jun 22, 2021 at 11:23 PM Miha Kralj <miha.kr...@gmail.com> wrote:
>>
>>> Another nice report is for finding all ports that are: Port down, Admin
>>> Up, for 2 months
>>> This means that ports are not used for at least 2 months and for
>>> security reasons should be shut down.
>>> The time range is configurable inside the query.
>>>
>>> reports:
>>>   - tag: portsdownall
>>>     label: 'Port down, Admin Up - 2 months'
>>>     category: Port
>>>     columns:
>>>     - { host: Device_name}
>>>     - { ip: ip}
>>>     - { port: Port}
>>>     - { name: Description}
>>>     - { 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.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_port.port NOT LIKE '%Vlan%'
>>>         AND (device.last_discover - (device.uptime -
>>> device_port.lastchange) /
>>>         100 * interval '1 second') < (now() - interval '2 month')
>>>
>>> On Wed, Jun 23, 2021 at 8:07 AM Muris <alcat...@gmail.com> wrote:
>>>
>>>> Does anyone else have any other handy custom reports they can share?
>>>>
>>>>
>>>>
>>>> *From: *Miha Kralj <miha.kr...@gmail.com>
>>>> *Date: *Wednesday, 23 June 2021 at 15:20
>>>> *To: *Ruben Moretti <news.liste...@googlemail.com>
>>>> *Cc: *<netdisco-users@lists.sourceforge.net>
>>>> *Subject: *Re: [Netdisco] perl script for custom reports
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> There is a simple way to make custom reports...
>>>>
>>>> My way to create custom reports is to place yml code at the end in
>>>> environments/deployment.yml file like this:
>>>>
>>>>
>>>>
>>>> reports:
>>>>
>>>>   - tag: List_of_devices
>>>>
>>>>     label: 'List of devices'
>>>>
>>>>     category: Device
>>>>
>>>>     columns:
>>>>
>>>>     - { name: Device}
>>>>
>>>>     - { ip: ip}
>>>>
>>>>     - { creation: First_seen}
>>>>
>>>>     - { last_discover: Last_discover}
>>>>
>>>>     query: |
>>>>
>>>>       SELECT name, ip, creation::timestamp(0),
>>>> last_discover::timestamp(0) from device
>>>>
>>>>         ORDER BY name
>>>>
>>>>
>>>>
>>>> After that you can find a report on the web interface "Reports -- >
>>>> Device -- > List of devices".
>>>>
>>>> I hope it helps.
>>>>
>>>>
>>>>
>>>> On Sun, Jun 20, 2021 at 3:31 PM Ruben Moretti via netdisco-users <
>>>> netdisco-users@lists.sourceforge.net> wrote:
>>>>
>>>> Hello !
>>>>
>>>> Can anyone post some simple perl script example  for them ?
>>>>
>>>> Thanks a lot.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> https://github.com/netdisco/netdisco/wiki/Configuration#reports
>>>>
>>>> You can munge the data retrieved from the database by placing a Perl
>>>> script with the same name as the reports key into the “site_plugins”
>>>> directory of Netdisco’s home area. The script can access $config for
>>>> its configuration and @data for the retrieved data. It should return a
>>>> list of munged data
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Netdisco mailing list
>>>> netdisco-users@lists.sourceforge.net
>>>> https://sourceforge.net/p/netdisco/mailman/netdisco-users/
>>>>
>>>> _______________________________________________
>>> Netdisco mailing list
>>> netdisco-users@lists.sourceforge.net
>>> 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

Reply via email to