Page 8 of 9

Re: nagios service issue

Posted: Tue May 16, 2017 9:00 pm
by nschetu
As per the above message I changed user/group permission for /usr/local/nagiosxi/var/* path after stopping mentioned services.
Also providing nagios.servie details below. Please check and let me know.
[root@bhusprv024 ~]#
[root@bhusprv024 ~]# cat /etc/systemd/system/nagios.service
[Unit]
Description=Nagios
BindTo=network.target

[Install]
WantedBy=multi-user.target

[Service]
User=nagios
Group=nagios
Type=simple
ExecStart=/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
[root@bhusprv024 ~]#

Re: nagios service issue

Posted: Wed May 17, 2017 9:18 am
by tgriep
The command to start the nagios service is missing the daemon that starts nagios as a daemon.
-d, --daemon Starts Nagios in daemon mode, instead of as a foreground process
To add this, edit this file

Code: Select all

/etc/systemd/system/nagios.service
Change this line from

Code: Select all

ExecStart=/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
to

Code: Select all

ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Save the file and restart the service.

Then see if the nagios daemon creates the status file.

Normally the nagios daemon is started by the init.d script, and that script creates the required files is uses to create / gather the status files.

Code: Select all

/etc/init.d/nagios start
/etc/init.d/nagios stop
/etc/init.d/nagios status
etc...

Re: nagios service issue

Posted: Wed May 17, 2017 11:12 am
by nschetu
Thanks for the info. We are able to start Nagios service after changing adding that line but it will stop after few minutes. Please check and let me know.
[root@bhusprv024 var]# /etc/init.d/nagios stop
Stopping nagios (via systemctl): [ OK ]
[root@bhusprv024 var]# /etc/init.d/nagios start
Starting nagios (via systemctl): [ OK ]
[root@bhusprv024 var]# /etc/init.d/nagios status
nagios (pid 24234) is running...
[root@bhusprv024 var]# /etc/init.d/nagios status
nagios (pid 24234) is running...
[root@bhusprv024 var]# /etc/init.d/nagios status
nagios is not running

Re: nagios service issue

Posted: Wed May 17, 2017 11:34 am
by tgriep
Do you see any errors in the following log files?

Code: Select all

/usr/local/nagios/var/nagios.log
/var/log/messages
If so, can you post them so we can determine why the daemon is stopping?

Re: nagios service issue

Posted: Thu May 18, 2017 7:25 am
by nschetu
now it is working after Executing below command separately. Thanks for your great help and really appreciate your support.
ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Re: nagios service issue

Posted: Thu May 18, 2017 10:23 am
by tgriep
That is good to hear that it is working.
Shall I mark the post as solved and lock it up for you?

Re: nagios service issue

Posted: Fri May 19, 2017 9:02 am
by nschetu
Sure you can close but I need one more help on nagios tool.
Our colleague created dashboard under home page from his login id but I am not able to see those details in my login id.
Want to know how to share those dashboard to others. You can find the screen short below.

Re: nagios service issue

Posted: Fri May 19, 2017 10:23 am
by tgriep
Dashboards are created on a per user basis so one user cannot see another users dashboard.
If the Enterprise feature is enabled on the server, the other user can deploy their dashboard to another account by clicking on the Deploy Dashboards link in the menu, select the Dashboard, the users and deploy it that way.
For more details on dashboards, take a look at this document.
http://assets.nagios.com/downloads/nagi ... boards.pdf

Re: nagios service issue

Posted: Sat May 20, 2017 12:20 am
by nschetu
Thanks for the update.
Also want to know some information about Selenium tool.
We are using Selenium tool and want to see if this would be a comparable replacement for Nagios. Selenium is a Firefox plug-in and a testing tool, so its not the same as Nagios.
and want to know what capabilities it has and if it would be a possible replacement for Nagios?

Re: nagios service issue

Posted: Mon May 22, 2017 8:51 am
by tgriep
Selenium is a tool for web browser based testing and automation.
Integrating Selenium with Nagios XI allows users to create service checks which automatically test your website and trigger status changes within Nagios XI if issues occur.
For more details on Selenium and it's capabilities, take a look as the following links.
https://addons.mozilla.org/en-us/firefo ... enium-ide/
http://www.seleniumhq.org/