Where do i go from here?

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
seapro220
Posts: 11
Joined: Mon Oct 15, 2018 1:57 pm

Where do i go from here?

Post by seapro220 »

Hello.
Apologies if I'm not in the correct area but am trying to gather some 'basic' information on this tool/application.
I have a new install of Ubuntu 18.04 and have followed the steps on download/installing Nagios3. Yea !! I can open the 'default' page and see my initial server and some performance data on it. Yea..again.
Now I want to have it ping/check some other servers - mostly Windows but also a couple of Ubuntu Linux servers. I've looked at the nagios.cfg file and tried to 'uncheck - to enable checks' for servers and switches but must be missing something. From what i've been told the 'basic nagios.cfg' shouldn't be modified other than to enable the 'sections' you want to enable. After that - there should be a directory where i add server ip's, switch ip's, etc to but I don't see that anywhere. Can someone please let me know or point me in the correct direction as to which config i should be modifying and where my 'groups of servers' and 'server ip' data should be configured - so nagios can begin checking those?

thanks -

S
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Where do i go from here?

Post by cdienger »

This is for Nagios Core correct? Which guide did you follow to install? Version 3 is really old and I would recommend going with 4. You'll find installation instructions as well as post install guides at https://assets.nagios.com/downloads/nag ... start.html . The configuration is all done via text files on the file system with Core.

We also have the XI version which allows you to easily configure things via a web interface. It requires a CentOS or Redhat machine and comes with a free trial:

https://assets.nagios.com/downloads/nag ... -Linux.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Where do i go from here?

Post by lmiltchev »

You can define your hosts/services in whatever config you want (for example you can define windows hosts in /usr/local/nagios/etc/objects/windows.cfg) as long as the path to the config is defined in the nagios.cfg file, e.g.

Code: Select all

cfg_file=/usr/local/nagios/etc/objects/windows.cfg
Example config:

Code: Select all

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       winserver       ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.10.10   ; IP address of the host
        }
In order for changes to take place, you need to restart nagios.

I would recommend that you start by reviewing the official nagios documentation here:

https://assets.nagios.com/downloads/nag ... n/toc.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
seapro220
Posts: 11
Joined: Mon Oct 15, 2018 1:57 pm

Re: Where do i go from here?

Post by seapro220 »

Thanks for the info - yes, core is what i'm trying to run.

i'd googled nagios and was taken to some instructions on setting it up - but not downloaded it directly from nagios. I'll go there and try to get it downloaded and tested. As i have this running on a Ubuntu 18.04 desktop (should probably be just a server and no desktop - but done for testing purposes) is there some info that can be passed along whereby i can remove all of version 3 - and start from 'fresh'? or, is is better to build a new box and start from there?

S
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Where do i go from here?

Post by lmiltchev »

Removing the old nagios would be done differently, depending on how you installed it on the first place - from repo or from source. Anyway, you can search for nagios packages by running:

Code: Select all

dpkg -l | grep nagios
and remote them with apt-get remove <package>. You can remove the nagios user and group, /etc/init.d/nagios (if exists), and the entire nagios directory:

Code: Select all

rm -rf /usr/local/nagios/
As far as doing a new, fresh install - follow the instructions below:
https://support.nagios.com/kb/article/n ... tml#Ubuntu

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
seapro220
Posts: 11
Joined: Mon Oct 15, 2018 1:57 pm

Re: Where do i go from here?

Post by seapro220 »

Thanks for the updated info. I've downloaded and installed the version mentioned earlier (4.4.1) and can access the console now - and i have 1 host..itself. the 'main' page states there's a new version .2, but have to get a handle on this product before i worry about upgrading. I'll review the additional information and see how far i can get. From what i understand in previous posts - the 'where' doesn't matter as long as the nagios config referrences it as the location to look. Does that sound correct? I presume that if i'm going to be adding multiple hosts (windows or linux) to monitor that i can list them 'all' in the same config or break it down into 'groups' of windows and linux hosts? The same 'grouping' could also be done with locations, devices, etc - as long as i create the directory structure (as i want) under the /etc/xxx location - and then reference that within the config file. I also presume that in the additional reference documentation there would be references about what the 'config' looks like for servers - switches - etc?

as you've probably noticed, i'm coming from a windoz environment so this is 'all new' to me.

S
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Where do i go from here?

Post by lmiltchev »

From what i understand in previous posts - the 'where' doesn't matter as long as the nagios config referrences it as the location to look. Does that sound correct?
This is correct, however it's a good idea to keep everything neat/organized. Usually, in Nagios Core, objects (e.g. hosts, services, etc.) are defined in the "/usr/local/nagios/etc/objects/" directory. You don't need to group objects by placing them in different locations. You could organize objects by putting them into hostgroups and servicegroups.

Note: When you add a new config or make a change to an existing one, it's a good idea to verify configuration in order to make sure that you don't have any config errors (before restarting nagios). You can verify configuration by running:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Take it slow, one step at the time, and read the documentation. Good luck!
Be sure to check out our Knowledgebase for helpful articles and solutions!
seapro220
Posts: 11
Joined: Mon Oct 15, 2018 1:57 pm

Re: Where do i go from here?

Post by seapro220 »

I've gotten several switches set up to ping and am getting results/responses so the config so far seems to be working. running the 'check' is a good thing as it helps find errors whenever i'm adding several 'sections' to the config. As i have several devices monitoring now - windows hosts and switches - via ping I'd like to start using snmp monitoring to check for different services and some type of bandwidth grafting.

I presume that the 'core' is the basic system and any other module would need to be added for Nagios to utilize them I've seen cacti and mrtg out listed but haven't gotten that far yet I presume there are several others out there and the config could be modified depending on which 'bandwidth monitoring' i use. Correct? I've done a snmpwalk against my switch and see several 'items' that i'd like to monitor like sysUpTime, port names, interface statics, etc. Although i listed ports 1-24 on 1 of my switches I'm getting an error in the "port 1 bandwidth usage" stating - unable to open MRTG log. presumably this is because i'm missing a module, or a step in where the data is supposed to be written to - for the info to be displayed.

This is probably more 'advanced' stuff - but getting snmp monitoring working (for ports status,traffic,etc) and bandwidth reporting is really something i'm hoping to get out of this system - besides alerting of course.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Where do i go from here?

Post by lmiltchev »

I would like to clarify that this is a Nagios support forum. Usually we answer/troubleshoot specific questions/issues. This is NOT a place, where you can get Nagios training. Again, here's a link to our official documentation:

https://assets.nagios.com/downloads/nag ... n/toc.html

It's worth to mention that Nagios Core cannot do much "on its own" - it needs to have plugins added to it for doing specific jobs. There is a huge collection of plugins on the Nagios Exchange:

https://exchange.nagios.org/

You would need to find a plugin that would do the job for you, and figure out how to use it. We can help you on the forum if you get stuck with something but again, it needs to be a specific question/issue.

Note: Nagios Core is great, but there is a steep learning curve. If you think this is too much to handle, you could give Nagios XI a try. It has all of the functionality you've been asking about, and it is a lot easier to use.

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

You can even use it for free with up to 7 nodes.

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked