Beginner at a loss..

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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Beginner at a loss..

Post by slansing »

It's all good, we're here to help you out. Parent - Child relationships is a very neat tool. So essentially, when a parent goes down all hosts that are children go into an unknown state, rather than a critical. Useful for as you said, switches, firewalls, etc, that have hosts behind them.
VincentF
Posts: 37
Joined: Thu Dec 19, 2013 12:15 pm

Re: Beginner at a loss..

Post by VincentF »

Slan - Thanks for the words of encouragement...

I'm down to learning exactly how to configure hosts, hostgroups, and services.

OK All -Here it goes - How / where do I start? Would it help if i Visioned out the specs?

I'm willing to have a live one on one IM chat if that helps?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Beginner at a loss..

Post by slansing »

This is an excellent place to start:

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

It will help you configure hosts/services for many of the top systems you would want to monitor. The source forge doc's also have a listing of all possible configuration definitions and what they do.
VincentF
Posts: 37
Joined: Thu Dec 19, 2013 12:15 pm

Re: Beginner at a loss..

Post by VincentF »

OK - I have an unusual request and would completely understand if there is some resistance...

If possible, would someone like to have access to my terminal PC visually walk me through a sample configuration setup? I realize this poses as somewhat of a security risk, however, I am truly at a loss..

If interested, please PM me and will gladly find a way to pay it forward...

Thanks,
Vince
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Beginner at a loss..

Post by slansing »

We cannot do this via standard non paid support as we have a duty to only do this when absolutely necessary for Enterprise class / paid support contracts. There are tons of videos out there on youtube about how to set up nagios, and configure it, as well as live training opportunities:

http://www.nagios.com/services/training/live
VincentF
Posts: 37
Joined: Thu Dec 19, 2013 12:15 pm

Re: Beginner at a loss..

Post by VincentF »

My sincere apologies...I will look into the courses!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Beginner at a loss..

Post by slansing »

No, no problem at all. It is always good to ask! We do offer a core support contact as well if you'd like more details you can contact sales@nagios.com
VincentF
Posts: 37
Joined: Thu Dec 19, 2013 12:15 pm

Re: Beginner at a loss..

Post by VincentF »

OK - So here is an update of what I have done.

I erased all of the files in my /etc/nagios3/conf.d directory. Those templates were confusing the hell out of me and I just want to start from the ground up to learn from scratch.

Now, I found this link - http://www.debianhelp.co.uk/nagiosconfig.htm - and it seems to be pretty helpful but I just want to be clear on something (Which is why I come to you all)

So, here goes....
For the monitoring system I am trying to build, I have 2 types of groups - lets call them ManagersPC & District Offices. In BOTH cases, I ONLY require a ping monitoring system in place as to check to see if they're online. Ideally, i'd like to check if their parent switch that provides them a LAN connection is active too.

Believe it or not, That is ALL I have been trying to accomplish........for now :?

So, with that being said...My assumption is that I need three types of host groups, (ManagersPC, District Offices & ParentSwitch) ?
Next I would need only 1 service group to define the PING check?

Does this sound about right?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Beginner at a loss..

Post by sreinhardt »

You are definitely on the right track. I would probably approach it like this:

Command definition for check_ping - hopefully this can be used globally and applied to a service for the hostgroups, as every host in the hostgroup will then get it applied and by using the $HOSTADDRESS$ macro for the -H flag, it will dynamically change the command for each host.

Service definition using check_ping command definition as the check command - This will actually get applied to your hostgroups and by inheritance your hosts. You can make multiple services if you need different amounts of pings or timeouts and contact information.

Hosts - Create one for each device (computers and switches) - These don't need to be anything super special unless you want them to be. The one point I would make, is that you likely want to define the hostgroups a host belongs to inside the host configuration, so that in the event you wish to remove the host in the future it is easier.

Hostgroups - Create one for each logical group that you need, apply the service here so that any hosts added to these groups will get the service inherited.

Finally be sure to use "nagios -v /path/to/nagios.cfg" to verify your configurations and have it show you any errors or warnings. Post the output here, and possibly your configs (sanitize as needed) so that we can keep helping you out. But like I said you definitely are moving in the right direction with your present thinking!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
VincentF
Posts: 37
Joined: Thu Dec 19, 2013 12:15 pm

Re: Beginner at a loss..

Post by VincentF »

OK - here's the latest...as I had mentioned in my earlier posts, I erased all of the template config files to start from a clean slate.

right now in my /etc/nagios3/conf.d directory, I have the following two files
hostgroups.cfg hosts.cfg

The following configs are for both:

hostgroups.cfg:

define hostgroup{

hostgroup_name district-servers
alias Field Office Servers
members 78B490-cafe
}


hosts.cfg:
define host{

host_name 78B490-cafe
alias MIE Code
address 10.238.227.98
parents 10.15.224.9
check_command check-host-alive
}


When I execute the following command - nagios3 -v /etc/nagios3/nagios.cfg - I get the following error message:

vincentf@VFarTest:/etc/nagios3/conf.d$ nagios3 -v /etc/nagios3/nagios.cfg

Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...

Error: Cannot open resource file '/etc/nagios3/resource.cfg' for reading!

Read main config file okay...
Processing object config file '/etc/nagios3/commands.cfg'...
Processing object config directory '/etc/nagios-plugins/config'...
Processing object config file '/etc/nagios-plugins/config/breeze.cfg'...
Processing object config file '/etc/nagios-plugins/config/ntp.cfg'...
Processing object config file '/etc/nagios-plugins/config/dns.cfg'...
Processing object config file '/etc/nagios-plugins/config/http.cfg'...
Processing object config file '/etc/nagios-plugins/config/ldap.cfg'...
Processing object config file '/etc/nagios-plugins/config/ping.cfg'...
Processing object config file '/etc/nagios-plugins/config/dummy.cfg'...
Processing object config file '/etc/nagios-plugins/config/flexlm.cfg'...
Processing object config file '/etc/nagios-plugins/config/tcp_udp.cfg'...
Processing object config file '/etc/nagios-plugins/config/snmp.cfg'...
Processing object config file '/etc/nagios-plugins/config/dhcp.cfg'...
Processing object config file '/etc/nagios-plugins/config/disk-smb.cfg'...
Processing object config file '/etc/nagios-plugins/config/mailq.cfg'...
Processing object config file '/etc/nagios-plugins/config/ifstatus.cfg'...
Processing object config file '/etc/nagios-plugins/config/real.cfg'...
Processing object config file '/etc/nagios-plugins/config/disk.cfg'...
Processing object config file '/etc/nagios-plugins/config/apt.cfg'...
Processing object config file '/etc/nagios-plugins/config/nt.cfg'...
Processing object config file '/etc/nagios-plugins/config/procs.cfg'...
Processing object config file '/etc/nagios-plugins/config/radius.cfg'...
Processing object config file '/etc/nagios-plugins/config/mrtg.cfg'...
Processing object config file '/etc/nagios-plugins/config/fping.cfg'...
Processing object config file '/etc/nagios-plugins/config/ftp.cfg'...
Processing object config file '/etc/nagios-plugins/config/games.cfg'...
Processing object config file '/etc/nagios-plugins/config/hppjd.cfg'...
Processing object config file '/etc/nagios-plugins/config/news.cfg'...
Processing object config file '/etc/nagios-plugins/config/mysql.cfg'...
Processing object config file '/etc/nagios-plugins/config/pgsql.cfg'...
Processing object config file '/etc/nagios-plugins/config/mail.cfg'...
Processing object config file '/etc/nagios-plugins/config/load.cfg'...
Processing object config file '/etc/nagios-plugins/config/rpc-nfs.cfg'...
Processing object config file '/etc/nagios-plugins/config/users.cfg'...
Processing object config file '/etc/nagios-plugins/config/telnet.cfg'...
Processing object config file '/etc/nagios-plugins/config/netware.cfg'...
Processing object config file '/etc/nagios-plugins/config/ssh.cfg'...
Processing object config directory '/etc/nagios3/conf.d'...
Processing object config file '/etc/nagios3/conf.d/hosts.cfg'...
Processing object config file '/etc/nagios3/conf.d/hostgroups.cfg'...

Error: Invalid max_check_attempts value for host '78B490-cafe'
Error: Could not register host (config file '/etc/nagios3/conf.d/hosts.cfg', starting on line 1)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

vincentf@VFarTest:/etc/nagios3/conf.d$ ls
hostgroups.cfg hosts.cfg

Where did I go wrong?
Locked