Monitor Sangoma Vega Gateway with Nagios Core

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
indranath
Posts: 1
Joined: Wed Aug 28, 2019 1:13 am

Monitor Sangoma Vega Gateway with Nagios Core

Post by indranath »

I am trying to monitor Monitor Sangoma Vega Gateway with Nagios Core.

I added the Sangoma device in switch.cfg and I am able to monitor the host. I also added the services for monitoring the port. below is the service entry.
define service{
use generic-service ; Inherit values from a template
host_name vegagateway15 ; The name of the host the service is associated with
service_description ISDN-Port3 ; The service description
check_command check_snmp!-C public -o ifOperStatus.5 -m all ; The command used to monitor the service
check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_interval 1 ; Re-check the service every minute until its final/hard state is determined
}
define service{
use generic-service ; Inherit values from a template
host_name vegagateway15 ; The name of the host the service is associated with
service_description ISDN-Port4 ; The service description
check_command check_snmp!-C public -o ifOperStatus.6 ; The command used to monitor the service
check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_interval 1 ; Re-check the service every minute until its final/hard state is determined
}

I am receiving the port status is up like below
Port status UP.PNG
Current Status:
OK
(for 0d 0h 0m 18s)
Status Information: SNMP OK - up(1)
Performance Data:
Current Attempt: 1/3 (HARD state)
Last Check Time: 08-28-2019 12:10:44
Check Type: ACTIVE

Problem is when the port is down I am getting the Status Information as down but Current status need to change from OK to critical
port status Down.PNG
Current Status:
OK
(for 0d 18h 51m 22s)
Status Information: SNMP OK - down(2)
Performance Data:
Current Attempt: 1/3 (HARD state)
Last Check Time: 08-28-2019 12:13:14
Check Type: ACTIVE
Check Latency / Duration: 0.000 / 0.061 seconds

Please help me how can I configure the Current status as critical if the port is down.
Server Details
Nagios® Core™ 4.3.4 - CentOS 7.6
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor Sangoma Vega Gateway with Nagios Core

Post by scottwilkerson »

Add -r 1 to the commands
example

Code: Select all

check_command check_snmp!-C public -o ifOperStatus.6 -r 1
From the docs
In the example above, the "-o ifOperStatus.1" refers to the OID for the operational status of port 1 on the switch. The "-r 1" option tells the check_snmp plugin to return an OK state if "1" is found in the SNMP result (1 indicates an "up" state on the port) and CRITICAL if it isn't found. The "-m RFC1213-MIB" is optional and tells the check_snmp plugin to only load the "RFC1213-MIB" instead of every single MIB that's installed on your system, which can help speed things up.
https://assets.nagios.com/downloads/nag ... uters.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked