disable port using nagios core

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: disable port using nagios core

Postby DOkuwa » Mon Nov 13, 2017 11:59 am

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
DOkuwa
 
Posts: 90
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable port using nagios core

Postby tmcdonald » Mon Nov 13, 2017 1:28 pm

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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Support Lead / Operations Engineer
 
Posts: 8726
Joined: Mon Sep 23, 2013 8:40 am

Re: disable port using nagios core

Postby DOkuwa » Mon Nov 13, 2017 2:47 pm

any ideas for this logic
DOkuwa
 
Posts: 90
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable port using nagios core

Postby mcapra » Mon Nov 13, 2017 3:00 pm

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.
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2893
Joined: Thu May 05, 2016 3:54 pm

Re: disable port using nagios core

Postby kyang » Tue Nov 14, 2017 11:15 am

Thanks @mcapra!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
 
Posts: 706
Joined: Tue Jul 25, 2017 3:35 pm

Re: disable port using nagios core

Postby DOkuwa » Wed Nov 15, 2017 6:09 pm

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
DOkuwa
 
Posts: 90
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable port using nagios core

Postby kyang » Thu Nov 16, 2017 10:03 am

Sounds good! Are there any more questions or can we close this thread?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
 
Posts: 706
Joined: Tue Jul 25, 2017 3:35 pm

Re: disable port using nagios core

Postby DOkuwa » Thu Nov 16, 2017 10:06 am

please close this thread but expecting answers from my other threads
very big thanks you
DOkuwa
 
Posts: 90
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable port using nagios core

Postby kyang » Thu Nov 16, 2017 10:58 am

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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
 
Posts: 706
Joined: Tue Jul 25, 2017 3:35 pm

Previous

Return to Nagios Core

Who is online

Users browsing this forum: Rapsy and 36 guests