Using HOSTALIAS in services.cfg

Matt Nelson matt at frozenatom.com
Wed Apr 29 15:53:06 CEST 2009


On Tue, Apr 28, 2009 at 9:43 PM, Jon Angliss <jon at netdork.net> wrote:

> On Tue, 28 Apr 2009 15:48:04 -0600, Matt Nelson <matt at frozenatom.com>
> wrote:
>
> >I am trying to use HOSTALIAS in one of my service definitions.  Is this
> >possible?  I looked at:
> >
> >http://nagios.sourceforge.net/docs/3_0/macrolist.html
> >
> >and it looks like it is.
>
> How about telling us the behaviour you're getting, what you expect,
> and the sample configuration to show us how you're doing it so we
> might be able to help?
>
> --
> Jonathan Angliss
> <jon at netdork.net>
>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> 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
>

Sorry I was being lazy when I posted this.  Here is some info to go by:

*host.cfg*

define host {
                use                     default
                host_name         jmsFarmManagedServer3.dev
                alias                   Server3
                address              weblogic03.dev
            }

*service.cfg (This way works fine)*


define service{
        use                             critical-service
        host_name                 jmsFarmManagedServer3.dev
        service_description    JMSDestinationRuntime-ConsumersCurrentCount
        check_command
check_jmx!5555!1!1!'com.bea:ServerRuntime=jmsFarmManagedServer3,Name=EDIJMSModule\!jmsFarmJMSServer3 at EDIIncomingQueue,Type=JMSDestinationRuntime,JMSServerRuntime=jmsFarmJMSServer3'!'ConsumersCurrentCount'
--jmxrmi 'weblogic.management.mbeanservers.runtime'
        notifications_enabled           0
}


*service.cfg (This way does not work)*

define service{
        use                             critical-service
        host_name                 jmsFarmManaged$HOSTALIAS$.dev
        service_description    JMSDestinationRuntime-ConsumersCurrentCount
        check_command
check_jmx!5555!1!1!'com.bea:ServerRuntime=jmsFarmManaged'$HOSTALIAS$',Name=EDIJMSModule\!jmsFarmJMS'$HOSTALIAS$'@EDIIncomingQueue,Type=JMSDestinationRuntime,JMSServerRuntime=jmsFarmJMSServer3'!'ConsumersCurrentCount'
--jmxrmi 'weblogic.management.mbeanservers.runtime'
        notifications_enabled           0
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090429/ba064884/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
-------------- 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