Not able to start nagios services getting below error. Please check and guide us.
[root@bhusprv024 run]# /etc/init.d/nagios start
Starting nagios (via systemctl): Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[FAILED]
[root@bhusprv024 run]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-05-08 16:13:31 EDT; 1min 37s ago
Docs: man:systemd-sysv-generator(8)
Process: 15639 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)
May 08 16:13:31 bhusprv024.bhprod.ibm.com nagios[15639]: Check your configuration file(s) to ensure that they contain valid
May 08 16:13:31 bhusprv024.bhprod.ibm.com nagios[15639]: directives and data defintions. If you are upgrading from a previous
May 08 16:13:31 bhusprv024.bhprod.ibm.com nagios[15639]: version of Nagios, you should be aware that some variables/definitions
May 08 16:13:31 bhusprv024.bhprod.ibm.com nagios[15639]: may have been removed or modified in this version. Make sure to read
May 08 16:13:31 bhusprv024.bhprod.ibm.com nagios[15639]: the HTML documentation regarding the config files, as well as the
May 08 16:13:31 bhusprv024.bhprod.ibm.com nagios[15639]: 'Whats New' section to find out what has changed.
May 08 16:13:31 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service: control process exited, code=exited status=8
May 08 16:13:31 bhusprv024.bhprod.ibm.com systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
May 08 16:13:31 bhusprv024.bhprod.ibm.com systemd[1]: Unit nagios.service entered failed state.
May 08 16:13:31 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service failed.
nagios service issue
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: nagios service issue
It's possible you have a mismatch between your core and ndo versions which XI uses. If that's the case, we'll probably just have you upgrade.
It's possible you are using livestatus and it did not compile correctly. We'll need the output of the following commands to determine whether that's the issue:
It's also possible this is a bug in ndoutils.
In order to help determine the cause, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
It's possible you are using livestatus and it did not compile correctly. We'll need the output of the following commands to determine whether that's the issue:
Code: Select all
systemctl stop nagios.service
systemctl stop ndo2db.service
systemctl start ndo2db.service
systemctl start nagios.service
systemctl status nagios.service
systemctl status ndo2db.service
grep live /usr/local/nagios/var/nagios.log
grep broker /usr/local/nagios/etc/nagios.cfg
ll /usr/local/lib/mk-livestatus
ll /usr/local/nagios/var/rw
In order to help determine the cause, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
Re: nagios service issue
Thanks for the reply. Please find the below details which you asked in this chat. Also let me know if you required more information.
[root@bhusprv024 ~]# systemctl stop nagios.service
[root@bhusprv024 ~]# systemctl stop ndo2db.service
[root@bhusprv024 ~]# systemctl start ndo2db.service
[root@bhusprv024 ~]# systemctl start nagios.service
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[root@bhusprv024 ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-05-08 22:18:52 EDT; 19s ago
Docs: man:systemd-sysv-generator(8)
Process: 24475 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: Check your configuration file(s) to ensure that they contain valid
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: directives and data defintions. If you are upgrading from a previous
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: version of Nagios, you should be aware that some variables/definitions
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: may have been removed or modified in this version. Make sure to read
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: the HTML documentation regarding the config files, as well as the
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: 'Whats New' section to find out what has changed.
May 08 22:18:52 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service: control process exited, code=exited status=8
May 08 22:18:52 bhusprv024.bhprod.ibm.com systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
May 08 22:18:52 bhusprv024.bhprod.ibm.com systemd[1]: Unit nagios.service entered failed state.
May 08 22:18:52 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service failed.
[root@bhusprv024 ~]# systemctl status ndo2db.service
● ndo2db.service - Nagios Data Out Daemon
Loaded: loaded (/usr/lib/systemd/system/ndo2db.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2017-05-08 22:18:38 EDT; 1min 1s ago
Docs: http://www.nagios.org/documentation
Process: 24407 ExecStopPost=/bin/rm -f /usr/local/nagios/var/ndo2db.pid (code=exited, status=0/SUCCESS)
Main PID: 24422 (ndo2db)
CGroup: /system.slice/ndo2db.service
└─24422 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f
May 08 22:18:38 bhusprv024.bhprod.ibm.com systemd[1]: Started Nagios Data Out Daemon.
May 08 22:18:38 bhusprv024.bhprod.ibm.com systemd[1]: Starting Nagios Data Out Daemon...
[root@bhusprv024 ~]# grep live /usr/local/nagios/var/nagios.log
[root@bhusprv024 ~]# grep broker /usr/local/nagios/etc/nagios.cfg
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
event_broker_options=-1
[root@bhusprv024 ~]# ll /usr/local/lib/mk-livestatus
ls: cannot access /usr/local/lib/mk-livestatus: No such file or directory
[root@bhusprv024 ~]# ll /usr/local/nagios/var/rw
total 0
[root@bhusprv024 ~]#
when I click download PM profile button got below error message
PROFILE BUILD FAILED
Array
(
)
CODE: 1
[root@bhusprv024 ~]# systemctl stop nagios.service
[root@bhusprv024 ~]# systemctl stop ndo2db.service
[root@bhusprv024 ~]# systemctl start ndo2db.service
[root@bhusprv024 ~]# systemctl start nagios.service
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[root@bhusprv024 ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-05-08 22:18:52 EDT; 19s ago
Docs: man:systemd-sysv-generator(8)
Process: 24475 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: Check your configuration file(s) to ensure that they contain valid
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: directives and data defintions. If you are upgrading from a previous
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: version of Nagios, you should be aware that some variables/definitions
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: may have been removed or modified in this version. Make sure to read
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: the HTML documentation regarding the config files, as well as the
May 08 22:18:52 bhusprv024.bhprod.ibm.com nagios[24475]: 'Whats New' section to find out what has changed.
May 08 22:18:52 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service: control process exited, code=exited status=8
May 08 22:18:52 bhusprv024.bhprod.ibm.com systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
May 08 22:18:52 bhusprv024.bhprod.ibm.com systemd[1]: Unit nagios.service entered failed state.
May 08 22:18:52 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service failed.
[root@bhusprv024 ~]# systemctl status ndo2db.service
● ndo2db.service - Nagios Data Out Daemon
Loaded: loaded (/usr/lib/systemd/system/ndo2db.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2017-05-08 22:18:38 EDT; 1min 1s ago
Docs: http://www.nagios.org/documentation
Process: 24407 ExecStopPost=/bin/rm -f /usr/local/nagios/var/ndo2db.pid (code=exited, status=0/SUCCESS)
Main PID: 24422 (ndo2db)
CGroup: /system.slice/ndo2db.service
└─24422 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f
May 08 22:18:38 bhusprv024.bhprod.ibm.com systemd[1]: Started Nagios Data Out Daemon.
May 08 22:18:38 bhusprv024.bhprod.ibm.com systemd[1]: Starting Nagios Data Out Daemon...
[root@bhusprv024 ~]# grep live /usr/local/nagios/var/nagios.log
[root@bhusprv024 ~]# grep broker /usr/local/nagios/etc/nagios.cfg
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
event_broker_options=-1
[root@bhusprv024 ~]# ll /usr/local/lib/mk-livestatus
ls: cannot access /usr/local/lib/mk-livestatus: No such file or directory
[root@bhusprv024 ~]# ll /usr/local/nagios/var/rw
total 0
[root@bhusprv024 ~]#
when I click download PM profile button got below error message
PROFILE BUILD FAILED
Array
(
)
CODE: 1
Re: nagios service issue
Also I got error while doing installation time and then later created file "installed.importnagiosql" using touch command. After doing this it moved to next step.
May be files are not importing. Please check and help us.
[root@bhusprv024 nagiosxi]# ./E-importnagiosql
./E-importnagiosql: line 21: killall: command not found
Applying patches to Apache configs for Apache 2.4.x syntax...
Redirecting to /bin/systemctl start httpd.service
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed?
May be files are not importing. Please check and help us.
[root@bhusprv024 nagiosxi]# ./E-importnagiosql
./E-importnagiosql: line 21: killall: command not found
Applying patches to Apache configs for Apache 2.4.x syntax...
Redirecting to /bin/systemctl start httpd.service
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed?
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: nagios service issue
Please run through https://support.nagios.com/kb/article.p ... ategory=44 (****but for your version of XI****)
It's possible that will resolve all of your issues, but if not, please send the profile after you complete.
As a reminder, you can download it by going to Admin > System Config > System Profile and click the Download Profile button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
It's possible that will resolve all of your issues, but if not, please send the profile after you complete.
As a reminder, you can download it by going to Admin > System Config > System Profile and click the Download Profile button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
Last edited by dwhitfield on Tue May 09, 2017 12:21 pm, edited 1 time in total.
Reason: version clarification
Reason: version clarification
Re: nagios service issue
Hi
Still getting same error message from system profile after downloading and also providing other details below for verification. Please check and suggest us
PROFILE BUILD FAILED
Array
(
)
CODE: 1
Note: We are facing this issue while doing fresh installation and we not upgrading.
We followed below URL document while installation time.
https://assets.nagios.com/downloads/nag ... 1493894600
As I told in earlier got below error message while doing installation time then later created file "installed.importnagiosql" using touch command. After doing this it moved to next step.
Here files are not imported. May be due this I are facing other issues.
Also getting error message {could not find any host matching 'bhusprv024' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)} while checking version. Output provided below.
[root@bhusprv024 nagiosxi]# ./E-importnagiosql
./E-importnagiosql: line 21: killall: command not found
Applying patches to Apache configs for Apache 2.4.x syntax...
Redirecting to /bin/systemctl start httpd.service
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed
[root@bhusprv024 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
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...
Error: Could not find any host matching 'bhusprv024' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
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.
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# /etc/init.d/nagios stop
Stopping nagios (via systemctl): [ OK ]
[root@bhusprv024 ~]# /etc/init.d/nagios start
Starting nagios (via systemctl): Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[FAILED]
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-05-09 22:24:01 EDT; 32s ago
Docs: man:systemd-sysv-generator(8)
Process: 14779 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: Check your configuration file(s) to ensure that they contain valid
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: directives and data defintions. If you are upgrading from a previous
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: version of Nagios, you should be aware that some variables/definitions
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: may have been removed or modified in this version. Make sure to read
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: the HTML documentation regarding the config files, as well as the
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: 'Whats New' section to find out what has changed.
May 09 22:24:01 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service: control process exited, code=exited status=8
May 09 22:24:01 bhusprv024.bhprod.ibm.com systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
May 09 22:24:01 bhusprv024.bhprod.ibm.com systemd[1]: Unit nagios.service entered failed state.
May 09 22:24:01 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service failed.
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# journalctl -xe
-- Unit session-8408.scope has begun starting up.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Started Session 8410 of user nagios.
-- Subject: Unit session-8410.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8410.scope has finished starting up.
--
-- The start-up result is done.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Starting Session 8410 of user nagios.
-- Subject: Unit session-8410.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8410.scope has begun starting up.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Started Session 8409 of user nagios.
-- Subject: Unit session-8409.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8409.scope has finished starting up.
--
-- The start-up result is done.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Starting Session 8409 of user nagios.
-- Subject: Unit session-8409.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8409.scope has begun starting up.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Started Session 8411 of user nagios.
-- Subject: Unit session-8411.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8411.scope has finished starting up.
--
-- The start-up result is done.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Starting Session 8411 of user nagios.
-- Subject: Unit session-8411.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8411.scope has begun starting up.
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15075]: (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)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15076]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15077]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15078]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15083]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15086]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15084]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15082]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15089]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Still getting same error message from system profile after downloading and also providing other details below for verification. Please check and suggest us
PROFILE BUILD FAILED
Array
(
)
CODE: 1
Note: We are facing this issue while doing fresh installation and we not upgrading.
We followed below URL document while installation time.
https://assets.nagios.com/downloads/nag ... 1493894600
As I told in earlier got below error message while doing installation time then later created file "installed.importnagiosql" using touch command. After doing this it moved to next step.
Here files are not imported. May be due this I are facing other issues.
Also getting error message {could not find any host matching 'bhusprv024' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)} while checking version. Output provided below.
[root@bhusprv024 nagiosxi]# ./E-importnagiosql
./E-importnagiosql: line 21: killall: command not found
Applying patches to Apache configs for Apache 2.4.x syntax...
Redirecting to /bin/systemctl start httpd.service
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed
[root@bhusprv024 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
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...
Error: Could not find any host matching 'bhusprv024' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
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.
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# /etc/init.d/nagios stop
Stopping nagios (via systemctl): [ OK ]
[root@bhusprv024 ~]# /etc/init.d/nagios start
Starting nagios (via systemctl): Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[FAILED]
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-05-09 22:24:01 EDT; 32s ago
Docs: man:systemd-sysv-generator(8)
Process: 14779 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=8)
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: Check your configuration file(s) to ensure that they contain valid
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: directives and data defintions. If you are upgrading from a previous
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: version of Nagios, you should be aware that some variables/definitions
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: may have been removed or modified in this version. Make sure to read
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: the HTML documentation regarding the config files, as well as the
May 09 22:24:01 bhusprv024.bhprod.ibm.com nagios[14779]: 'Whats New' section to find out what has changed.
May 09 22:24:01 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service: control process exited, code=exited status=8
May 09 22:24:01 bhusprv024.bhprod.ibm.com systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
May 09 22:24:01 bhusprv024.bhprod.ibm.com systemd[1]: Unit nagios.service entered failed state.
May 09 22:24:01 bhusprv024.bhprod.ibm.com systemd[1]: nagios.service failed.
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# journalctl -xe
-- Unit session-8408.scope has begun starting up.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Started Session 8410 of user nagios.
-- Subject: Unit session-8410.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8410.scope has finished starting up.
--
-- The start-up result is done.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Starting Session 8410 of user nagios.
-- Subject: Unit session-8410.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8410.scope has begun starting up.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Started Session 8409 of user nagios.
-- Subject: Unit session-8409.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8409.scope has finished starting up.
--
-- The start-up result is done.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Starting Session 8409 of user nagios.
-- Subject: Unit session-8409.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8409.scope has begun starting up.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Started Session 8411 of user nagios.
-- Subject: Unit session-8411.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8411.scope has finished starting up.
--
-- The start-up result is done.
May 09 22:25:01 bhusprv024.bhprod.ibm.com systemd[1]: Starting Session 8411 of user nagios.
-- Subject: Unit session-8411.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-8411.scope has begun starting up.
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15075]: (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)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15076]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15077]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15078]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15083]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15086]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15084]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15082]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
May 09 22:25:01 bhusprv024.bhprod.ibm.com CROND[15089]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
You do not have the required permissions to view the files attached to this post.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: nagios service issue
Please run /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh, contents saved to/usr/local/nagiosxi/var/components/profile.zip. Then send the profile. If you get an error that /usr/local/nagiosxi/var/components/profile/ does not exist, create it, and then re-run the script.
It looks like you need to clean up your hostgroups. I can't tell you which hostgroup without the profile, or alternatively you could send /usr/local/nagios/etc/hostgroups.cfg. You cannot modify the files directly. You will need to modify them in the CCM. Once you clean up that first host group, re-run /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg and work through the errors until you get no errors.
It looks like you need to clean up your hostgroups. I can't tell you which hostgroup without the profile, or alternatively you could send /usr/local/nagios/etc/hostgroups.cfg. You cannot modify the files directly. You will need to modify them in the CCM. Once you clean up that first host group, re-run /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg and work through the errors until you get no errors.
Re: nagios service issue
Hi,
Thanks for the mail. As per the mail attached Profile.zip and updated hostgroups information.
Also after reverting original hostgroup file getting same error and also let me know where have to modify in CCM with path and detail.
[root@bhusprv024 components]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
[root@bhusprv024 components]#
[root@bhusprv024 components]# uname -a
Linux bhusprv024.bhprod.ibm.com 3.10.0-514.16.1.el7.x86_64 #1 SMP Fri Mar 10 13:12:32 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@bhusprv024 components]#
[root@bhusprv024 components]# cat /usr/local/nagios/etc/hostgroups.cfg
###############################################################################
#
# Hostgroup configuration file
#
# Created by: Nagios Core Config Manager 2.6.5
# Date: 2017-03-16 13:55:39
# Version: Nagios 3.x config file
#
# --- 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 hostgroup {
hostgroup_name linux-servers
alias Linux Servers
members localhost
}
###############################################################################
#
# Timeperiod configuration file
#
# END OF FILE
#
###############################################################################
[root@bhusprv024 components]#
[root@bhusprv024 components]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
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...
Error: Could not find any host matching 'localhost' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
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.
Thanks for the mail. As per the mail attached Profile.zip and updated hostgroups information.
Also after reverting original hostgroup file getting same error and also let me know where have to modify in CCM with path and detail.
[root@bhusprv024 components]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
[root@bhusprv024 components]#
[root@bhusprv024 components]# uname -a
Linux bhusprv024.bhprod.ibm.com 3.10.0-514.16.1.el7.x86_64 #1 SMP Fri Mar 10 13:12:32 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@bhusprv024 components]#
[root@bhusprv024 components]# cat /usr/local/nagios/etc/hostgroups.cfg
###############################################################################
#
# Hostgroup configuration file
#
# Created by: Nagios Core Config Manager 2.6.5
# Date: 2017-03-16 13:55:39
# Version: Nagios 3.x config file
#
# --- 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 hostgroup {
hostgroup_name linux-servers
alias Linux Servers
members localhost
}
###############################################################################
#
# Timeperiod configuration file
#
# END OF FILE
#
###############################################################################
[root@bhusprv024 components]#
[root@bhusprv024 components]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
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...
Error: Could not find any host matching 'localhost' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
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.
You do not have the required permissions to view the files attached to this post.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: nagios service issue
You need to go to http://YOURSERVER/nagiosxi/includes/com ... =hostgroup and take localhost out of whatever hostgroup it is in. Alternatively, you could just create a host in the CCM called localhost.
Modifying the .cfg files will only cause you problems. You need to be using the CCM (Core Config Manager) under "Configure" on the top bar.
If you want to modify things via command line, then you can use the API: http://YOURSERVER/nagiosxi/help/api.php
Modifying the .cfg files will only cause you problems. You need to be using the CCM (Core Config Manager) under "Configure" on the top bar.
If you want to modify things via command line, then you can use the API: http://YOURSERVER/nagiosxi/help/api.php
Re: nagios service issue
You want me to remove all hosts which are in hostgroup ?