Solved

Monitoring multiple Windows clients with Nagios 3.0.6

Posted on 2009-04-01
15
2,931 Views
Last Modified: 2012-07-06
Hello, I've setup a Nagios server and successfully configured it to monitor one windows machine.  My question is, how would i configure the windows.cfg template to monitor multiple windows clients without the leg work of configuring the script for each client individually.
0
Comment
Question by:sguido
  • 7
  • 5
  • 3
15 Comments
 
LVL 15

Expert Comment

by:alienvoice
ID: 24045185
It should be a matter of adding another host to your windows.cfg file.

define host{
        use             windows-desktop
        host_name       xxxxx
        alias                xxxxx
        address         192.xxx.xxx.xxx
        }

Then adding that host machine to the service you want to monitor. Eg: Ping, or CPU usage and so on.
0
 
LVL 1

Author Comment

by:sguido
ID: 24045199
cant i just create a group with multiple hosts and then assign the group to the service which i want to monitor?
0
 
LVL 15

Expert Comment

by:alienvoice
ID: 24045229
No, not that I have found. Defining a host group is about as general as you can get, then adding a host machine to the host group.

You can create different host groups, eg: one for Windows server and one for Windows Desktops.

I just copy and paste the 7 lines of a 'define host' and modify it from there, How large is your network?
0
 
LVL 1

Author Comment

by:sguido
ID: 24045249
Not very large, i just though there must be an easier way of repeating the same steps...  
0
 
LVL 1

Author Comment

by:sguido
ID: 24045255
what about if i separate hosts with a comma in the service?
0
 
LVL 15

Expert Comment

by:alienvoice
ID: 24045275
as in hostname, hostname, hostname in the define service?

hang on, ill give it go in my current set up.
0
 
LVL 15

Accepted Solution

by:
alienvoice earned 500 total points
ID: 24045293
Well I modified one of my host line for pinging my servers. eg: server1, server 2

Restarted nagios daemon and no errors.

Had begun pinging both servers, so you might be right. Good call.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:sguido
ID: 24045297
Nice
0
 
LVL 1

Author Comment

by:sguido
ID: 24045310
I'm giving you the points... i have another question i just posted regarding monitoring clients in a remote network, if you can help me with it ?
0
 
LVL 15

Expert Comment

by:alienvoice
ID: 24045314
Certainly will reduce .cfg file size by alot. Considering Im monitoring bout 45 pcs. So too large, but enough.
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 24045319
You can easily do it through hostgroup. If I want to the status to host availability i do as following, same can be applied for services.

If its small list of server them u can avoid hostgroup mechanism just add the hostnames to host_name parameter as below in service object definition

host_name         server1,server2,server2
define hostgroup{

hostgroup_name   windows

alias       Windows Servers

memebers        server1,server2

}

define host

use           host_default

host_name     server1.example.com

alias         server1.ex.cm

}

define host

use           host_default

host_name     server2.example.com

alias         server2.ex.cm

}

define host{

        name                    template_host_default

        check_command           check-host-alive

        max_check_attempts      3

        notification_interval   120

        notification_period     24x7

        notification_options    d,u,r

        contact_groups          admin

        register                0

        }
 

# For Telnet Service Check

define service{

service_description     Availability - telnet

hostgroup_name   windows

active_checks_enabled   1

check_command           check_telnet

use                     template_service_base

    }

define service{

        name                    template_service_base

        service_description     Default Template For Services

        max_check_attempts      3

        normal_check_interval   5

        retry_check_interval    1

        check_period            24x7

        notification_interval   120

        notification_period     24x7

        notification_options    w,c,u,r

        check_command           service_is_stale

	contact_groups          windowsadmin

        register                0

        }

Open in new window

0
 
LVL 1

Author Comment

by:sguido
ID: 24045332
where do i create this host group? and where do i apply it?
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 24045358
You can keep them by any filename ending as .cfg make sure you are pointing nagios to read the file in nagios.cfg
Best think i recommend is keep all you service and host config in to a directory called config under /etc/nagios and make the following entry in nagios.cfg
cfg_dir=/etc/nagios/config

0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 24045369
I made a mistake in my members definition of hostgroup
memebers        server1,server2
change to
memebers        server1.ex.cm,server2.ex.cm
make sure members filed contains same name you defined for alias section of host_name definition (or) u can use directly the host_name in memeber section as
members   server1.example.com,server2.example.com
0
 
LVL 1

Author Comment

by:sguido
ID: 24045378
how do i point nagios to the .cfg file.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
preview video of network plus 2 64
oracle query help 36 66
change time in cron 4 38
Linux as a middle box 7 18
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now