The reason of commands.cfg.

Noel Platzke neufpas at gmail.com
Mon Oct 5 19:34:30 CEST 2009


Say we have a bunch of servers that need multiple checks that do an HTTP GET
on different URIs and look for a specific string in the response. Isn't it
easier to maintain a single command that takes a few arguments than having
to constantly define a new command that does basically the same thing for
each service check? And if down the road someday HTTP becomes HTTPS you only
need to edit one configuration.

On Mon, Oct 5, 2009 at 1:18 PM, Albert Shih <Albert.Shih at obspm.fr> wrote:

> Hi all,
>
> I would like to known why (just the historic reason) in nagios we split the
> definition of the macros and the definition of a service ? For example :
>
> When we want to monitor a pop service we create
>
> define command {
>        command_name    check_pops
>        command_line    /usr/lib/nagios/plugins/check_spop -H $ARG1$
>        }
>
> and another
>
> define service {
>        host_name                       my_pop_server
>        use                             generic-service
>        service_description             POP
>        check_command                   check_pops!my_ip_of_pop_server
> }
>
> Why not in one ligne with something like
>
>
> define service {
>        host_name                       my_pop_server
>        use                             generic-service
>        service_description             POP
>        check_command                   /usr/lib/nagios/plugins/check_spop
> -H my_pop_server
> }
>
>
> Regards.
>
>
> --
> Albert SHIH
> SIO batiment 15
> Observatoire de Paris Meudon
> 5 Place Jules Janssen
> 92195 Meudon Cedex
> Téléphone : 01 45 07 76 26/06 86 69 95 71
> Heure local/Local time:
> Lun 5 oct 2009 19:18:01 CEST
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091005/414d9460/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
-------------- 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