Nagios XI is not able to connect to the NSClient++

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
FelipeBantim
Posts: 7
Joined: Thu Apr 19, 2018 6:59 am

Nagios XI is not able to connect to the NSClient++

Post by FelipeBantim »

Hello Everyone,

I'm new in Nagios world and i've been facing an issue when I try to setup a new host which I would like to start monitoring.
I'm following the steps to setup the computer with NSClient++, I'm using the same password in NSClient installation and in Nagios XI, But it gets stuck in "Waiting for configuration verification".

I've already checked Windows Firewall and the Switches configurations and they are OK. NSClient.ini seems to be fine as well.

Client: Windows Server 2016
NSClient: Versions 0.4.4.23 and 0.5.2.35
Nagios XI Server and Windows Server are in the same VLAN.
Nagios is able to connect to AD and to reach the host server by ping.

Could anyone help me to fix it up?

Note: I'm running trial 60 days versions.

Thank you! :D
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI is not able to connect to the NSClient++

Post by scottwilkerson »

Here are some of the most common problems
https://support.nagios.com/kb/article.php?id=34

Also, if those do not fix it please send back the results of

Code: Select all

grep NAGIOS /etc/sudoers
tail -50 /usr/local/nagiosxi/var/cmdsubsys.log
tail -50 /var/log/cron
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
FelipeBantim
Posts: 7
Joined: Thu Apr 19, 2018 6:59 am

Re: Nagios XI is not able to connect to the NSClient++

Post by FelipeBantim »

scottwilkerson wrote:Here are some of the most common problems
https://support.nagios.com/kb/article.php?id=34

Also, if those do not fix it please send back the results of

Code: Select all

grep NAGIOS /etc/sudoers
tail -50 /usr/local/nagiosxi/var/cmdsubsys.log
tail -50 /var/log/cron
Hi Scottwilkerson,

I tried those solutions yesterday but I wasn't able to fix this issue. Please find below the results you asked below.

Code: Select all

[root@BRANAG0003 ~]# grep NAGIOS /etc/sudoers
User_Alias      NAGIOSXI=nagios
User_Alias              NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *

Code: Select all

[root@BRANAG0003 ~]# tail -50 /usr/local/nagiosxi/var/cmdsubsys.log
RETURNCODE=0
..................
PROCESSED 1 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
.............................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
.............................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
.............................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
.............................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS

Code: Select all

[root@BRANAG0003 ~]# tail -50 /var/log/cron
Apr 19 13:29:01 BRANAG0003 CROND[7089]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Apr 19 13:29:01 BRANAG0003 CROND[7092]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Apr 19 13:29:01 BRANAG0003 CROND[7095]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Apr 19 13:29:01 BRANAG0003 CROND[7094]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Apr 19 13:29:01 BRANAG0003 CROND[7097]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Apr 19 13:29:01 BRANAG0003 CROND[7096]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
Apr 19 13:29:01 BRANAG0003 CROND[7106]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7385]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7386]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php >> /usr/local/nagiosxi/var/deadpool.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7389]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok)
Apr 19 13:30:01 BRANAG0003 CROND[7388]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7387]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7390]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7391]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7392]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7395]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7393]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php >> /usr/local/nagiosxi/var/dbmaint.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7394]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
Apr 19 13:30:01 BRANAG0003 CROND[7396]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Apr 19 13:30:01 BRANAG0003 CROND[7400]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7690]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7692]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7693]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php >> /usr/local/nagiosxi/var/deadpool.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7694]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7697]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7695]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7696]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7698]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7699]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Apr 19 13:31:01 BRANAG0003 CROND[7700]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8002]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8003]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php >> /usr/local/nagiosxi/var/deadpool.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8005]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8007]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8008]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8006]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8010]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8004]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8011]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
Apr 19 13:32:01 BRANAG0003 CROND[8012]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8354]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8357]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8358]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8359]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8361]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8362]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php >> /usr/local/nagiosxi/var/deadpool.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8356]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8360]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8363]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Apr 19 13:33:01 BRANAG0003 CROND[8364]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)

I've noticed that Nagios is able to reach the switches, servers and so on but it gets stuck in "Waiting for configuration verification" for all scenarios I've tried (SNMP, Network Switch / Router, Windows Server, Windows WMI, Windows SNMP and Windows Desktop methods).

Thanks! :D
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI is not able to connect to the NSClient++

Post by scottwilkerson »

What happened when you ran this from that document?

Code: Select all

su nagios
/usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
FelipeBantim
Posts: 7
Joined: Thu Apr 19, 2018 6:59 am

Re: Nagios XI is not able to connect to the NSClient++

Post by FelipeBantim »

scottwilkerson wrote:What happened when you ran this from that document?

Code: Select all

su nagios
/usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
I don't remember which message I received yesterday, but the message I just received is:

Code: Select all

[root@BRANAG0003 ~]# su nagios
[nagios@BRANAG0003 root]$ /usr/local/nagiosxi/scripts
bash: /usr/local/nagiosxi/scripts: is a directory
[nagios@BRANAG0003 root]$ ./reconfigure_nagios.sh
bash: ./reconfigure_nagios.sh: Permission denied
[nagios@BRANAG0003 root]$
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI is not able to connect to the NSClient++

Post by scottwilkerson »

Sorry I did that wrong, please do this:

Code: Select all

su nagios
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
FelipeBantim
Posts: 7
Joined: Thu Apr 19, 2018 6:59 am

Re: Nagios XI is not able to connect to the NSClient++

Post by FelipeBantim »

scottwilkerson wrote:Sorry I did that wrong, please do this:

Code: Select all

su nagios
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Please find below the results.

Code: Select all

[root@BRANAG0003 ~]# su nagios
[nagios@BRANAG0003 root]$ cd /usr/local/nagiosxi/scripts
[nagios@BRANAG0003 scripts]$ ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=TNuDjDZ3Z04M' -O nagiosql.login--2018-04-19 15:28:06--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

    [ <=>                                   ] 30,983      --.-K/s   in 0.02s

2018-04-19 15:28:06 (1.64 MB/s) - “nagiosql.login” saved [30983]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
    [0] => braplm0003.am.nemak.net.cfg
    [1] => bratia0001.am.nemak.net.cfg
    [2] => bravas0001.am.nemak.net.cfg
    [3] => bravas0002.am.nemak.net.cfg
    [4] => bravas0004.am.nemak.net.cfg
    [5] => bravas0005.am.nemak.net.cfg
    [6] => bravwc0002.am.nemak.net.cfg
    [7] => brawcs0001.am.nemak.net.cfg
    [8] => kDlH9vrm.tmp.cfg
    [9] => tDm29WIH.tmp.cfg
    [10] => tTl7BNTT.tmp.cfg
    [11] => u7nc28nc.tmp.cfg
    [12] => uJ55vYL0.tmp.cfg
    [13] => uMtCCVXA.tmp.cfg
    [14] => vIGnD98N.tmp.cfg
    [15] => vOddXUch.tmp.cfg
)
IMPORTING /usr/local/nagios/etc/import/braplm0003.am.nemak.net.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/braplm0003.am.nemak.net.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:07--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 44,483      --.-K/s   in 0.01s

2018-04-19 15:28:07 (2.84 MB/s) - “nagiosql.import.monitoring” saved [44483]

IMPORTING /usr/local/nagios/etc/import/bratia0001.am.nemak.net.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/bratia0001.am.nemak.net.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:07--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 44,314      --.-K/s   in 0.02s

2018-04-19 15:28:08 (1.91 MB/s) - “nagiosql.import.monitoring” saved [44314]

IMPORTING /usr/local/nagios/etc/import/bravas0001.am.nemak.net.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/bravas0001.am.nemak.net.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:08--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 44,176      --.-K/s   in 0.02s

2018-04-19 15:28:08 (2.10 MB/s) - “nagiosql.import.monitoring” saved [44176]

IMPORTING /usr/local/nagios/etc/import/bravas0002.am.nemak.net.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/bravas0002.am.nemak.net.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:08--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 44,038      --.-K/s   in 0.02s

2018-04-19 15:28:10 (1.72 MB/s) - “nagiosql.import.monitoring” saved [44038]

IMPORTING /usr/local/nagios/etc/import/bravas0004.am.nemak.net.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/bravas0004.am.nemak.net.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:10--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 43,900      --.-K/s   in 0.02s

2018-04-19 15:28:10 (2.46 MB/s) - “nagiosql.import.monitoring” saved [43900]

IMPORTING /usr/local/nagios/etc/import/bravas0005.am.nemak.net.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/bravas0005.am.nemak.net.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:10--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 43,762      --.-K/s   in 0.02s

2018-04-19 15:28:11 (2.12 MB/s) - “nagiosql.import.monitoring” saved [43762]

IMPORTING /usr/local/nagios/etc/import/bravwc0002.am.nemak.net.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/bravwc0002.am.nemak.net.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:11--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 43,624      --.-K/s   in 0.02s

2018-04-19 15:28:11 (1.96 MB/s) - “nagiosql.import.monitoring” saved [43624]

IMPORTING /usr/local/nagios/etc/import/brawcs0001.am.nemak.net.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/brawcs0001.am.nemak.net.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:11--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 43,486      --.-K/s   in 0.02s

2018-04-19 15:28:12 (2.11 MB/s) - “nagiosql.import.monitoring” saved [43486]

IMPORTING /usr/local/nagios/etc/import/kDlH9vrm.tmp.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/kDlH9vrm.tmp.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:12--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 43,348      --.-K/s   in 0.02s

2018-04-19 15:28:12 (2.20 MB/s) - “nagiosql.import.monitoring” saved [43348]

IMPORTING /usr/local/nagios/etc/import/tDm29WIH.tmp.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/tDm29WIH.tmp.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:12--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 43,232      --.-K/s   in 0.02s

2018-04-19 15:28:13 (2.28 MB/s) - “nagiosql.import.monitoring” saved [43232]

IMPORTING /usr/local/nagios/etc/import/tTl7BNTT.tmp.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/tTl7BNTT.tmp.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:13--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 43,116      --.-K/s   in 0.02s

2018-04-19 15:28:13 (2.62 MB/s) - “nagiosql.import.monitoring” saved [43116]

IMPORTING /usr/local/nagios/etc/import/u7nc28nc.tmp.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/u7nc28nc.tmp.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:13--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 43,000      --.-K/s   in 0.02s

2018-04-19 15:28:14 (2.05 MB/s) - “nagiosql.import.monitoring” saved [43000]

IMPORTING /usr/local/nagios/etc/import/uJ55vYL0.tmp.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/uJ55vYL0.tmp.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:14--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 42,884      --.-K/s   in 0.02s

2018-04-19 15:28:15 (2.04 MB/s) - “nagiosql.import.monitoring” saved [42884]

IMPORTING /usr/local/nagios/etc/import/uMtCCVXA.tmp.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/uMtCCVXA.tmp.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:15--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 42,768      --.-K/s   in 0.02s

2018-04-19 15:28:15 (1.88 MB/s) - “nagiosql.import.monitoring” saved [42768]

IMPORTING /usr/local/nagios/etc/import/vIGnD98N.tmp.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/vIGnD98N.tmp.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:15--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 42,652      --.-K/s   in 0.02s

2018-04-19 15:28:16 (2.32 MB/s) - “nagiosql.import.monitoring” saved [42652]

IMPORTING /usr/local/nagios/etc/import/vOddXUch.tmp.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/vOddXUch.tmp.cfg' -O nagiosql.import.monitoring
--2018-04-19 15:28:16--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                   ] 42,536      --.-K/s   in 0.02s

2018-04-19 15:28:16 (1.86 MB/s) - “nagiosql.import.monitoring” saved [42536]

RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=TNuDjDZ3Z04M' -O nagiosql.login--2018-04-19 15:28:17--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

    [ <=>                                   ] 31,001      --.-K/s   in 0.02s

2018-04-19 15:28:17 (1.67 MB/s) - “nagiosql.login” saved [31001]

LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2018-04-19 15:28:17--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”

    [ <=>                                   ] 33,048      --.-K/s   in 0.01s

2018-04-19 15:28:30 (2.35 MB/s) - “nagiosql.export.monitoring” saved [33048]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
        Checked 574 services.
        Checked 65 hosts.
        Checked 2 host groups.
        Checked 0 service groups.
Error: Contact 'Felipe Bantim' has no service notification commands defined!
Error: Contact 'Felipe Bantim' has no host notification commands defined!
Warning: Service recovery notification option for contact 'nagiosadmin' doesn't make any sense - specify critical and/or warning options as well
        Checked 6 contacts.
        Checked 2 contact groups.
        Checked 124 commands.
        Checked 11 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 65 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 11 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 1
Total Errors:   2

***> One or more problems was encountered while running the pre-flight check...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.
RET: 1
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /usr/local/nagiosxi/scripts
tar: Removing leading `/' from member names
/usr/local/nagiosxi/scripts
LATEST NOM SNAPSHOT: /usr/local/nagiosxi/nom/checkpoints/nagioscore/1524149282.tar.gz
/ /usr/local/nagiosxi/scripts
RESTORING NOM SNAPSHOT : /usr/local/nagiosxi/nom/checkpoints/nagioscore/1524149282.tar.gz
tar: usr/local/nagios/etc/hosts: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/hosts: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp/pages: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp/pages: Cannot change mode to rwxrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp/check_commands: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp/check_commands: Cannot change mode to rwxrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp: Cannot change mode to rwxrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/import: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/import: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/services: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/services: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc/static: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/static: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: usr/local/nagios/etc: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc: Cannot change mode to rwsrwsr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
/usr/local/nagiosxi/scripts
RESETTING PERMS
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI is not able to connect to the NSClient++

Post by lmiltchev »

I noticed the following errors in the output:
Error: Contact 'Felipe Bantim' has no service notification commands defined!
Error: Contact 'Felipe Bantim' has no host notification commands defined!
Go to the Core Configuration Manager > Alerting > Contacts, click on the 'Felipe Bantim' contact, go to the "Alert Settings" tab, click on "Manage Host Notification Commands", and add the "xi_host_notification_handler" command. Do the same thing for the services - click on the "Manage Host Notification Commands" button, and add "xi_service_notification_handler" command. Close.

Don't apply configuration yet. Go to CCM > Tools > Config File Management, and click on "Write Configs", then click on "Verify Files". If you see any configuration errors, go back to the CCM and fix them. If there are no errors in the output, apply configuration.

Let us know if this helped. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
FelipeBantim
Posts: 7
Joined: Thu Apr 19, 2018 6:59 am

Re: Nagios XI is not able to connect to the NSClient++

Post by FelipeBantim »

lmiltchev wrote:I noticed the following errors in the output:
Error: Contact 'Felipe Bantim' has no service notification commands defined!
Error: Contact 'Felipe Bantim' has no host notification commands defined!
Go to the Core Configuration Manager > Alerting > Contacts, click on the 'Felipe Bantim' contact, go to the "Alert Settings" tab, click on "Manage Host Notification Commands", and add the "xi_host_notification_handler" command. Do the same thing for the services - click on the "Manage Host Notification Commands" button, and add "xi_service_notification_handler" command. Close.

Don't apply configuration yet. Go to CCM > Tools > Config File Management, and click on "Write Configs", then click on "Verify Files". If you see any configuration errors, go back to the CCM and fix them. If there are no errors in the output, apply configuration.

Let us know if this helped. Thank you!
It's working properly!!! Thank you for your help! :D :D :D
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI is not able to connect to the NSClient++

Post by lmiltchev »

I am glad I could help! :) I am closing this topic now. If you have any more questions/issues, please start a new thread. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked