Page 2 of 2

Re: disable port using nagios core

Posted: Mon Nov 13, 2017 11:59 am
by DOkuwa
Yes i know i need to modify the scripts check_alcatel_ports.pl to ignore the administrative down message for that particular interface or maybe oid
This is what i am trying to figure out

Thanks

Re: disable port using nagios core

Posted: Mon Nov 13, 2017 1:28 pm
by tmcdonald
We do offer custom development, and if that is a service you are interested in I can start that process for you so we can get a quote generated.

Re: disable port using nagios core

Posted: Mon Nov 13, 2017 2:47 pm
by DOkuwa
any ideas for this logic

Re: disable port using nagios core

Posted: Mon Nov 13, 2017 3:00 pm
by mcapra
DOkuwa wrote:I have the snmp oid which relates to the desired port on the alcatel devices that needs to be filtered out and don't know if this can be adjusted in the script
L#186-L#219 is where I suspect the change would need to be made.

Code: Select all

foreach my $port (sort keys %ports) {

    my $name = $ports{$port}->[0];
    my $desc = $ports{$port}->[4];
    my $mode = $ports{$port}->[1];
    my $admin = $ports{$port}->[2];
    my $oper = $ports{$port}->[3];
        my $port_state = $ports{$port}->[5];


# Skip if not network port
    if ($mode != 2) {
        next;
    }

# Skip if admin down
    elsif ($admin == 3) {
        next;
    }

# Skip if state is 'ghost' (port provisioned by not physically present)
    elsif ($port_state == 2){
        next;
        }

# Alarm if oper down
    elsif ($oper != 2) {
        $error = 1;
        $state = $ERRORS{'CRITICAL'};
        $answer .= "[$desc OperStatus down] ";
        next;
    }

}
Essentially adding a # Skip if oid.to.ignore section in the elsif chain. Though without knowing exactly what is being matched (probably $name or $desc) and to what value, I can't say for certain what the exact change should be.

Re: disable port using nagios core

Posted: Tue Nov 14, 2017 11:15 am
by kyang
Thanks @mcapra!

Re: disable port using nagios core

Posted: Wed Nov 15, 2017 6:09 pm
by DOkuwa
Thanks
it has been sorted
just needed to add some modification to the check_alcatel_ports scripts
e.g if $name = "A/4 ")
next;
This skips any interface with name of A/4 which is the interface to be ignored

Re: disable port using nagios core

Posted: Thu Nov 16, 2017 10:03 am
by kyang
Sounds good! Are there any more questions or can we close this thread?

Re: disable port using nagios core

Posted: Thu Nov 16, 2017 10:06 am
by DOkuwa
please close this thread but expecting answers from my other threads
very big thanks you

Re: disable port using nagios core

Posted: Thu Nov 16, 2017 10:58 am
by kyang
Sounds good! I'll be closing this thread!

If you have any more questions, feel free to create another thread.

Thanks for using the Nagios Support Forum!