I am working on setting up Nagios for the first time and am trying to search different forums to find my answers, but it appears <a href="http://forums.meulie.net">forums.meulie.net</a> has been down for several days (or I can't seem to get there from my network) and SF is giving me Search Server timeout errors when I try and search this forum.<div>
<br></div><div>This is a long way of apologizing up front if this question is therefore redundant to topics already covered at length in the past.</div><div><br></div><div>I am struggling with getting service template inheritance to work properly as it relates to placing the check_command in an inherited "template"</div>
<div><br></div><div>I did see a brief post about this from around 2003, but I wasn't able to fully follow the chain.</div><div><br></div><div>Having read the documentation and doing some pondering, I am looking to break my service monitoring into two notification trees: Production and Development. That way, I am not bothered by development services alerting off hours and only get production notifications off hours. (If there is a better way to set this up, I'm open to suggestions.) Additionally, when I am working with one platform, I can define the one command centrally and not have to worry about changing it in several places if I choose to go a different route.</div>
<div><br></div><div>Therefore, I am setting up my services as follows:</div><div><br></div><div>define service {</div><div> name global_service # All the settings found in the global-service example in the quickstart setup<br>
....</div><div> register 0<br>}<br></div><div><br></div>define service {<div> name windows_service</div><div> use global_service</div><div> servicegroups windows_services # This will group all windows services together</div>
<div> register 0</div><div>}</div><div><br></div><div><br></div><div># Define the central definition of Client Version</div><div>define service {</div><div> name w_client_version # Windows Service, get Client Version of NSClient++</div>
<div> use windows_service</div><div> service_description NSClient Version</div><div> check_command check_nt!CLIENTVERSION</div><div> register 0 # Don't register this yet as it will be referenced later!</div>
<div>}</div><div><br></div><div># No inheritance here, begin the production shell of notification periods to override any global settings</div><div>define service {</div><div> name production_service</div><div> notification_period 24x7 # Set 24x7 notification and other intervals/options</div>
<div> .....</div><div> register 0</div><div>}</div><div><br></div><div>## Now for putting the command and the service level together such that it is production and will notify based on the production_service entry when the w_client_version command is executed:</div>
<div>define service {</div><div> name production_client_version</div><div> use production_service,w_client_version # Merge the Production definition with the service command</div><div>}</div><div>
<br></div><div>I keep getting an error when validating the configuration (nagios -v nagios.cfg) that the w_client_version is a duplicate within the config files and I have searched for it only finding it in one location.</div>
<div><br></div><div>Can the check_command only be defined at the lowest level? Is this a valid configuration or are there better examples of separating development alerts from production alerts?</div><div><br></div><div>(I'm using Nagios v 3.0.6)</div>
<div><br></div><div>Thanks,<br>Ken</div>