From: Scott S. <ssa...@ta...> - 2010-10-25 16:16:45
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nagios clearly defines how it handles multiple inheritance when more than one named object is included by 'use'. However, it does not clearly define what happens when multiple use statements are present in the object. The definitions: define host { host_name host001 use env-dev,class-server,role-webserver } define host { host_name host002 use env-dev use class-server use role-webserver } The two hosts appear to be identical, however the host templates are inherited in different orders. Host001 will include the templates env-dev, class-server, and role-webserver and will apply them in order such that the env-dev template has precedence over the class-server, and class-server will have precedence over role-webserver. However, host002, applies precedence in the opposite order. Each use statement seems to be evaluated independent of the others, in descending order. This results in a precedence order of role-webserver, class-server, env-dev. I'm unsure if this is intentional or not, and the documentation does not address objects containing multiple use statements. In my mind, it makes sense for Nagios to treat the two definitions above as identical since they appear syntactically identical. I expect Nagios to collect all use statements and concatenate their values, then loop over the comma separated values applying the templates as they are found. Changing this behavior will affect backwards compatibility, but only for an undocumented feature. I propose that this configuration syntax is either documented as it currently exists, forbidden during the runtime configuration check, or fixed to reflect the expected behavior. Comments? - -- Scott Sanders <ssa...@ta...> Systems Administrator TaxiMagic (http://taximagic.com) office: 703-579-6818 mobile: 803-767-0060 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQIcBAEBAgAGBQJMxah7AAoJEKCo2w/R6rlNlAAP/2s9qCZO/khdhlwnUWaYlBSp 51mK+S3e/fJdrEMEUfoOhrFC27XXgx1nngx4n0hOqCGEAhhVYl4P4zMRQ0I4uDXj mxc1nuETChv+Lqz2mUdZh5mnbraFPLLq0b6zP1au6ZXSdotPBE6UFZlasslxPh55 neK25xxLSOXmP3IQw+bWMo28edY0vvnQOpUORNU7QZwZSd7YlgGcx8kQljpOlCJk AC0OTo2WNxim3Tr01+mYNqDtpkaviq0zw1L4InB6QHHJmxh5jmhf18fl4krIISz+ zGY4WKYlqqfchtDUZH9bXtZSUL3c6U4I52fMsqQY6YRCFHcKNastLQkBN2sBXcaj FPpDvHaW610MzSB1PfaASvQ2D9Ww8xEb7MU2yURPnm/wVjdjQUfYJfGzJhCJzz9y cgBGm+HF9oNQAnNmNbBNL8d1R+7WolPtWc0IdPlwKh6SJJadnjAmQUQw1MVVEZFG peA5h1WMo44jcMnL/t7ipx1HXmRwxPR0RD/8A4yKD272SULj9mKYWVvaIoVQRSXs KW0DQQsnCbqtItVQWW4hJEGvjlk6KAeT9QKScLK55eapOsf8koqQRjRwCQD75pvA VaAjjrLRcx/mD/Xmr2LA2l32H5hm6SuSnV2odkSrp0S0ETC7iyoTf8tMkZhEYzJ7 pJXhr/fZPVmIv39lKumK =tKLw -----END PGP SIGNATURE----- |