Problem restarting nagios core

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
betty
Posts: 4
Joined: Tue Jul 17, 2018 5:08 am

Problem restarting nagios core

Post by betty »

Hello everybody,
I need help please with nagios Core.
I added a new host into nagios server but nagios won't restart.
i used the command 'service nagios restart' but it gives me this message:" stop: Unknown job: nagios
start: Unknown job: nagios"
I ve tried doing it manuelly but still doesn t work.
if anyone could help me please!!!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Problem restarting nagios core

Post by mcapra »

Which version of Nagios Core are you using?

How was Nagios Core installed? Did you follow any particular documentation/tutorials?

Which operating system is the machine using?
Former Nagios employee
https://www.mcapra.com/
betty
Posts: 4
Joined: Tue Jul 17, 2018 5:08 am

Re: Problem restarting nagios core

Post by betty »

I am using nagios4.4.1 on Ubuntu 14.04
I followed the documentation in the link below:
http://sharadchhetri.com/2014/08/25/ins ... 14-04-lts/
Thank you.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Problem restarting nagios core

Post by lmiltchev »

I haven't tried installing Nagios Core using this particular guide, but this sounds like a problem with the nagios init file. The file has to have a lot more code in it and it's usually located in the /etc/init.d directory. I would recommend starting "clean".

Please use our official guide for installing Nagios Core on Ubuntu here:
https://support.nagios.com/kb/article/n ... tml#Ubuntu
Be sure to check out our Knowledgebase for helpful articles and solutions!
betty
Posts: 4
Joined: Tue Jul 17, 2018 5:08 am

Re: Problem restarting nagios core

Post by betty »

I did follow the official documentation and it s working perfectly. Thank you.
Now i need to add a new host to my server. I ve looked for the official documentation for that but couldn t find it.
If you could help me with this.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Problem restarting nagios core

Post by lmiltchev »

What part of the Nagios Core official documentation did you read? There are sections about monitoring various types of hosts, e.g. Windows, Linux, printers, switches, etc.

Also, there is a section on object definitions here: https://assets.nagios.com/downloads/nag ... tions.html.

I would recommend reading the documentation carefully first then trying to configure Nagios Core on your own. If you have a specific question/issue, we will gladly help. However, we do not provide Nagios training per se on the forum.

Having said that, here's what you can try:

1. Start simple - add one host. The configuration files for hosts/services are usually located in the "/usr/local/nagios/etc/objects/" directory. In order for nagios to "see" the new config, you should add the path to it in the nagios.cfg (main nagios config).

Example host config:

Code: Select all

define host{
        use             windows-server
        host_name       winserver
        alias           My Windows Server
        address         192.168.0.100
        }
Example entry in the nagios.cfg (path to the windows.cfg configuration file):

Code: Select all

# Definitions for monitoring a Windows machine
cfg_file=/usr/local/nagios/etc/objects/windows.cfg
2. Test your configuration for errors by running:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
3. If you see any errors, try to fix them fist as nagios cannot start/restart with config errors.

4. If there are no errors, restart nagios:

Code: Select all

service nagios restart
5. Check to see if the host showed up in the GUI.

6. Add services to this host, verify the configuration, restart nagios, check the GUI, etc.

Since you are new to Nagios Core, you may need to watch our Nagios Core "Tour" videos here:

https://youtu.be/2hVBAet-XpY

If you struggle with manual configuration in Nagios Core, you can always purchase (or at least try) Nagios XI, where configuration is a lot easier.

https://www.nagios.com/products/nagios-xi/

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
betty
Posts: 4
Joined: Tue Jul 17, 2018 5:08 am

Re: Problem restarting nagios core

Post by betty »

Okay.
Thank you so much for your help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problem restarting nagios core

Post by scottwilkerson »

betty wrote:Okay.
Thank you so much for your help.
closing
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked