Re: [Nagios-users] shell script in nagios

2009-09-08 Thread Leonardo Carneiro
Title: Leonardo de Souza Carneiro




Well, i'd wrote a shell script to check gather informations about a
service and I'm running via check_nrpe. It's running just fine.

Melanie Pfefer escreveu:

  
I have the ability not to check by ssh. The script can be run *from* any server *to* any server.

I just need to run this script, let's say from nagios server (so no need to ssh). I expect from nagios either not to notify me (in that case, the remote server status is OK) or send me an alert (But with the output of the script, that is actually the erroneous logs, either in the message body or in attachement)

Let me know your thoughts please

--- On Mon, 7/9/09, Anthony  wrote:

  
  
From: Anthony 
Subject: Re: [Nagios-users] shell script in nagios
To: "Melanie Pfefer" 
Cc: nagios-users@lists.sourceforge.net
Date: Monday, 7 September, 2009, 8:16 PM
Oops.. I'm a nuff nuff..

There's a plugin called check_by_ssh in the standard
set of plugins (at least the source - check to see if your
install of nagios has it compiled)

$ ./check_by_ssh --help
check_by_ssh v2002 (nagios-plugins 1.4.13)

Copyright (c) 1999 Karl DeBisschop 
Copyright (c) 2000-2008 Nagios Plugin Development Team
    


This plugin uses SSH to execute commands on a remote host

Usage: check_by_ssh -H  -C 
[-fqv] [-1|-2] [-4|-6]
   [-S [lines]] [-E [lines]] [-t timeout] [-i
identity]
   [-l user] [-n name] [-s servicelist] [-O
outputfile]

   [-p port] [-o ssh-option]




  
  

  


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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

  


-- 




  

  
  Leonardo
de Souza Carneiro
  Veltrac -
Tecnologia em Logística.
  
  
lscarne...@veltrac.com.br
  
  
http://www.veltrac.com.br
  
  Fone Com.:
(43)2105-5601
  
  Av.
Higienópolis 1601 Ed. Eurocenter Sl. 803
  
  Londrina-
PR
  
  Cep:
86015-010
  
  
  
  
  
  

  




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] shell script in nagios

2009-09-08 Thread Melanie Pfefer


I have the ability not to check by ssh. The script can be run *from* any server 
*to* any server.

I just need to run this script, let's say from nagios server (so no need to 
ssh). I expect from nagios either not to notify me (in that case, the remote 
server status is OK) or send me an alert (But with the output of the script, 
that is actually the erroneous logs, either in the message body or in 
attachement)

Let me know your thoughts please

--- On Mon, 7/9/09, Anthony  wrote:

> From: Anthony 
> Subject: Re: [Nagios-users] shell script in nagios
> To: "Melanie Pfefer" 
> Cc: nagios-users@lists.sourceforge.net
> Date: Monday, 7 September, 2009, 8:16 PM
> Oops.. I'm a nuff nuff..
> 
> There's a plugin called check_by_ssh in the standard
> set of plugins (at least the source - check to see if your
> install of nagios has it compiled)
> 
> $ ./check_by_ssh --help
> check_by_ssh v2002 (nagios-plugins 1.4.13)
> 
> Copyright (c) 1999 Karl DeBisschop 
> Copyright (c) 2000-2008 Nagios Plugin Development Team
>     
> 
> 
> This plugin uses SSH to execute commands on a remote host
> 
> Usage: check_by_ssh -H  -C 
> [-fqv] [-1|-2] [-4|-6]
>    [-S [lines]] [-E [lines]] [-t timeout] [-i
> identity]
>    [-l user] [-n name] [-s servicelist] [-O
> outputfile]
> 
>    [-p port] [-o ssh-option]
> 
> 
> 


  


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] shell script in nagios

2009-09-07 Thread Anthony
Oops.. I'm a nuff nuff..

There's a plugin called check_by_ssh in the standard set of plugins (at
least the source - check to see if your install of nagios has it compiled)

$ ./check_by_ssh --help
check_by_ssh v2002 (nagios-plugins 1.4.13)
Copyright (c) 1999 Karl DeBisschop 
Copyright (c) 2000-2008 Nagios Plugin Development Team


This plugin uses SSH to execute commands on a remote host

Usage: check_by_ssh -H  -C  [-fqv] [-1|-2] [-4|-6]
   [-S [lines]] [-E [lines]] [-t timeout] [-i identity]
   [-l user] [-n name] [-s servicelist] [-O outputfile]
   [-p port] [-o ssh-option]
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] shell script in nagios

2009-09-07 Thread Anthony
Nagios doesn't have inbuilt ssh support per se.. It's a about the
plugins.

You could make a shell script on your nagios box to perform the SSH, parse
the response and then return the relevant error level and text as per the
nagios plugin guidelines.. you can use utils.sh as a base..

Making up check plugins for nagios is pretty easy.. They just have to return
an exit code of 0-3 depending on the state of the app and an appropriate
status message. You can optionally add performance data to that.

For information on building your own plugins, consult:

http://nagiosplug.sourceforge.net/developer-guidelines.html

Otherwise, make the script on the remote server and use NSCA or NRPE to
push/pull (respectively) the results from the remote machine to the nagios
box.

Otherwise have a look Nagios Exchange to see if someone's built an ssh
execution plugin with string parsing.

http://exchange.nagios.org/index.php?option=com_mtree&task=search&Itemid=74&searchword=ssh

... looks like there might be a few options already (didn't go further than
the above search page)

On Tue, Sep 8, 2009 at 02:13, Melanie Pfefer wrote:

> Hi,
>
> I have a shell script that greps for error in a log file and returns the
> entries if any.
>
> Now I want to run this shell script in nagios so that the check runs
> periodically.
>
> I expect nagios to do ssh and execute the shell script. If errors appear,
> the subject returns error in its subject and send the errors in attachement.
>
> any idea please? thanks for sharing your ideas and experience
>
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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

[Nagios-users] shell script in nagios

2009-09-07 Thread Melanie Pfefer
Hi,

I have a shell script that greps for error in a log file and returns the 
entries if any.

Now I want to run this shell script in nagios so that the check runs 
periodically.

I expect nagios to do ssh and execute the shell script. If errors appear, the 
subject returns error in its subject and send the errors in attachement.

any idea please? thanks for sharing your ideas and experience


  


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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