[op5-users] Merlin Import Error on blank attribute
Frost, Mark {PBG}
mark.frost1 at pepsi.com
Thu Sep 17 18:53:55 CEST 2009
I think I see at least some of the problem with my lack of services in
mysql and Ninja. I see no errors when I tell the Merlin installer to
install the db. I didn't think I saw errors when merlind ran (and
presumably ran the php importer line from the merlin.conf file). But if
I run the php importer by hand I get:
# php /usr/local/merlin/import.php
--cache=/usr/local/nagios/var/objects.cache
--status-log=/usr/local/nagios/var/status.dat
Importing objects to database merlin
importing objects from
/usr/local/nagios/var/objects.cache
PHP Notice: Undefined offset: 1 in
/usr/local/merlin/object_importer.inc.php on line 483
SQL query failed with the following error message;<br />
Unknown column 'parents' in 'field list'<br />
Query was;<br />
<b>REPLACE INTO
host(host_name,alias,address,parents,check_period,check_command,notifica
tion_period,initial_state,check_interval,retry_interval,max_check_attemp
ts,active_checks_enabled,passive_checks_enabled,obsess_over_host,event_h
andler_enabled,low_flap_threshold,high_flap_threshold,flap_detection_ena
bled,flap_detection_options,freshness_threshold,check_freshness,notifica
tion_options,notifications_enabled,notification_interval,first_notificat
ion_delay,stalking_options,process_perf_data,failure_prediction_enabled,
icon_image,statusmap_image,action_url,retain_status_information,retain_n
onstatus_information,id) VALUES('prodnet-router','Production Net
Router',X.X.X.X,'','24x7','check-host-alive','24x7','o','0.000000','1.00
0000','10','1','0','0','0','0.000000','0.000000','0','o,d,u','1800','0',
'd,u,r','0','0.000000','0.000000','n','1','1','router.png','router.gd2',
'/pnp/index.php?host=$HOSTNAME$\'
onmouseover=\"get_g(\'$HOSTNAME$\',\'_HOST_\')\"
onmouseout=\"clear_g()\"','1','1','80')</b><br />
overwriting host id 80 in $this->imported
prodnet-router -> 'prodnet-router'
Array
(
[host_name] => 'prodnet-router'
[alias] => 'Production Net Router'
[address] => 'X.X.X.X'
[parents] => Array
(
[0] =>
)
[check_period] => '24x7'
[check_command] => 'check-host-alive'
[notification_period] => '24x7'
[initial_state] => 'o'
[check_interval] => '0.000000'
[retry_interval] => '1.000000'
[max_check_attempts] => '10'
[active_checks_enabled] => '1'
[passive_checks_enabled] => '0'
[obsess_over_host] => '0'
[event_handler_enabled] => '0'
[low_flap_threshold] => '0.000000'
[high_flap_threshold] => '0.000000'
[flap_detection_enabled] => '0'
[flap_detection_options] => 'o,d,u'
[freshness_threshold] => '1800'
[check_freshness] => '0'
[notification_options] => 'd,u,r'
[notifications_enabled] => '0'
[notification_interval] => '0.000000'
[first_notification_delay] => '0.000000'
[stalking_options] => 'n'
[process_perf_data] => '1'
[failure_prediction_enabled] => '1'
[icon_image] => 'router.png'
[statusmap_image] => 'router.gd2'
[action_url] => '/pnp/index.php?host=$HOSTNAME$\'
onmouseover=\"get_g(\'$HOSTNAME$\',\'_HOST_\')\"
onmouseout=\"clear_g()\"'
[retain_status_information] => '1'
[retain_nonstatus_information] => '1'
[id] => '80'
)
Looking at my the config smippet I'm testing with, I can see that this
is because this host is using a blank "parents" entry. The reason I'm
doing this is that this host is using a template that would list itself
as a parent. So I'm attempting to negate that particular entry of the
template. Nagios allows the blank entry for "parents" and it does
indeed negate that entry from the template. It seems that the PHP
importer doesn't like that field being blank.
Config-wise, I should find a better way to do this, of course, but I
would also expect that the importer script would find anything that
Nagios finds legal to also be legal.
Thanks
Mark
More information about the op5-users
mailing list