Host Group Monitors

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host Group Monitors

Post by lmiltchev »

Did you remove the free variable that you added, or it is still there?
If you did remove it, can you add it again, then click on the disk icon (as you did before), and show us the output?
Be sure to check out our Knowledgebase for helpful articles and solutions!
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post by asmgiadmin »

Output is same as what was provided with cat statement earlier:
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2013-02-25 15:23:46
# 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 servers-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

Post by scottwilkerson »

this would lead me to believe the free variable did not get saved... Could you post a screen shot of the free variables for this service?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post by asmgiadmin »

When I configured variable, config would not save. I posted error message.

I don't think is a possible solution as it will be hidden from users. I'm thinking each server should have it's own service checks, rather than applying service checks to host groups.

If I have 700 hosts imported, without services, are there any utilities that will create a service for each host in specified host group? I came across the pynag util on github - https://github.com/pynag/pynag - but it doesn't seem to work with XI.

Any suggestions? I'd like to begin pursuing options to create services for each server. I'm also interested in any utils to automate host additions as walking through web wizard allows much room for error.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host Group Monitors

Post by scottwilkerson »

You could setup the service you want to copy for one of the hosts and then use the bulk host cloning wizard to to clone that service to the additional hosts.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post by asmgiadmin »

FYI - got this to work. Original instructions had variable name = hostname when it should be host_name.

working config:

Code: Select all

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
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post by asmgiadmin »

However, there appears to be 255 character limit for variable value.

Any work around possible? 255 chars only accounts for roughly 1/3 of the hosts.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host Group Monitors

Post by scottwilkerson »

Glad to here you got it going, and thanks for pointing our the typo :oops:

I have corrected the original post as to not lead others astray...
asmgiadmin wrote:However, there appears to be 255 character limit for variable value.

Any work around possible?
You will have to change the size of the field in the DB, ie

Code: Select all

# mysql -pnagiosxi nagiosql
mysql> alter table tbl_variabledefinition modify value varchar(1024) NOT NULL;
\q
This would get you up to 1024.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post by asmgiadmin »

thank you.
Locked