wizard errors

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vital4ik
Posts: 19
Joined: Wed Apr 17, 2013 1:23 pm

wizard errors

Post 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!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: wizard errors

Post 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?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
vital4ik
Posts: 19
Joined: Wed Apr 17, 2013 1:23 pm

Re: wizard errors

Post 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
vital4ik
Posts: 19
Joined: Wed Apr 17, 2013 1:23 pm

Re: wizard errors

Post by vital4ik »

just searched whole / for the file, its not there
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: wizard errors

Post by slansing »

The file we are looking for is located at:

Code: Select all

/usr/local/nagios/etc/hosttemplates.cfg
vital4ik
Posts: 19
Joined: Wed Apr 17, 2013 1:23 pm

Re: wizard errors

Post 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
#
###############################################################################
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: wizard errors

Post 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.
vital4ik
Posts: 19
Joined: Wed Apr 17, 2013 1:23 pm

Re: wizard errors

Post 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)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: wizard errors

Post 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.
vital4ik
Posts: 19
Joined: Wed Apr 17, 2013 1:23 pm

Re: wizard errors

Post 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
#
###############################################################################
Locked