Welcome, Guest. Please login or register.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ascii

Pages: [1] 2 3 ... 6
1
Database / Re: remote access to mysql
« on: February 13, 2020, 11:02:22 AM »
you need to replace the ip with the actual ip of the server
but keep in mind haven a DB reachable from "anywhere" is a big security risk.
i would recommand to implement a firewall to controll acces to the db.

2
Other / Re: Small fixes and hacks for NeDi 1.8.100p3
« on: February 05, 2020, 11:45:40 AM »
ok

i changed the line 484 in /var/nedi/inc/libsnmp.pm
from
Code: [Select]
484                         $bimg =~ s/^(\.|flash:|(slot|disk)\d:|(sup-)?boot(flash|disk):|FIRMWARE REVISION: )([-.\/\w]*\/)?//;
to
Code: [Select]
484                         $bimg =~ s/^(\.|(sd)?flash:|(slot|disk)\d:|(sup-)?boot(flash|disk):|FIRMWARE REVISION: )([-.\/\w]*\/)?//;

3
Other / Re: Small fixes and hacks for NeDi 1.8.100p3
« on: January 29, 2020, 01:49:52 PM »
i have 1 more
the bootimage might be longer than 64 chars.

and in the Database change the bootimage field size from 64 to 128 in device table

change line 1089 in /var/nedi/inc/libdb.pm
from
Code: [Select]
$main::dev{$dv}{bi}?substr($main::dev{$dv}{bi},0,64):'',to
Code: [Select]
$main::dev{$dv}{bi}?substr($main::dev{$dv}{bi},0,128):'',
the error accored  for me on Cisco IE-4000 switch
Quote
Bootimage changed from sdflash:/ie4000-universalk9-mz.152-7.E/ie4000-universalk9-mz.152 to sdflash:/ie4000-universalk9-mz.152-7.E/ie4000-universalk9-mz.152-7.E.bin
it was always cut to 64 now it's fine

4
Database / PostgreSQL query problem
« on: January 07, 2020, 10:10:56 AM »
Hello together,

i just finished my migartion from mySQL to postgreSQL
everythink is workint so far.

Only downside is my paralell discovery. I is made for mysql and not working in postgresql.
I tried to alter it but no luck.
In mysql i used this
Code: [Select]
####  over the day  ####
#4,30 2-23 * * *        perl /var/nedi/nedi.pl -SWGflms -A 'RIGHT(INET_NTOA(devip), 1) IN (0, 6)' > /tmp/nedi-seedlist.ip.0u6.log 2>&1
#1,31 2-23 * * *        perl /var/nedi/nedi.pl -SWGflms -A 'RIGHT(INET_NTOA(devip), 1) IN (1, 5)' > /tmp/nedi-seedlist.ip.1u5.log 2>&1
#2,32 2-23 * * *        perl /var/nedi/nedi.pl -SWGflms -A 'RIGHT(INET_NTOA(devip), 1) IN (2, 7)' > /tmp/nedi-seedlist.ip.2u7.log 2>&1
#3,33 2-23 * * *        perl /var/nedi/nedi.pl -SWGflms -A 'RIGHT(INET_NTOA(devip), 1) IN (3, 8)' > /tmp/nedi-seedlist.ip.3u8.log 2>&1
#0,34 2-23 * * *        perl /var/nedi/nedi.pl -SWGflms -A 'RIGHT(INET_NTOA(devip), 1) IN (4, 9)' > /tmp/nedi-seedlist.ip.4u9.log 2>&1

the right to cutof the IPs is not working in postgresql
Code: [Select]
$ perl /var/nedi/nedi.pl -SWGflms -v -d d -A 'RIGHT(INET_NTOA(devip), 1) IN (0, 6)'
RDEV:2227 devices read from nedi.devices
DBG :SELECT device,inet_ntoa(devip),readcomm,snmpversion & 3 FROM devices LEFT JOIN configs USING (device) WHERE snmpversion > 0 AND RIGHT(INET_NTOA(devip), 1) IN (0, 6) key=
DBD::Pg::db selectall_arrayref failed: FEHLER:  Funktion right(inet, integer) existiert nicht
ZEILE 1: ... configs USING (device) WHERE snmpversion > 0 AND RIGHT(INET...

i tired is also with cast to convert but it's also not working
Code: [Select]
$ perl nedi.pl -SWGflms -v -d d -A "RIGHT(CAST(inet_ntoa(devip) AS text),1) IN (0, 6)"
RDEV:2227 devices read from nedi.devices
DBG :SELECT device,inet_ntoa(devip),readcomm,snmpversion & 3 FROM devices LEFT JOIN configs USING (device) WHERE snmpversion > 0 AND RIGHT(CAST(inet_ntoa(devip) AS text),1) IN (0, 6) key=
DBD::Pg::db selectall_arrayref failed: FEHLER:  Operator existiert nicht: text = integer
ZEILE 1: ...on > 0 AND RIGHT(CAST(inet_ntoa(devip) AS text),1) IN (0, 6)

maybe same SQL/Database expert is with us and could help me out


EDIT:
As a workaround for now i moved to
Code: [Select]
####  over the day  ####   PostgreSQL #######
1,31 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.10\%'" > /tmp/nedi-seedlist.ip.10.log 2>&1
2,32 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.20\%'" > /tmp/nedi-seedlist.ip.20.log 2>&1
3,33 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.3_\%'" > /tmp/nedi-seedlist.ip.3.log 2>&1
4,34 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.4_\%'" > /tmp/nedi-seedlist.ip.4.log 2>&1
5,35 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.5_\%'" > /tmp/nedi-seedlist.ip.5.log 2>&1
6,36 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.6_\%'" > /tmp/nedi-seedlist.ip.6.log 2>&1
7,37 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.7_\%'" > /tmp/nedi-seedlist.ip.7.log 2>&1
8,38 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.8_\%'" > /tmp/nedi-seedlist.ip.8.log 2>&1
9,39 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.9_\%'" > /tmp/nedi-seedlist.ip.9.log 2>&1

11,41 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.11\%'" > /tmp/nedi-seedlist.ip.11.log 2>&1
21,41 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.21\%'" > /tmp/nedi-seedlist.ip.21.log 2>&1
12,42 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.12\%'" > /tmp/nedi-seedlist.ip.12.log 2>&1
22,42 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.22\%'" > /tmp/nedi-seedlist.ip.22.log 2>&1
13,43 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.13\%'" > /tmp/nedi-seedlist.ip.13.log 2>&1
23,43 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.23\%'" > /tmp/nedi-seedlist.ip.23.log 2>&1
14,44 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.14\%'" > /tmp/nedi-seedlist.ip.14.log 2>&1
24,44 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.24\%'" > /tmp/nedi-seedlist.ip.24.log 2>&1
15,45 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.15\%'" > /tmp/nedi-seedlist.ip.15.log 2>&1
25,45 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.25\%'" > /tmp/nedi-seedlist.ip.25.log 2>&1
16,46 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.16\%'" > /tmp/nedi-seedlist.ip.16.log 2>&1
17,47 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.17\%'" > /tmp/nedi-seedlist.ip.17.log 2>&1
18,48 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.18\%'" > /tmp/nedi-seedlist.ip.18.log 2>&1
19,49 2-23 * * * perl /var/nedi/nedi.pl -P 2 -Smv -A "CAST(inet_ntoa(devip) AS text) ~~* '\%.\%.\%.19\%'" > /tmp/nedi-seedlist.ip.19.log 2>&1

5
Installation / Re: Update MAC Vendor OUI Database?
« on: December 17, 2019, 08:24:43 AM »
worked like a charm

Code: [Select]
root at krenoc in ~
$ perl /var/nedi/nedi.pl -v -N oui
DNS :Net::Nslookup not available
CLI :IO-Pty loaded
WEB :LWP-UserAgent loaded
OUI :38299 NIC vendor entries read
......
NOUI:Updated 8773 node vendors
END :Took 0 minutes

6
Installation / Re: Update MAC Vendor OUI Database?
« on: December 12, 2019, 11:46:14 AM »
i tried it but the sql update failed for me
Code: [Select]
$ perl /var/nedi/nedi.pl -v -N oui
DNS :Net::Nslookup not available
CLI :IO-Pty loaded
WEB :LWP-UserAgent loaded
OUI :38299 NIC vendor entries read
DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'L CO.' WHERE mac='448a5b7b506e'' at line 1 at /var/nedi/inc/libdb.pm line 2166.

I'm using NeDi 1.8.100p3

7
News / Re: NeDi 1.8c released?
« on: November 12, 2019, 10:08:26 AM »

hello, I updated Nedi from 1.7 to 1.8C, when I go to Device status I can't find the Defgen icon anymore

Defgen has been renamed to Defed (to be in-line with the other editors). Just adapt the menu in nedi.conf and it'll reappear :)

8
News / Re: NeDi 1.8 to be made available to the community?
« on: October 11, 2019, 09:56:43 AM »

9
Discovery / Re: SSH pattern match timed-out
« on: September 02, 2019, 02:32:47 PM »
we not sure if it is going to fix your problem.

Take a look at the nedi/inc/libcli.pm
In mine it starts at around line 680.

You could add the Algorithms directly in the ssh command line.
not the best solution but it could work.

Keep in mind it will be replaced on an update

10
Discovery / Re: Cisco backup config error
« on: July 25, 2019, 07:42:55 AM »
could you please run
Code: [Select]
perl /var/nedi/nedi.pl -vvvkK -B0 -SAFGgsjmvpadobewitu -a IP-of-Switch
from the CLI and post the output

11
i replayed on 2 of the post.
sadly there is not a lot of input from your side.
so most thing are a guess or more a wild goose chase.
It would be good if you provide logfiles or error messages.

12
GUI / Re: Red Hat 7 certain Php files not loading
« on: April 25, 2019, 11:46:23 AM »
what did the webserver logfiles say?
did you enable debugging on the host machine?

13
Definition Files / Re: Juniper Defs?
« on: April 25, 2019, 11:43:17 AM »
well it was basicly answered several times.
Follow the guide on youtube https://www.youtube.com/watch?v=bunFHB-RoUQ
we don't have junpier devices so can't help on the devices.

14
Definition Files / Cisco IE-4000-8GS4G-E
« on: September 10, 2018, 09:01:52 AM »
# Definition for 1.3.6.1.4.1.9.1.2076 created by Defgen 2.0 on 10.Sep 2018 (ascii)
 
# Main
SNMPv   2HC
Type   IE-4000-8GS4G-E
Typoid   
Sysdes   
OS   IOS
Icon   w2bp
Size   1
TempAlert   
Bridge   VLX
ArpND   oldphy
Dispro   LLDPXN|CDP
Serial   1.3.6.1.2.1.47.1.1.1.1.11.1001
Bimage   1.3.6.1.4.1.9.2.1.73.0
CfgChg   1.3.6.1.4.1.9.9.43.1.1.1.0
CfgWrt   1.3.6.1.4.1.9.9.43.1.1.3.0
FTPConf   
VLnams   1.3.6.1.4.1.9.9.46.1.3.1.1.4.1
VLnamx   
Group   1.3.6.1.4.1.9.9.46.1.2.1.1.2.1
Mode   1.3.6.1.4.1.9.9.46.1.2.1.1.3.1
 
# Interfaces
StartX   
EndX   
IFname   1.3.6.1.2.1.31.1.1.1.1
IFaddr   oldcie   
IFalia   1.3.6.1.2.1.31.1.1.1.18
IFalix   
InBcast   1.3.6.1.2.1.31.1.1.1.9
InDisc   1.3.6.1.2.1.2.2.1.13
OutDisc   1.3.6.1.2.1.2.2.1.19
IFvlan   1.3.6.1.4.1.9.9.68.1.2.2.1.2
IFvlix   
IFpowr      
IFpwix   
IFdupl   1.3.6.1.2.1.10.7.2.1.19
IFduix   
Halfdp   2
Fulldp   3
 
# Modules
Modesc   1.3.6.1.2.1.47.1.1.1.1.2
Moclas   1.3.6.1.2.1.47.1.1.1.1.5
Movalu   9
Moslot   1.3.6.1.2.1.47.1.1.1.1.7
Modhw   1.3.6.1.2.1.47.1.1.1.1.8
Modsw   1.3.6.1.2.1.47.1.1.1.1.9
Modfw   1.3.6.1.2.1.47.1.1.1.1.10
Modser   1.3.6.1.2.1.47.1.1.1.1.11
Momodl   1.3.6.1.2.1.47.1.1.1.1.13
Modloc   
Mostat   
Mostok   
 
# RRD Graphing
CPUutl   1.3.6.1.4.1.9.9.109.1.1.1.1.8.1   
Temp   1.3.6.1.4.1.9.9.13.1.3.1.3.1006   
MemCPU   1.3.6.1.4.1.9.9.48.1.1.1.6.1   
Custom      

15
Installation / Re: Public-key authentication with ssh
« on: June 07, 2018, 08:23:53 AM »
i'm not using key files.
but i looked in the inc/libcli.pm

i found these line arround 664 depending on your version of nedi
Code: [Select]
}elsif($po == 22){
                 my $known = "-o 'StrictHostKeyChecking no'";

i guess you can try to set the keyfile there.

maybe you need to set a dummy password in the nedi config.

Pages: [1] 2 3 ... 6