Host Group Monitors
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Host Group Monitors
Lets try to get a better picture of this. So you have 700 hosts imported with their services, you then sorted them into host groups. The services will still be under each respective host even if they are sorted into host groups. Are you trying to remove hosts and their services from hostgroups?
Re: Host Group Monitors
This suggestion only applies to those using the automated features. In such situations, templates are probably the best solution.asmgiadmin wrote:Also, this document mentions each individual host should have services defined in .cfg file and advises against applying service checks to host groups - http://assets.nagios.com/downloads/nagi ... gement.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Host Group Monitors
700 hosts imported and sorted, without services. Service checks were applied to host groups. I'm rethinking the decision to apply service checks to host groups to maximize ability to scale and customize.slansing wrote:Lets try to get a better picture of this. So you have 700 hosts imported with their services, you then sorted them into host groups. The services will still be under each respective host even if they are sorted into host groups. Are you trying to remove hosts and their services from hostgroups?
My current question is, if service checks are applied to host groups, how can check be disabled for server1 in host-group-a, without disabling service check for the entire host group?
Re: Host Group Monitors
You would have to turn off "active checks" and "notifications" for each individual service in the service details screen (not efficient or desirable). You may want to make templates instead and apply them to hosts. You may also want to rethink your hostgroups - if you have a large number of hosts that need services a,b, and c while another number of hosts that only need services b and c, you may be better off making 2 hostgroups, one for a, and another for b and c. Alternatively, you could attach the services to templates and apply them on a per host or hostgroup basis.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Host Group Monitors
Actually this is possible in the CCM with a little trickery IF you are only adding the service to a hostgroup and not individual hosts...asmgiadmin wrote: Consider host group with SSH service check applied and user calls to have SSH check for server1 in host-group. In this case, is it possible to only disable SSH check on server1, while leaving enabled for remainder of host-group?
You can exclude a host by doing the following:
In the CCM Service Management page for this service, click on the misc settings tab -> Manage Variable Definitions
Variable name = host_name
Variable value = !YOUR_HOSTNAME
Insert
The "Variable value" is a comma delimited list so if you want to exclude more than 1 it would be !YOUR_HOSTNAME,!YOUR_HOSTNAME2
Last edited by scottwilkerson on Thu Mar 14, 2013 8:57 am, edited 1 time in total.
Reason: edited to fix typo
Reason: edited to fix typo
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Host Group Monitors
didn't work following directives above:
Code: Select all
Error: Invalid service object directive 'hostname'.
Error: Could not add object property in file '/usr/local/nagios/etc/services/svc-check-ssh.cfg' on line 20.
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.Re: Host Group Monitors
Could you post the output of:
(feel free to obfuscate sensitive information)
Code: Select all
cat /usr/local/nagios/etc/services/svc-check-ssh.cfgFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Host Group Monitors
Code: Select all
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2013-02-25 12:47:20
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
define service {
service_description Checks SSH Availability
use generic-service
hostgroup_name hostgroup-linux
display_name svc-check-ssh
check_command check_ssh!!!!!!!!
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Host Group Monitors
Actually, can you go to CCM -> Services -> svc-check-ssh and click the disk icon and port that.
This will give us what it is trying to write.
This will give us what it is trying to write.
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Host Group Monitors
^^ cool trick - same as the cat output.