Remote external commands
Frank J. Gómez
frank at crop-circle.net
Mon Jun 2 20:25:43 CEST 2008
Sorry to revive an old thread, but I started thinking about this too and
remembered seeing it come across the list, so I dug it up.
Mark, did you ever find a solution to your problem? Have you tried using
check_by_ssh (http://nagiosplugins.org/man/check_by_ssh)? I haven't looked
at it in depth, but it looks like you can use it to call any command on the
remote server... so if, for example, you wanted to turn off service
notifications for a host remotely, I think you could do something like this
from your central monitoring server:
define command {
command_name silence_host
command_line $USER1$/check_by_ssh -H $ARG1$ -C 'printf "[%lu]
DISABLE_HOST_SVC_NOTIFICATIONS;$ARG2$\n" `date +%s`' >
/var/nagios/rw/nagios.cmd
}
... where $ARG1$ is the IP address of the distributed monitoring server for
the cluster in which the host resides, and $ARG2$ is the host_name of the
server you want to silence.
I haven't tried or tested this, but I guess this is where I would start.
What do you think? Did you find another way?
-Frank
On Fri, May 9, 2008 at 5:34 AM, Mark Clarkson <mark.clarkson at smorg.co.uk>
wrote:
> <4822E699.1050708 at googlemail.com> <
> bf5858470e6dfb41b80b1632f034db19 at smorg.co.uk>
> Message-ID: <3ed6bce8158aec2b1873e6a105082192 at smorg.co.uk>
> X-Sender: mark.clarkson at smorg.co.uk
> Received: from 217.33.150.4 [217.33.150.4] with HTTP/1.1 (POST); Fri, 09
> May
> 2008 09:34:12 +0000
> User-Agent: RoundCube Webmail/0.1
> Content-Type: text/plain; charset="UTF-8"
> Content-Transfer-Encoding: 8bit
>
> On Fri, 09 May 2008 08:49:59 +0000, Mark Clarkson
> <mark.clarkson at smorg.co.uk> wrote:
> >
> > I'm going to try ncmd from NagiosExchange.org. Thanks!
> >
>
> ncmd is not the right. The only thing I can see is NSCAFE but
> I'm a bit wary of using Java, or rather of creating another dependency.
> I guess I'll have to use ssh.
>
> Does anyone know of a tool to run external commands from a remote
> computer? Something like NSCAFE but not written in Java?
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> 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/20080602/6a92ce10/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- 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