Page 2 of 2

Re: Command issue - core and XI different results

Posted: Fri Jan 18, 2019 6:56 pm
by jacek
What do you mean by "Service Status Detail" page?

Service config:

Code: Select all

###############################################################################
#
# Services configuration file
#
# Created by: Nagios CCM 2.7.4
# Date:       2019-01-18 23:50:11
# Version:    Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios CCM will overwrite all manual settings during the next update if you 
# would like to edit files manually, place them in the 'static' directory or 
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define service {
    host_name                TEMP-XXXX
    service_description      IKE
    use                      xiwizard_udp_service
    check_command            check_udp_port!500!isakmp!!!!!!
    max_check_attempts       3
    check_interval           2
    retry_interval           1
    check_period             xi_timeperiod_24x7
    notification_interval    60
    notification_period      xi_timeperiod_24x7
    notifications_enabled    1
    contacts                 XXXX
    _xiwizard                tcpudpport
    register                 1
}

define service {
    host_name                TEMP-XXXX
    service_description      IPSEC-NAT
    use                      xiwizard_udp_service
    check_command            check_udp_port!4500!sae-urn!!!!!!
    max_check_attempts       3
    check_interval           2
    retry_interval           1
    check_period             xi_timeperiod_24x7
    notification_interval    60
    notification_period      xi_timeperiod_24x7
    contacts                 XXXX
    _xiwizard                tcpudpport
    register                 1
}

define service {
    host_name                TEMP-XXXX
    service_description      L2TP
    use                      xiwizard_tcp_service
    check_command            check_udp_port!1701!12f!!!!!!
    max_check_attempts       3
    check_interval           2
    retry_interval           1
    check_period             xi_timeperiod_24x7
    notification_interval    60
    notification_period      xi_timeperiod_24x7
    notifications_enabled    1
    contacts                 XXXX
    _xiwizard                tcpudpport
    register                 1
}

###############################################################################
#
# Services configuration file
#
# END OF FILE
#
###############################################################################
Grep results:

Code: Select all

# grep "p_result=" /usr/local/nagios/libexec/check_udp_port
p_result=`echo $f_result | awk '{print $1" "$2" "$3}' | sed 's/[|]/ /'`

# grep 'check_udp_port\|requiretty' /etc/sudoers
Defaults:nagios !requiretty
NAGIOSXI ALL = NOPASSWD:/usr/local/nagios/libexec/check_udp_port *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagios/libexec/check_udp_port_debug *

Re: Command issue - core and XI different results

Posted: Mon Jan 21, 2019 10:01 am
by lmiltchev
What do you mean by "Service Status Detail" page?
I am sorry I was not clear enough. From the Nagios XI web UI, click on the Home menu on the top, then click on the "Service Status" link under the "Details" menu on the left. Find your service, and click on it. This will take you to the "Service Status Detail" page. Please post a screenshot of this page. We need to see what is the exact output that is shown on the page.

As far as the outputs of the commands that you ran, and the service config - they all seem correct. I didn't find any issues with them. This is how I set up a "working" service on my test XI box.

Re: Command issue - core and XI different results

Posted: Mon Jan 21, 2019 10:14 am
by jacek
I get only a "CRITICAL:" message, so there is nothing after the colon.

Re: Command issue - core and XI different results

Posted: Mon Jan 21, 2019 1:41 pm
by lmiltchev
I believe we need to move this to a support ticket in order to further troubleshoot the issue.

Please open a support ticket via our support center here:
https://support.nagios.com/tickets/

Re: Command issue - core and XI different results

Posted: Mon Jan 21, 2019 1:47 pm
by jacek
OK, ticket #225293 created, thanks!

Re: Command issue - core and XI different results

Posted: Mon Jan 21, 2019 3:27 pm
by lmiltchev
Ticket received. I am locking the topic.