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.

Topics - redpineapple

Pages: [1] 2
Installation / Fortigate hacks
« on: August 28, 2015, 09:39:03 AM »
So this is how I have Fortigates working:

In libcli:

Code: [Select]
# Fortigate
$cmd{'FortiOS'}{'ropr'} = '\$.$';
$cmd{'FortiOS'}{'enpr'} = '\$.$';
$cmd{'FortiOS'}{'conf'} = 'show full-configuration';
$cmd{'FortiOS'}{'strt'} = '^config';
$cmd{'FortiOS'}{'more'} = '--More--';

Code: [Select]
                my $l = '';
                my $mcol = 0;
                my $promptmatch = "$cmd{$os}{'enpr'}";
                        ($pre, $match) = $session->waitfor("/$cmd{$os}{more}|$promptmatch/i");
                        $pre =~ s/\x08|\x1b\[16D\s*|\x1b\[42D\s*//g;                                    # Get rid of backspaces after more prompt and potential \r
                        $l .= $pre;
                        $session->put(" ") if $match eq "$cmd{$os}{more}";
                        &misc::Prt("\nMORE:") unless $mcol % 78;
                }while($match !~ /$promptmatch/i);

Maybe it will save someone some time!!!!

Installation / Latency
« on: March 28, 2015, 07:38:28 AM »
I'm using ubuntu 14.10
Here is a ping

PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=63 time=0.688 ms
64 bytes from icmp_seq=2 ttl=63 time=0.688 ms
64 bytes from icmp_seq=3 ttl=63 time=0.737 ms
64 bytes from icmp_seq=4 ttl=63 time=0.697 ms
64 bytes from icmp_seq=5 ttl=63 time=0.698 ms

NeDi reports this device as 6 or 7 ms and not 0.6 or 0.7 ms


News / Toolbox
« on: July 18, 2014, 06:32:16 AM »
In Nodes-Toolbox I use a different set of tools:
- fping (a better ping)
- mtr (a better traceroute)
- tracepath (provides info on mtu)
- httping (check websites)

fping seems not to work with system and only way I could make it work was as below.

To add the tools: sudo apt-get install sudo apt-get install fping mtr iputils-tracepath httping

Code: [Select]
if($do == "Ping"){
        echo "<h2>$ping_count Ping(s) with $ping_size bytes to $dest</h2><div class=\"textpad code txta\">";
        if(preg_match("/OpenBSD|Linux/",PHP_OS) ){
                echo "Using fping...\n";
                $fpingoutput = shell_exec("fping -c $ping_count -b $ping_size $dest 2>&1");
                echo "$fpingoutput";
        }elseif(preg_match("/^win/",PHP_OS) ){
                system("ping -n $ping_count -l $ping_size $dest");
}elseif($do == "mtr"){
        echo "<h2>mtr $dest</h2><div class=\"textpad code txtb\">";
        system("mtr -r -c $ping_count $dest");
}elseif($do == "TracePath"){
        echo "<h2>TracePath $dest</h2><div class=\"textpad code txtb\">";
        system("tracepath -n $dest");
}elseif($do == "Ping Range"){
        echo "<h2>Nmap Ping Range of $dest</h2><div class=\"textpad code txtb\">";
        system("nmap -sP $dest");
}elseif($do == "HTTP ping"){
        echo "<h2>httping $dest</h2><div class=\"textpad code txtb\">";
        system("httping -c $ping_count $dest");

News / Beta accounts on beta
« on: July 16, 2014, 10:37:25 AM »

The last login always says 1.Jan 70 1:00


News / High level chart?
« on: July 12, 2014, 12:32:45 PM »

I think the below is a good high level chart as a variance will indicate a wider problem:
Code: [Select]
SELECT AVG(latency) as "Average network latency" FROM `monitoring`;

News / 1.1.155 Mods
« on: July 07, 2014, 06:45:24 PM »
How is there any easy way to see if moni.pl -D is running?  I usually go to system-service and then check in the ps block if it is there?

Recently someone put an apostrophe ' in a device name and in crashed both nedi.pl and moni.pl.

I had to rename the device and then delete the old device.  Also I had to delete all reference's to the device with the ' in interfaces.  I did this manually using sqlbuddy.

News / 1.1.155 OUI discovery
« on: July 07, 2014, 02:30:30 PM »
OUI discovery fails with

Use of uninitialized value $snmp::ip in pattern match (m//) at ./inc/libsnmp.pm line 2431.
OUI :IP not usable

Looks like $ip on :2431 isn't set?

                if($main::opt{'o'}){                                                            # Only add if OUI discovery set
                        my $oui = &misc::GetOui($mc);
                        print $mc; $oui;
                        print $nip;
                        if($oui =~ /$misc::ouidev/i or $mc =~ /$misc::ouidev/){
                                if(grep /\Q$mc\E/,(@misc::doneid,@misc::failid,@misc::todo) ){  # Don't queue if done or queued.
                                        &misc::Prt("OUI :Device done already\n");
                                }elsif($mc =~ /$misc::border/ or $oui =~ /$misc::border/){      # ...or matching the border...
                                        &misc::Prt("OUI :$mc or $oui matches border /$misc::border/\n");
                                }elsif($ip !~ /$misc::netfilter/){                             # ...or not usable
                                        &misc::Prt("OUI :IP not usable\n");
                                        &misc::Prt("OUI :MAC or '$oui' matches ouidev\n");
                                        $ad += misc::CheckTodo($mc,&misc::MapIp($ip,'ip') );

News / 1.1.5 ARP
« on: July 07, 2014, 07:32:56 AM »

In the new nedi.pl there should be a method to set the ARP.  I have devices that work with iptomedia but not iptophysical.  In netgen It does not set correctly as it always sets it to phy?  What should it be?


Discovery / Discovery error in 1.08
« on: November 11, 2012, 08:22:02 AM »
x.x.x.x   No response from xxxxx (using -A type regexp "tik"), not discoverable          DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tik"), not discoverable","nedi")' at line 1 at ./inc/libdb-msq.pm line 1160.

when there is no response from a device and the -A parameter is being used nedi crashes as above.  Seems it is confused between ' & "

Discovery / Radios
« on: November 11, 2012, 08:15:37 AM »
I have many radios named vxtarget, pm or Name.  Is there an easy way to map the name to the ip address without having to use mapna on each one in nedi.conf?

Installation / DB export and import
« on: November 11, 2012, 07:08:21 AM »
What is the process to export from a 1.07 db and import into a 1.08 db?

GUI / Monitoring-Health (Interface errors table)
« on: October 04, 2012, 07:06:07 AM »
How can I filter the interface errors table in Monitoring-Health so that it ignores all devices with ups in the name?

Discovery / Discovery on an IP range
« on: September 18, 2012, 09:01:46 AM »
How does a person configure discovery for an IP range using the -A parameter?

GUI / Nodes-Toolbox.php
« on: April 04, 2012, 08:36:12 PM »
I have rewritten Nodes-Toolbox.php. First replaced the scan button with mtr.  This bit of code does the work:
}elseif($do == "Lookup"){
        echo "<h2>DNS Lookup $dest</h2><div class=\"textpad code txtb\">";
        system("nslookup $dest");
        echo "</div><br><p><h2>Whois $dest</h2><div class=\"textpad code txtb\">";
        system("whois $dest");
}elseif($do == "mtr"){
        echo "<h2>mtr $dest</h2><div class=\"textpad code txtb\">";
        system("mtr -r -c $ping_count -s $ping_size $dest");
}elseif($do == "Ping Range"){

The next thing I did was remove the rest of the page and started using it as a repositary for user manuals.  I created a directory under html named docs, uploaded all my network manuals and inserted a link on the page to the manual.

I also have a list of common nedi queries here as well:
<h2>Links to common reports and tools</h2>
<div class="textpad txtb">
Busiest interfaces on the network: <a href="Devices-Interfaces.php?ina=dinoct&opa=%3E&sta=0&cop=&inb=device&opb=regexp&stb=&col[]=device&col[]=ifname&col[]=ifdesc&col[]=alias&col[]=dinoct&col[]=doutoct&col[]=comment&ord=dinoct+desc"><img src="img/16/traf.png" title="Busiest"></a>
Interfaces with most errors on the network: <a href="Devices-Interfaces.php?ina=dinerr&opa=%3E&sta=0&cop=&inb=device&opb=regexp&stb=&col[]=device&col[]=ifname&col[]=ifdesc&col[]=alias&col[]=dinerr&col[]=douterr&col[]=comment&ord=dinerr+desc"><img src="img/16/traf.png" title="Most errors"></a>
Radios with the highest BBE: <a href="Devices-List.php?ina=type&opa=regexp&sta=winlink&cop=&inb=device&opb=regexp&stb=&col[]=device&col[]=devip&col[]=serial&col[]=location&col[]=contact&col[]=lastdis&col[]=cusvalue&col[]=cuslabel&ord=cusvalue+desc"><img src="img/16/traf.png" title="Highest BBE"></a>
Radio software versions: <a href="Reports-Devices.php?ina=type&opa=regexp&sta=winlink&rep[]=sft&lim=0"><img src="img/16/traf.png" title="Radio software"></a>
Radio inventory (remote link, receive levels and link distance): <a href="Reports-Modules.php?ina=type&opa=regexp&sta=winlink&rep[]=inv&do=Show"><img src="img/16/traf.png" title="Radio inventory"></a>
Devices with most incidents: <a href="Reports-Monitoring.php?ina=&opa=regexp&sta=&rep[]=idi&lim=100&do=Show"><img src="img/16/traf.png" title="Most Incidents"></a>
Traffic-profiling audit: <a href="Devices-Config.php?shl=n&str=traffic-profiling&ld=&dd=&cm=&lim=0&lid=0&gen=Show&ord=device+desc"><img src="img/16/traf.png" title="traffic-profiling"></a>
Service-mapping audit: <a href="Devices-Config.php?shl=n&str=flow+service-mapping&ld=&dd=&cm=&lim=0&lid=0&gen=Show&ord=device"><img src="img/16/traf.png" title="service-mapping"></a>

GUI / Access to weather and BGP
« on: April 04, 2012, 07:52:50 PM »
In the header.php file I have added to new icons next to the existing Help and Print.
- Added the weather for my region (url is http://www.wunderground.com/auto/wxmap/global/stations/68368.html?&theprefset=000001668368WS&theprefvalue=FAJS) This is important for radio networks as storms cause issues.
- Added BGP info from RIPE (url is http://www.ris.ripe.net/mt/asdashboard.html?as=33762)
- I also have a networking troubleshooting checklist but need to take all the confidential stuff out of it before I post it.

Maybe it will be possible to add config lines to nedi.conf to customize this for each region or company?

Pages: [1] 2