Time-Saving Tricks For Service Definitions

Caylan Van Larson caylan at mac.com
Fri Jun 29 19:16:53 CEST 2007


>> Error: Service 'Dell Hardware' on host 'myhost' has already been  
>> defined
>> Error: Could not register service (config file .... newhost.cfg on  
>> line XX)
>>
>> Question:  Why does "using" dell-hardware in a normal syntax  
>> (remember, my goal is to migrate the old style in red to the new  
>> hostgroups trick style above), is not compatible when the service  
>> has a hostgroup_name defined?  This looks to me like a bug, where  
>> it's trying to redefine the service instead of just using it.
>>
>> Thoughts?
>
> My thought is that you need a unique "name" directive in the second  
> service that uses dell-hardware. Otherwise the service with the use  
> directive has the same name as the service it is using, causing  
> exactly what the error says- the service dell hardware has already  
> been defined, and yes, you are trying to re-define it. Basically,  
> when you insert the use directive, it copies everything from the  
> service (or whatever) you tell it to use into the new one, except  
> for any directives that are explicitly set in the new on. And since  
> you can't have two service definitions with the same name, you get  
> that error.
>
> -----------------------------------------------
> Israel Brewster

I'd be willing to accept that, however, without the host_groupname  
directive for the original service, every instance of "use dell- 
hardware" (75 of them) works fine without any additional name or  
alias options.  I'm only seeing this error once I add in  
host_groupname for the original service.

Caylan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070629/8ba51c79/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list