Page 1 of 4
wizard errors
Posted: Wed Apr 17, 2013 1:31 pm
by vital4ik
Hi guys, I am really new to the whole nagios product, Im running nagios xi 1.2. At the moment I am trying to setup smtp and ftp monitoring using wizards and im getting the following error regardless of what wizard im trying(example is for mail server wizard):
Error: Template 'xiwizard_mailserver_host' specified in host definition could not be not found (config file '/usr/local/nagios/etc/hosts/<hostname>.cfg', starting on line 14)
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. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
when I run the health check using cli I get pretty much the same thing:
Error: Template 'xiwizard_mailserver_host' specified in host definition could not be not found (config file '/usr/local/nagios/etc/hosts/<hostnamehere>.cfg', starting on line 14)
Error processing object config files!
any help on the matter would be greatly appreciated!
Re: wizard errors
Posted: Wed Apr 17, 2013 4:34 pm
by sreinhardt
Were you using the mail and ftp wizards? It seems specifically the error would be with a template that somehow does not exist. Could you post the output from your /usr/local/nagios/etc/templates.cfg?
Re: wizard errors
Posted: Wed Apr 17, 2013 5:49 pm
by vital4ik
thank you for your reply, i just checked, there is no such file in the folder. the only file that starts with t there is timeperiods.cfg
Re: wizard errors
Posted: Wed Apr 17, 2013 5:51 pm
by vital4ik
just searched whole / for the file, its not there
Re: wizard errors
Posted: Thu Apr 18, 2013 10:34 am
by slansing
The file we are looking for is located at:
Code: Select all
/usr/local/nagios/etc/hosttemplates.cfg
Re: wizard errors
Posted: Thu Apr 18, 2013 10:44 am
by vital4ik
###############################################################################
#
# Host template configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2013-04-17 17:07:48
# 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 host {
name generic-host
alias generic-host
hostgroups <groupremoved> Prod
initial_state u
check_interval 1
retry_interval 1
active_checks_enabled 0
passive_checks_enabled 0
obsess_over_host 0
check_freshness 0
process_perf_data 0
retain_status_information 0
retain_nonstatus_information 0
contacts <contacts removed>
contact_groups admins,IIS_admin,xi_contactgroup_all
register 0
define host {
name generic-host_dct
alias <name> DCT service down
hostgroups <name> DCT
initial_state u
check_interval 5
retry_interval 10
active_checks_enabled 1
passive_checks_enabled 1
check_period workhours_dct
event_handler notify-host-by-email
event_handler_enabled 0
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contacts <name>
contact_groups admins,IIS_admin,xi_contactgroup_all
notification_interval 10
notification_period 24x7
failure_prediction_enabled 1
register 0
}
define host {
name linux-server
alias
check_command check-host-alive!!!!!!!!
max_check_attempts 10
check_interval 5
retry_interval 1
check_period 24x7
contact_groups admins,IIS_admin
notification_period none
register 0
}
define host {
name <name>_Production
alias <name> Production
hostgroups <name> Prod
initial_state u
check_interval 1
retry_interval 1
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
check_freshness 1
freshness_threshold 60
event_handler notify-host-by-email
event_handler_enabled 1
contacts <removed>
contact_groups xi_contactgroup_all
notification_interval 5
notification_period workhours
notification_options d,u,r,
notifications_enabled 1
register 0
}
}
###############################################################################
#
# Check command configuration file
#
# END OF FILE
#
###############################################################################
Re: wizard errors
Posted: Thu Apr 18, 2013 11:12 am
by slansing
Okay so it looks like the template the wizard is using for the host configuration is not present by in the hosttemplates file. It is on the version of XI I am testing on which is 1.8, is it possible for you to upgrade and then run the write config tool? CCM > Tools > Write Config Files > Click each button from top to bottom, wait for text to return on the page from each before clicking the next, post all errors here.
Re: wizard errors
Posted: Thu Apr 18, 2013 12:54 pm
by vital4ik
first of all, appreciate all your help:) upgrade went smoothly, in ccm write went down fine but the verify spit familiar error:
Error: Template 'xiwizard_mailserver_host' specified in host definition could not be not found (config file '/usr/local/nagios/etc/hosts/<FQDNHERE>.cfg', starting on line 14)
Re: wizard errors
Posted: Thu Apr 18, 2013 1:19 pm
by slansing
Just for verification can you run the following from the Xi server's terminal:
Code: Select all
cat /usr/local/nagios/etc/hosttemplates.cfg | grep mail
And also, please copy the contents of the host name that the config verification tool is telling you can't find the template defined. "where it says (config file '/usr/local/nagios/etc/hosts/<hostname>.cfg', starting on line 14) is"
Thanks! You can remove IP's/passwords etc from the contents.
Re: wizard errors
Posted: Thu Apr 18, 2013 2:30 pm
by vital4ik
this is the output of the first command:
event_handler notify-host-by-email
event_handler notify-host-by-email
here is the file:
###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2013-04-18 15:27:44
# 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 host {
host_name <removed>.com
use xiwizard_mailserver_host
address <removed>
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contacts <removed>
notification_interval 60
notification_period xi_timeperiod_24x7
icon_image mailserver.png
statusmap_image mailserver.png
_xiwizard mailserver
register 1
}
###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################