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: Reports > Device > By Location Issue (Sassan Dibadj)
   2. Problems with netdisco-db-deploy !! (Russos Andrea)
   3. Re: Problems with netdisco-db-deploy !! (Oliver Gorwits)
   4. report for number of ports connected at 10/100/1000 ?
      (Joseph Bernard)
   5. Re: report for number of ports connected at 10/100/1000 ?
      (Joseph Bernard)
   6. Automated switch change digest email scripts (Brian Marshall)
--- Begin Message ---
The report is now fixed, thank you Oliver!

-----Original Message-----
From: Oliver Gorwits [mailto:oli...@cpan.org] 
Sent: Tuesday, October 07, 2014 12:51 PM
To: netdisco-users@lists.sourceforge.net
Subject: Re: [Netdisco] Reports > Device > By Location Issue


Sorry about this - I found the bug.

You can install version 2.029011 when it appears on CPAN shortly.

regards,
oliver.

On 2014-10-07 16:13, Sassan Dibadj wrote:
> I'm having the same issue since upgrading. I ran the fix below, 
> re-deployed, rebooted and still have a blank device by location 
> report. All other reports work fine and everything else appears 
> normal.
>
> -----Original Message-----
> From: Oliver Gorwits [mailto:oli...@cpan.org]
> Sent: Tuesday, October 07, 2014 2:43 AM
> To: netdisco-users@lists.sourceforge.net
> Subject: Re: [Netdisco] Reports > Device > By Location Issue
>
> Hi Robert,
>
> Are any other of the pages working at all? Can you run the 
> netdisco-deploy script OK?
>
> It's just that another user found an issue when upgrading and I'm 
> surprised you didn't trip over it too. The fix is to run:
>
> ~netdisco/bin/localenv cpanm --notest --force DBIx::Class@0.08270
>
> regards,
> oliver.
>
> On 2014-10-06 18:52, Robert Beer wrote:
>> I just upgraded to 2.029009 an the Reports > Device > By Location 
>> screen is blank.  I turned on logging and this error came out:
>>
>> [11451] 2014-10-06 15:32:44 error request to GET /ajax/userlog
>> crashed: Can't call method "status" on unblessed reference at 
>> /home/netdisco/perl5/lib/perl5/App/Netdisco/Web/PortControl.pm line 
>> 70.
>
>
>
>
> ________________________________
>
> UT Southwestern Medical Center
> The future of medicine, today.




--- End Message ---
--- Begin Message ---
Hai all !! 

i'm trying to setup a fresh install of netdisco 2 on a Centos 6.5 64bit. 
I'm following this official guide 
http://search.cpan.org/~oliver/App-Netdisco-2.008000/lib/App/Netdisco.pm 

I'm facing a problem with some perl module .....i'm delaing with this command 
"~/bin/netdisco-deploy" which exit with this output: 

...... 
Would you like to deploy or upgrade your database schema? [y/N]: y 
DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently 
unversioned. Please call upgrade on your schema to sync the DB. at 
/home/netdisco/perl5/lib/perl5/Dancer/Plugin/DBIC.pm line 62 
DBIx::Class::Storage:BI::catch {...} (): DBIx::Class::Storage:BI::try {...} (): 
DBI Exception (unhandled by DBIC, ::Schema GCed): DBD:g:b do failed: ERROR: 
current transaction is aborted, commands ignored until end of transaction block 
at /home/netdisco/perl5/bin/netdisco-db-deploy line 88 
(running "CREATE TABLE dbix_class_schema_versions ( 
version character varying(10) NOT NULL, 
installed character varying(20) NOT NULL, 
PRIMARY KEY (version) 
)") at /home/netdisco/perl5/bin/netdisco-db-deploy line 88 
DBIx::Class::Storage:BI::_dbh_execute(): DBI Exception (unhandled by DBIC, 
::Schema GCed): DBD:g::st execute failed: ERROR: current transaction is 
aborted, commands ignored until end of transaction block [for Statement "INSERT 
INTO dbix_class_schema_versions ( installed, version) VALUES ( ?, ? )" with 
ParamValues: 1='v20141007_083957.898', 2='1'] at 
/home/netdisco/perl5/bin/netdisco-db-deploy line 88 
DB schema update complete. 
DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently 
unversioned. Please call upgrade on your schema to sync the DB. at 
/home/netdisco/perl5/lib/perl5/Dancer/Plugin/DBIC.pm line 62 
DBIx::Class::Storage:BI::_dbh_execute(): DBI Exception (unhandled by DBIC, 
::Schema GCed): DBD:g::st execute failed: ERROR: relation "users" does not 
exist 
LINE 1: SELECT COUNT( * ) FROM users me WHERE ( admin ) 
^ [for Statement "SELECT COUNT( * ) FROM users me WHERE ( admin )"] at 
/home/netdisco/bin/netdisco-deploy line 129 
..... 

I'm noto so good in soving perl modules problems ...so i'm asking some help in 
solving this issue !! 

Thanks a lot in advance!! 

--Andrea 



--- End Message ---
--- Begin Message ---
Hi Andrea,

Please follow the latest instructions, here:

   https://metacpan.org/pod/App::Netdisco

There are additional steps which I think will resolve your problem.

regards
oliver.

On 2014-10-08 11:14, Russos Andrea wrote:
Hai all !!

i'm trying to setup a fresh install of netdisco 2 on a Centos 6.5
64bit.
I'm following this official guide

http://search.cpan.org/~oliver/App-Netdisco-2.008000/lib/App/Netdisco.pm

I'm facing a problem with some perl module .....i'm delaing with this
command "~/bin/netdisco-deploy" which exit with this output:

......
Would you like to deploy or upgrade your database schema? [y/N]: y
DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently
unversioned. Please call upgrade on your schema to sync the DB. at
/home/netdisco/perl5/lib/perl5/Dancer/Plugin/DBIC.pm line 62
DBIx::Class::Storage:BI::catch {...} (): DBIx::Class::Storage:BI::try
{...} (): DBI Exception (unhandled by DBIC, ::Schema GCed): DBD:g:b do
failed: ERROR: current transaction is aborted, commands ignored until
end of transaction block at
/home/netdisco/perl5/bin/netdisco-db-deploy line 88
 (running "CREATE TABLE dbix_class_schema_versions (
 version character varying(10) NOT NULL,
 installed character varying(20) NOT NULL,
 PRIMARY KEY (version)
)") at /home/netdisco/perl5/bin/netdisco-db-deploy line 88
DBIx::Class::Storage:BI::_dbh_execute(): DBI Exception (unhandled by
DBIC, ::Schema GCed): DBD:g::st execute failed: ERROR: current
transaction is aborted, commands ignored until end of transaction
block [for Statement "INSERT INTO dbix_class_schema_versions (
installed, version) VALUES ( ?, ? )" with ParamValues:
1='v20141007_083957.898', 2='1'] at
/home/netdisco/perl5/bin/netdisco-db-deploy line 88
DB schema update complete.
DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently
unversioned. Please call upgrade on your schema to sync the DB. at
/home/netdisco/perl5/lib/perl5/Dancer/Plugin/DBIC.pm line 62
DBIx::Class::Storage:BI::_dbh_execute(): DBI Exception (unhandled by
DBIC, ::Schema GCed): DBD:g::st execute failed: ERROR: relation
"users" does not exist
LINE 1: SELECT COUNT( * ) FROM users me WHERE ( admin )
 ^ [for Statement "SELECT COUNT( * ) FROM users me WHERE ( admin )"]
at /home/netdisco/bin/netdisco-deploy line 129
.....

I'm noto so good in soving perl modules problems ...so i'm asking some
help in solving this issue !!

Thanks a lot in advance!!

--Andrea




--- End Message ---
--- Begin Message ---
I’m running Netdisco 1.1 at the moment.  How hard would it be to make a report 
to show me the number of connected ports at 10Mbps, at 100Mbps, and at 
1000Mbps?  I just need the counts.  I can install Netdisco 2 if it would be way 
easier to do this kind of thing with that.

Thanks,
Joseph B.




--- End Message ---
--- Begin Message ---
That is perfect!  I have exactly what I need.

Thanks!
Joseph B.

On Oct 8, 2014, at 12:09 PM, Brian Marshall <br...@netcents.com> wrote:

> If you know SQL then doing ad-hoc reports in netdisco is super easy
> go into your postgres database with psql (eg. "psql netdisco netdisco" in my 
> case) and run the following:
> 
> select count(*), speed from device_port where up = 'up' group by speed;
> 
> That's the result of 2 minutes work, so anyone feel free to correct me if I'm 
> wrong
> 
>   -Brian Marshall
> 
> On 10/8/2014 7:32 AM, Joseph Bernard wrote:
>> I’m running Netdisco 1.1 at the moment.  How hard would it be to make a 
>> report to show me the number of connected ports at 10Mbps, at 100Mbps, and 
>> at 1000Mbps?  I just need the counts.  I can install Netdisco 2 if it would 
>> be way easier to do this kind of thing with that.
>> 
>> Thanks,
>> Joseph B.
>> 
>> 
>> ------------------------------------------------------------------------------
>> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
>> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
>> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
>> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Netdisco mailing list
>> netdisco-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/netdisco-users
>> 
> 




--- End Message ---
--- Begin Message ---
Hey list,

I've created a pair of scripts to mail out a list of connection change digests to myself and my team. First script is called by the second script. It tells you anything that has been added or changed in the last 24h and anything that has been off the network for a week. It assumes you are in 10.0.0.0/8 carving it up by /16 so the third octet is a variable, but that should be easy to hack around. There is also some special logic in there to take HP MSM WAP clients out of the results, and another bit attempting to suppress multiple results coming through from unmanaged switches, but other than that its not too weird. I call the email_port_change_digests.sh script from a cron job every morning.
Hope someone finds it useful!

FILE 1 - email_port_change_digest.sh:

#!/bin/bash
output=`/usr/bin/psql netdisco netdisco -c "select 'Connected' as Change_Type, d.ip as Switch_IP, d.name as switch_name, d.location as switch_location, ni.ip as discovered_ip, nbt.nbname as computer_name, n.port, ni.mac, oui.company from device as d join node as n on d.ip = n.switch inner join (select mac, max(time_ last) as time_last from node where active = 't' group by mac) as niu on n.mac = niu.mac and n.time_last = niu.time_last join node_ip as ni on n.mac = ni.mac left outer join node_nbt as nbt on ni.mac = nbt.mac left outer join oui on n.oui = oui.oui where ni.active = 't' and ni.time_first > now() - interval '1 day' a nd inet '10.$1.0.0/16' >> d.ip and text(d.ip) || '_' || text(n.port) not in (select text(ip) || '_' || text(port) from device_port where remote_type like '%AP%' or remote_type like '%MSM4%') UNION ALL select 'Disconnected' as Change_Type, d.ip as Switch_IP, d.name as switch_name, d.location as switch_location, ni.i p as discovered_ip, nbt.nbname as computer_name, n.port, ni.mac, oui.company from device as d join node as n on d.ip = n.switch join node_ip as ni on n.mac = ni.mac inner join (select mac, max(time_last) as time_last from node where active = 't' group by mac) as niu on n.mac = niu.mac and n.time_last = niu.time_la st left outer join node_nbt as nbt on ni.mac = nbt.mac left outer join oui on n.oui = oui.oui where ni.time_last between now() - interval '7 days' and now() - interval '6 day' and inet '10.$1.0.0/16' >> d.ip and text(d.ip) || '_' || text(n.port) not in (select text(ip) || '_' || text(port) from device_port where rem ote_type like '%AP%' or remote_type like '%MSM4%') and ni.mac not in (select mac from node where time_last > now() - interval '6 day') and nbt.nbname not in (select nbname from node_nbt where time_last > now() - interval '6 day');" -H | sed '1i<html>' | sed ' $a <\/html>'`
if (echo $output | grep '<p>(0 rows)<br />' >> /dev/null); then

if (echo $output | grep '<p>(0 rows)<br />' >> /dev/null); then
        echo "No rows!" >> /dev/null
else
echo $output | mail -s "Daily Switch Change Digest - $3" -a 'Content-type: text/html; charset="iso-8859-1"' $2
fi


FILE 2 - email_port_change_digests.sh:

#!/bin/bash

# Team Lead
/usr/share/netdisco/email_port_change_digest.sh 8 teaml...@example.com "Site 1" /usr/share/netdisco/email_port_change_digest.sh 9 teaml...@example.com "Site 2" /usr/share/netdisco/email_port_change_digest.sh 10 teaml...@example.com "Site 3 /usr/share/netdisco/email_port_change_digest.sh 17 teaml...@example.com "Site 4" /usr/share/netdisco/email_port_change_digest.sh 37 teaml...@example.com "Site 5" /usr/share/netdisco/email_port_change_digest.sh 38 teaml...@example.com "Site 6" /usr/share/netdisco/email_port_change_digest.sh 39 teaml...@example.com "Site 7"

# Site 1
/usr/share/netdisco/email_port_change_digest.sh 8 g...@example.com "Site 1"

# Site 2
/usr/share/netdisco/email_port_change_digest.sh 9 g...@example.com "Site 2"

# Site 3
/usr/share/netdisco/email_port_change_digest.sh 10 g...@example.com "Site 3"

# Site 4
/usr/share/netdisco/email_port_change_digest.sh 17 g...@example.com "Site 4"
/usr/share/netdisco/email_port_change_digest.sh 17 g...@example.com "Site 4"

# Site 5 6 7
/usr/share/netdisco/email_port_change_digest.sh 37 g...@example.com "Site 5"
/usr/share/netdisco/email_port_change_digest.sh 38 g...@example.com "Site 6"
/usr/share/netdisco/email_port_change_digest.sh 39 g...@example.com "Site 7"



--- End Message ---
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to