Page 1 of 1

Deleting, Adding, and updating on Nagios Core

Posted: Tue Jun 24, 2014 5:42 pm
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

Re: Deleting, Adding, and updating on Nagios Core

Posted: Wed Jun 25, 2014 9:17 am
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.

Re: Deleting, Adding, and updating on Nagios Core

Posted: Wed Jun 25, 2014 1:59 pm
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.

Re: Deleting, Adding, and updating on Nagios Core

Posted: Wed Jun 25, 2014 2:03 pm
by tmcdonald
All configuration of Nagios Core needs to be done on the Nagios Core server's command line.

Re: Deleting, Adding, and updating on Nagios Core

Posted: Wed Jun 25, 2014 2:04 pm
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.

Re: Deleting, Adding, and updating on Nagios Core

Posted: Fri Jun 27, 2014 10:13 am
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.

Re: Deleting, Adding, and updating on Nagios Core

Posted: Fri Jun 27, 2014 10:59 am
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.

Re: Deleting, Adding, and updating on Nagios Core

Posted: Mon Jul 07, 2014 9:11 am
by tmcdonald
BKov wrote:all we need was the file to look into
Is it safe to close this thread up now?

Re: Deleting, Adding, and updating on Nagios Core

Posted: Mon Jul 07, 2014 3:44 pm
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

Re: Deleting, Adding, and updating on Nagios Core

Posted: Mon Jul 07, 2014 10:17 pm
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