Re: [Nagios-users] Remote external commands
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_namesilence_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 <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> < > [EMAIL PROTECTED]> > Message-ID: <[EMAIL PROTECTED]> > X-Sender: [EMAIL PROTECTED] > Received: from 217.33.150.4 [217.33.150.4] with HTTP/1.1 (POST); Fri, 09 > May >2008 09:34:12 + > 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 +, Mark Clarkson > <[EMAIL PROTECTED]> 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@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 > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] Remote external commands
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> X-Sender: [EMAIL PROTECTED] Received: from 217.33.150.4 [217.33.150.4] with HTTP/1.1 (POST); Fri, 09 May 2008 09:34:12 + 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 +, Mark Clarkson <[EMAIL PROTECTED]> 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@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
Re: [Nagios-users] Remote external commands
On Thu, 08 May 2008 12:40:09 +0100, Hari Sekhon <[EMAIL PROTECTED]> wrote: > Were you thinking of NSCA that uses the nagios.cmd pipe? This only takes > a specific format for service checks only to my knowledge (or at least > that's all I use it for). Otherwise I'd look on NagiosExchange.org, > pretty much everything 3rd party to Nagios core is listed there... Ah, yes I think it was NSCA but I must have glossed over the docs when I saw it and thought it could be sent any command. I'm going to try ncmd from NagiosExchange.org. Thanks! Mark. - 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@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
Re: [Nagios-users] Remote external commands
Mark Clarkson wrote: > > Hi, > I need to write a command to the nagios.cmd pipe but from > a remote server. I thought I saw a daemon that was used for > this but now I can't find it! Any ideas? > > Cheers > Mark. > Were you thinking of NSCA that uses the nagios.cmd pipe? This only takes a specific format for service checks only to my knowledge (or at least that's all I use it for). Otherwise I'd look on NagiosExchange.org, pretty much everything 3rd party to Nagios core is listed there... -h -- Hari Sekhon - 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@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