set up instructions for 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.
vinmansbrew
Posts: 26
Joined: Wed Jan 22, 2020 5:26 pm

set up instructions for nagios core

Post by vinmansbrew »

I am trying an install of nagios core 4.4.13. I have it installed and it starts, authenticates, all that. What I need help with it actually configuring the service and host groups. Sp I can actually see and monitor things. It'll end up monitoring switches, linux, windows, and probably other stuff.
I can create empty cfg files, and add them into nagios.cfg. As soon as I enter anything, nagios will not restart.

I haven't seem to have found the correct documentation, so that is primarily what I would like.
I can't imagine the process is super complicated?
vinmansbrew
Posts: 26
Joined: Wed Jan 22, 2020 5:26 pm

Re: set up instructions for nagios core

Post by vinmansbrew »

Well, the problem is, I create the cfg file I want under /objects. Add it to the nagios.cfg. That is fine, and I can restart nagios.
As soon as I add something to the file I made, anything at all, even commented lines, nagios fails to restart.
ppear
Posts: 9
Joined: Tue Nov 14, 2023 7:17 am

Re: set up instructions for nagios core

Post by ppear »

Can you post some results from the "/usr/local/nagios/sbin/nagios -v /usr/local/nagios/etc/nagios.cfg" command?
vinmansbrew
Posts: 26
Joined: Wed Jan 22, 2020 5:26 pm

Re: set up instructions for nagios core

Post by vinmansbrew »

I am unable to run that command.
/usr/local/nagios/sbin/nagios: no such file or directory.

I made a flub on my original post, I didn't list the OS, which is RHEL 8.8.
Most people are used to Ubuntu, but many commands do not work on both. That may be why this 1 didn't.
my apologies.
kabamaru
Posts: 11
Joined: Thu Sep 14, 2023 4:45 am

Re: set up instructions for nagios core

Post by kabamaru »

type which nagios and it should tell you where the executable is.
ppear
Posts: 9
Joined: Tue Nov 14, 2023 7:17 am

Re: set up instructions for nagios core

Post by ppear »

vinmansbrew wrote: Thu Nov 30, 2023 2:42 pm I am unable to run that command.
/usr/local/nagios/sbin/nagios: no such file or directory.

I made a flub on my original post, I didn't list the OS, which is RHEL 8.8.
Most people are used to Ubuntu, but many commands do not work on both. That may be why this 1 didn't.
my apologies.
I have my nagios core installed on RHEL 8. AND....I gave you the wrong string.It should be "usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg". Not /sbin. It's the typical config validation.

https://assets.nagios.com/downloads/nag ... nfig.html
vinmansbrew
Posts: 26
Joined: Wed Jan 22, 2020 5:26 pm

Re: set up instructions for nagios core

Post by vinmansbrew »

I'll have to use that command as I attempt to add things.
This is what it looks like, with nagios running.

Nagios Core 4.4.13
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2023-06-01
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 8 services.
Checked 1 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 1 contact groups.
Checked 24 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 1 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 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
ppear
Posts: 9
Joined: Tue Nov 14, 2023 7:17 am

Re: set up instructions for nagios core

Post by ppear »

Can you add your config files to (EDIT) nagios.cfg, which breaks the service, and provide the results of the same -v command? Also, check the permissions on your newly created object files to ensure Nagios can read them. If Root owns them, I suspect that may be the issue.
Last edited by ppear on Thu Dec 28, 2023 1:35 am, edited 1 time in total.
vinmansbrew
Posts: 26
Joined: Wed Jan 22, 2020 5:26 pm

Re: set up instructions for nagios core

Post by vinmansbrew »

So, no ansible.cfg, so I used a linux.cfg.
I added an entry, which broke it. The error was:
Error: Could not find any hostgroup matching 'rhel-servers' (config file '/usr/local/nagios/etc/objects/linux.cfg', starting on line 32)

However, I can't seem to find how to set up hostgroups?
Post Reply