Deleting, Adding, and updating on 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
BKov
Posts: 5
Joined: Mon Jun 23, 2014 5:13 pm

Deleting, Adding, and updating on Nagios Core

Post by BKov »

All,

I need your help. I am really new to nagios. I been instructed to find out how to delete, add, or update Nagios. Since the system admin left, no one knows how to make these changes or if Core Config Manager can be access with this version. Apparently, the nagios version we are using is Nagios 3.0.6 which I found out from Nagios Support is Nagios Core free product. My question is if the Nagios Core does not have Core Config Manager how does one go about adding, deleting, etc?

Thank you
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Deleting, Adding, and updating on Nagios Core

Post by tmcdonald »

Nagios Core is our free product and does not include the Core Config Manager. All configuration in Core is done by editing the .cfg text files on the command line (or via FTP, SFTP, etc). Here's a link to the Nagios Quickstart guide which should get you on the right track:

http://nagios.sourceforge.net/docs/3_0/quickstart.html

If you have any specific questions, feel free to ask here.
Former Nagios employee
BKov
Posts: 5
Joined: Mon Jun 23, 2014 5:13 pm

Re: Deleting, Adding, and updating on Nagios Core

Post by BKov »

tmcdonald,

Thank you for the link. It will be very helpful. I read through the Windows Machine, and I notice I am in my windows command prompt C:\Users\Bk> and I can't access vi /usr/local/nagios/etc/objects/windows.cfg

Are we entering this on the windows command prompt from my desktop or from the server that the program is installed on or am I missing something.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Deleting, Adding, and updating on Nagios Core

Post by tmcdonald »

All configuration of Nagios Core needs to be done on the Nagios Core server's command line.
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Deleting, Adding, and updating on Nagios Core

Post by eloyd »

@tmdconald is giving you instructions to type on your Linux-based Nagios Core machine, not your Windows machine.

So you need to have a terminal session open to your Nagios box and type

Code: Select all

vi /usr/local/nagios/etc/objects/windows.cfg
This will open an editor called "vi" which is a somewhat complex editor. Unfortunately, it's beyond the scope of this forum to help you with it, so you may want to search the web for tips.

Also, instead of "vi" you might have "nano" installed, which is an easier editor. So you could try

Code: Select all

nano /usr/local/nagios/etc/objects/windows.cfg
instead.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
BKov
Posts: 5
Joined: Mon Jun 23, 2014 5:13 pm

Re: Deleting, Adding, and updating on Nagios Core

Post by BKov »

Thank you, all.

My manager said that our old system admin had been using Putty as an editor and all we need was the file to look into. I think, the .cfg text file is the one that I will test out today on Putty to see if it will allow me to change anything.

Thanks for all your help.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Deleting, Adding, and updating on Nagios Core

Post by eloyd »

Putty is a terminal, not an editor. In other words, you use putty to get a terminal window on your Linux machine. Once logged in, you will still need to use vi or nano (or some other editor) to edit your files.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Deleting, Adding, and updating on Nagios Core

Post by tmcdonald »

BKov wrote:all we need was the file to look into
Is it safe to close this thread up now?
Former Nagios employee
BKov
Posts: 5
Joined: Mon Jun 23, 2014 5:13 pm

Re: Deleting, Adding, and updating on Nagios Core

Post by BKov »

Hi tcmdonald,

I am still having issues with trying to learn Nagios core. I haven't had much time using it, but when I do, it is still confusing to me. My IS manager says our system admin had been using putty to setup the host monitoring environment. If he used an VI editor with putty, the IS manager is not aware of. I am able to SSH on putty and login and see the files he created but, when I use the command VI server.cfg it is blank? Should I be able to see the ones he has created and edited it?

Thanks
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Deleting, Adding, and updating on Nagios Core

Post by Box293 »

BKov wrote:Should I be able to see the ones he has created and edited it?
Yes, but first you need to know which files are being used by Nagios.

You will need to check your /usr/local/nagios/etc/nagios.cfg file as it defines the config files Nagios uses.

This is for an individual server:

Code: Select all

cfg_file=/usr/local/nagios/etc/objects/localhost.cfg

This is for all config files in a directory:

Code: Select all

cfg_dir=/usr/local/nagios/etc/servers
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked