Adding a service to a specific host

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
arjantent
Posts: 10
Joined: Tue Oct 08, 2013 6:44 am

Adding a service to a specific host

Post 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!
Last edited by abrist on Thu Nov 14, 2013 12:02 pm, edited 1 time in total.
Reason: code wraps are nice on the eyes . . .
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Adding a service to a specific host

Post 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
Locked