Configuring nagios

I am getting the hang of linux, however nagios is a nag, I wonder where that name came from. In order for it to work, I’ll have to write a few or alot of *.cfg files. for example how would I write a host.cfg file or services.cfg file and what would it entail. Any help given would really be appreciated to the newbie.

AFter you have completed the ./configure, you where given this for output at the end. You must not have read it.

“*** Compile finished ***”
""
“If the main program and CGIs compiled without any errors, you”
“can continue with installing Nagios as follows (type ‘make’”
“without any arguments for a list of all possible options):”
""
" make install"
" - This installs the main program, CGIs, and HTML files"
""
" make install-init"
" - This installs the init script in $(DESTDIR)$(INIT_DIR)"
""
" make install-commandmode"
" - This installs and configures permissions on the"
" directory for holding the external command file"
""
" make install-config"
" - This installs SAMPLE config files in $(DESTDIR)$(CFGDIR)"
" You’ll have to modify these sample files before you can"
" use Nagios. Read the HTML documentation for more info"
" on doing this. Pay particular attention to the docs on"
" object configuration files, as they determine what/how"
" things get monitored!"

In other words, there are hosts.cfg.sample, etc all made for you. Read them, “Read the HTML documentation for more info”
" on doing this. Pay particular attention to the docs on"
" object configuration files, as they determine what/how"
" things get monitored!" "

there are some cfg files like bigger.cfg and minimal.cfg, nagios.cfg, cgi.cfg. however there are no services.cfg or hosts.cfg

Try this link rae:

nagios.sourceforge.net/docs/1_0/xodtemplate.html

You can basically name you services.cfg to any name you want as long as the definitions are for service configuration. See link. That goes too with the hosts.cfg. Read the configuration docs. Goodluck.

thanks for all your help I think I’m getting closer to completing this task.

I’ll attempt to help you out in this thread, and not in your PM to me, since a PM reply will not help anyone else, since they won’t be able to see it.

I take it you are using the 2.0 beta, since you speak of minimal.cfg etc. In the beta, they have combined many of the .cfg’s into one config file. Personally, I don’t like it, since it makes it somewhat confusing to me.

In your PM you stated "Here’s the thing though and don’t laugh. What are the hosts and the services they provide? Are the terms host and servers used interchangeably and they actually mean servers in the hosts file?
Actually all the machines on my network are hosts so it would be impractical to write such a long file.

What I really want to do is have this standalone machine monitor the network? so why is it that I have to define the hosts and services. the hosts don’t have services to do I’d appreciate any help"

I’m not real clear on what you are having trouble with, but it looks like it’s just that you don’t understand the “concept”.
So this is what I have to say about the concept of hosts/services.

NO, “services” does not mean “servers” as you stated. A host can be pretty much anything. For example, the space shuttle Columbia, we will call it host “ssc”. If you can ping it, it can be a host. There may be some things about the host ssc that you would like to keep an eye on. Those things are called services. These services can be pretty much anything, temp, disc space, fuel sensor, heat sensors. Have you ever looked at the multitude of info that you can get from a host by looking at the snmp data? Just look at a host and decide what it is about that host you would like to keep tabs on.

I always add checks for hosts and services when I discover a problem and solution. For example:
hostA disc is always filling up and we have to delete some c:\temp files. So, setup a host called hostA and define a service check for it called check_disk. Problem solved, when nagios gives a warning, we manually delete some files. Not only that, if you really wanted nagios to be pro-active, and not just monitor, you could have nagios actually delete the files for you.

Cool huh?

yea very cool, thanks for the info. I have gotten the idea behind it and I got nagios up or so it says when I run the start the only thing now is my web interface is not showing. Hopefully by later today I would have solved that and then after that… we’ll see.