Page 3 of 3
Re: Host Group Monitors
Posted: Mon Feb 25, 2013 3:42 pm
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?
Re: Host Group Monitors
Posted: Mon Feb 25, 2013 3:46 pm
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
#
###############################################################################
Re: Host Group Monitors
Posted: Mon Feb 25, 2013 5:52 pm
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?
Re: Host Group Monitors
Posted: Mon Feb 25, 2013 8:22 pm
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.
Re: Host Group Monitors
Posted: Tue Feb 26, 2013 8:40 am
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.
Re: Host Group Monitors
Posted: Thu Mar 14, 2013 8:45 am
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
Re: Host Group Monitors
Posted: Thu Mar 14, 2013 8:57 am
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.
Re: Host Group Monitors
Posted: Thu Mar 14, 2013 9:11 am
by scottwilkerson
Glad to here you got it going, and thanks for pointing our the typo
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.
Re: Host Group Monitors
Posted: Thu Mar 14, 2013 10:28 am
by asmgiadmin
thank you.