Page 1 of 2

Monitoring Engine Process not running

Posted: Tue Sep 24, 2024 6:01 am
by ignacio.sanchez
Hello,
I migrated a Nagios XI server from 2024R1.0.2 to 2024R1.2.1 (successfully, apparently), but the Monitoring Engine Process is not running.

Untitled.png

I checked all possible logs (that I'm aware of), but no major issues.

Can you please let me know what to do?

Thank you!

Re: Monitoring Engine Process not running

Posted: Tue Sep 24, 2024 9:39 am
by sgardil
ignacio.sanchez wrote: Tue Sep 24, 2024 6:01 am Hello,
I migrated a Nagios XI server from 2024R1.0.2 to 2024R1.2.1 (successfully, apparently), but the Monitoring Engine Process is not running.


Untitled.png


I checked all possible logs (that I'm aware of), but no major issues.

Can you please let me know what to do?

Thank you!
Hey @ignacio.sanchez

Could I get a little more information, when you say migrated did you go from one distro of linux to another? Also what os are you currently on? If you did migrate what version of installation did you do (i.e rpm, ova etc)

Re: Monitoring Engine Process not running

Posted: Tue Sep 24, 2024 9:59 am
by jsimon
Hi @ignacio.sanchez,

This could be due to a known issue where newer versions of Nagios XI are attempting to upgrade your Nagios Core version to a version that is incompatible with certain older versions of NDO, or other NEB modules. Let's run these commands to check those versions and identify next steps:

Check Nagios Core's version:

Code: Select all

/usr/local/nagios/bin/nagios --version
Check NEB module versions:

Code: Select all

cat /usr/local/nagios/etc/nagios.cfg | grep broker_module
Check NDO version:

Code: Select all

/usr/bin/strings /usr/local/nagios/bin/ndo.so | grep Copyright

Re: Monitoring Engine Process not running

Posted: Wed Sep 25, 2024 1:25 am
by ignacio.sanchez
sgardil wrote: Tue Sep 24, 2024 9:39 am Hey @ignacio.sanchez

Could I get a little more information, when you say migrated did you go from one distro of linux to another? Also what os are you currently on? If you did migrate what version of installation did you do (i.e rpm, ova etc)
Yes, we are migrating from the old (and discontinued) CentOS 7.9 to CentOS Stream 9, following the migration process from Nagios (already did with another 3 servers previously)
https://answerhub.nagios.com/support/s/ ... 4-b36feda0



jsimon wrote: Tue Sep 24, 2024 9:59 am Hi @ignacio.sanchez,

This could be due to a known issue where newer versions of Nagios XI are attempting to upgrade your Nagios Core version to a version that is incompatible with certain older versions of NDO, or other NEB modules. Let's run these commands to check those versions and identify next steps:

Check Nagios Core's version:

Code: Select all

/usr/local/nagios/bin/nagios --version
Check NEB module versions:

Code: Select all

cat /usr/local/nagios/etc/nagios.cfg | grep broker_module
Check NDO version:

Code: Select all

/usr/bin/strings /usr/local/nagios/bin/ndo.so | grep Copyright

Code: Select all

[root@localhost ~]# /usr/local/nagios/bin/nagios --version

Nagios Core 4.5.3
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2024-06-11

Code: Select all

[root@localhost ~]# cat /usr/local/nagios/etc/nagios.cfg | grep broker_module

broker_module=/usr/local/nagios/bin/ndo.so /usr/local/nagios/etc/ndo.cfg

Code: Select all

[root@localhost ~]# /usr/bin/strings /usr/local/nagios/bin/ndo.so | grep Copyright

NDO 3.1.1 (c) Copyright 2009-2024 Nagios - Nagios Core Development Team
Thank you both!

Re: Monitoring Engine Process not running

Posted: Wed Sep 25, 2024 9:57 am
by jsimon
Alright, those versions do look like they should be compatible with each other. Let's try this next. Go to your Core Config Manager, and then to Config File Management, under the Tools header. Click on "Delete Files", then on "Write Configs", and then on "Verify Files". Post the output you see here, assuming this doesn't fix the issue on it's own. This will let us know if you have any faulty configurations that are preventing Nagios Core from running.

You could also try running

Code: Select all

systemctl restart nagios.service
at the command line level and seeing if any errors are output here.

Re: Monitoring Engine Process not running

Posted: Thu Sep 26, 2024 5:42 am
by ignacio.sanchez
Hello,

All seems good after following the process, but unfortunately, it is still not working.

Code: Select all

Nagios Core 4.5.3
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2024-06-11
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 4063 services.
Checked 457 hosts.
Checked 31 host groups.
Checked 0 service groups.
Checked 36 contacts.
Checked 13 contact groups.
Checked 170 commands.
Checked 46 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 457 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 46 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Code: Select all

[root@localhost ~]# systemctl restart nagios.service

[root@localhost  ~]# systemctl status nagios.service
● nagios.service - Nagios Core 4.5.3
     Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; preset: disabled)
     Active: active (running) since Thu 2024-09-26 05:40:46 CDT; 6s ago
       Docs: https://www.nagios.org/documentation
    Process: 1025050 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=>
    Process: 1025051 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exi>
   Main PID: 1025052 (nagios)
      Tasks: 31 (limit: 203506)
     Memory: 80.9M
        CPU: 10.852s
     CGroup: /system.slice/nagios.service
...

Re: Monitoring Engine Process not running

Posted: Thu Sep 26, 2024 9:56 am
by jsimon
Interesting. If Core is running and isn't showing any configuration issues, it's possible this is a database issue. Can you try running the repair_databases.sh script? It's located at

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh

Re: Monitoring Engine Process not running

Posted: Fri Sep 27, 2024 5:50 am
by ignacio.sanchez
Already did that too previously (did it again)

Code: Select all

===============
REPAIR COMPLETE
===============
DATABASE: nagiosql
TABLE:
/var/lib/mysql/nagiosql ~
DATABASE: nagiosxi
TABLE:
/var/lib/mysql/nagiosxi ~

=======================
nagios database repair succeeded
I tried updating Nagios from 2024R1.2.1 to 2024R1.2.2, but still no luck :?

Re: Monitoring Engine Process not running

Posted: Fri Sep 27, 2024 9:17 am
by jsimon
I think most likely the best route to success here at this point is to open a ticket with Nagios Support. Sending them a system profile should help dig into this more conclusively. I've included a link below:

https://answerhub.nagios.com/support/s/

Re: Monitoring Engine Process not running

Posted: Fri Sep 27, 2024 12:04 pm
by snapier3
Just for Ss ang Gs, take a look at the sudoers file on your server and make sure that the entries for nagios are there.

Code: Select all

User_Alias      NAGIOSXI=nagios
User_Alias      NAGIOSXIWEB=www-data
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/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/scripts/components/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/send_to_nls.php *
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/migrate/migrate.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/components/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/manage_ssl_config.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/toggle_modsecurity.sh -e
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/toggle_modsecurity.sh -d
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
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/scripts/components/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/components/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *