Page 1 of 1

Adding a service to a specific host

Posted: Thu Nov 14, 2013 4:24 am
by arjantent
Hello,

Im quite new to nagios and i could need some help. Im a trainee for the company and i really want it to work but i have this problem which i dont understand.
Ive added the hosts and that seems to work. But now i want to add services to specific hosts. But that doesnt work.

How i do it ( probably big time wrong ) :

Code: Select all

define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               Win01 Stream opslag
        alias                   Stream opslag
        address                 82.94.166.xxx
        }

define service{
        use                     local-service   ;
        host_name               Win01 Stream opslag
        service_description     Current Users
        check_command           check_local_users!20!50
        }


define service{
        use                     local-service   ;
        host_name               Win01 Stream opslag
        service_description     Total Processes
        check_command           check_local_procs!250!400!RSZDT
        }

This is how it looks like. What do i have to change to make it work? Or where do i have to add something? Would be really great if you guys can help me!

Thanks in advance, and if you need futher information i will post fast!
Greetings!

Re: Adding a service to a specific host

Posted: Thu Nov 14, 2013 12:09 pm
by slansing
A couple pages you would learn a ton from when starting out is:

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

In the quickstart pages will show you basic definitions for checking Windows servers, Linux servers, etc.. with NRPE but it applies to any host/service definition.

This will show you examples, and what every definition you can assign to a object does.

There are also some great examples near the bottom of these documents as well:

http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
http://nagios.sourceforge.net/docs/nagios-3.pdf