Re: [Nagios-users] SMS Foxbox

2010-11-09 Thread Mark Young
On Nov 5, 2010, at 4:44 AM, Rutger Blom wrote:

> Hello list,
> 
> I was wondering if any of you have experience with using the SMS Foxbox and 
> Nagios? Are you satisfied with the product? Is there any other solution you 
> would recommend instead?
> 
> http://www.nagios.org/products/notification/foxbox/
> 
> /Rutger

Hi Rutger,

I originally demoed the SMS FoxBox while working at Nagios Enterprises in 2007. 
 My original integration attempt was written up on the wiki 
http://wiki.nagios.org/index.php/ACME_SYSTEMS_SMSFoxBox.  The device is a small 
embedded linux server that takes a SIM card and has a external antenna.  *It is 
very important that it has cell (GSM) reception.  Also my knowledge of the 
device is now a few years old.

My experience was that it worked very well.  It has the limitation that it can 
only send one message at a time (one GSM modem).  My script from the wiki page 
used the web api, where you use a web address to send the message body and 
recipient.  This was only able to handle a few requests before it overwhelmed 
the small web server.  I later created another script that uploaded messages to 
a spool directory on the device (using SCP).  This was able to handle a large 
number of messages but it takes a long time for the device to process messages. 
 I would say if you have over 20 notification recipients you may want to look 
for an alternative.  There are web services that handle these requests 
(AlarmTilt) or many people now use email addresses provided by cell providers 
that text phones (http://www.emailtextmessages.com/).

I hope that this helps you out.  Good luck in your quest!

Mark Young



--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] any macro for viewing host parent?

2010-11-09 Thread diego.roc...@gmail.com
I like the double-underscore thing :)
About my advice, I performed a test and it seems you're right. I used
custom vars in extra notes, check_commands, custom CGIs for RT
integration, and others places, so I assumed it would have worked in
this case, too


On Tue, Nov 9, 2010 at 11:30 PM, Paul M. Dubuc  wrote:
> diego.roc...@gmail.com wrote:
>>
>> Isn't it $_HOSTPARENT_HOST$ ?
>
> Not if you put TWO underscores in front of the macro name.  Then you get
> $_HOST_PARENT_HOST$ which I think is much more readable (a nice suggestion I
> found in Barth's book.)
>
>> btw, in order to avoid the double declaration (and human errors) you
>> could add in generic-host (ot whatever template you define)
>>
>> define generic-host {
>>    ...
>>    parents             $_HOSTPARENT_HOST$
>>    }
>>
>> and in the real host definition you will define only the custom macro.
>> Haven't tried it, but it should work
>
> I don't think this will work because the macro isn't expanded in that
> context.  I think they only expand in the command object or (effectively) in
> arguments in the check_command definition (because their expanded when
> passed to the command).
>
> Even if this did work it would work if all your hosts had the same parent.
> All my hosts have different parents.
>
>>
>> On Tue, Nov 9, 2010 at 7:55 PM, Paul M. Dubuc  wrote:
>>>
>>> Paul M. Dubuc wrote:

 John Alberts wrote:
>
> I would like to have our notification emails for service alerts,
> include
> the host parent. Â Is there any existing macro I can use to include
> this? Â I couldn't find anything when googling. Â If not, any
> suggesions
> how I might get it in an email?
>

 The way we do this is to use a user-defined macro in the host definition
 like so:


 define host{
        use           aps-launcher
    host_name     APS-P52

    parents         aps52
    __PARENT_HOST   aps52
 }

 Then you can expand expand it, $_PARENT_HOST$, in the notification.
>>>
>>> I mean that would be $_HOST_PARENT_HOST$
>>>
 Unfortunately this means you need to define the parent in 2 places. It
 Would be
 nice if there was built-in macro for this, but I don't think there is.
>>>
>
>



-- 
Diego Roccia
diego.roccia (at) gmail (dot) com

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] Problem running ssh script in nagios

2010-11-09 Thread Charlie R
Please disregard, turned out I needed to add a full path to my ssh  
config file :/

Charlie

On Nov 9, 2010, at 4:07 PM, Charlie R wrote:

> Hi List,
>
> Before we start, check_ssh and check_by_ssh is not a workable  
> solution for me. I have a special setup in place that needs to run  
> checks over native ssh since I have a bunch of ssh config options  
> per host and need to use a proxy from where my nagios server is. So  
> far what I have found doesn't let me use my ssh config file. My goal  
> is to use ssh to check for host uptime since that's available on  
> every host.
>
> I wrote a script that is very very basic. It's job is to ssh to a  
> host to determine if it's up or down. Here's the meat and potatoes  
> of that.
>
> --- checkhost.sh ---
> #!/bin/bash
>
> # Purpose: Replacement host alive check for nagios
> # on hosts that cannot be directly pinged
>
> # Usage function
> usage()
> {
> cat << EOF
>
> usage: checkhost.sh -H 
>
> OPTIONS:
>   -h  Show this message
>   -H  SSH host address
> EOF
> }
>
> # Variables
> SSHPath='/usr/bin/ssh'
>
> # Options menu
> while getopts "hH:" OPTION
> do
>   case $OPTION in
>   h)
>   usage
>   exit 1
>   ;;
>   H)
>   SSHHost=$OPTARG
>   ;;
>   ?)
>   usage
>   exit 1
>   ;;
>   esac
>   done
>
> # Make sure the required stuff is here
> if [[ -z $SSHHost ]]
>   then
>   usage
>   exit 1
>   fi
>
> # Connect function
> SSHConnect()
> {
> $SSHPath -q $SSHHost exit
> if [[ "$?" -eq 0 ]]
>   then
>   echo "Host is reachable"
>   exit 0
>   else
>   echo "Unable to reach host"
>   exit 2
>   fi
> }
> SSHConnect
> --- end script ---
>
> When I run this script on my bash shell, it works perfect. When I  
> run this as a host check in nagios, it fails with (Return code of  
> 255 is out of bounds).
>
> I've checked to make sure it's not getting prompted to accept the  
> local host key.
> I've checked nagios.debug to make sure the command is parsing  
> correctly
> I've checked ssh key permissions
> I've changed my ssh code around to return something no matter what  
> and it works.
>
> At this point, I'd like to blame ssh but I'm not 100% sure on that.
>
> Is there any caveats to run SSH on the native system with ssh keys  
> and a more than customized ssh config file? Maybe I'm missing a ssh  
> option? I've tried with and with out -T and -t. I've specifcally  
> specified my config file along with my ssh keys.
>
> Thanks,
>
> Charlie


--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] any macro for viewing host parent?

2010-11-09 Thread Paul M. Dubuc
diego.roc...@gmail.com wrote:
> Isn't it $_HOSTPARENT_HOST$ ?

Not if you put TWO underscores in front of the macro name.  Then you get 
$_HOST_PARENT_HOST$ which I think is much more readable (a nice suggestion I 
found in Barth's book.)

> btw, in order to avoid the double declaration (and human errors) you
> could add in generic-host (ot whatever template you define)
>
> define generic-host {
> ...
> parents $_HOSTPARENT_HOST$
> }
>
> and in the real host definition you will define only the custom macro.
> Haven't tried it, but it should work

I don't think this will work because the macro isn't expanded in that context. 
  I think they only expand in the command object or (effectively) in arguments 
in the check_command definition (because their expanded when passed to the 
command).

Even if this did work it would work if all your hosts had the same parent. 
All my hosts have different parents.

>
> On Tue, Nov 9, 2010 at 7:55 PM, Paul M. Dubuc  wrote:
>> Paul M. Dubuc wrote:
>>> John Alberts wrote:
 I would like to have our notification emails for service alerts, include
 the host parent. Â Is there any existing macro I can use to include
 this? Â I couldn't find anything when googling. Â If not, any suggesions
 how I might get it in an email?

>>>
>>> The way we do this is to use a user-defined macro in the host definition 
>>> like so:
>>>
>>>
>>> define host{
>>> use   aps-launcher
>>> host_name APS-P52
>>>
>>> parents aps52
>>> __PARENT_HOST   aps52
>>> }
>>>
>>> Then you can expand expand it, $_PARENT_HOST$, in the notification.
>>
>> I mean that would be $_HOST_PARENT_HOST$
>>
>>> Unfortunately this means you need to define the parent in 2 places. It 
>>> Would be
>>> nice if there was built-in macro for this, but I don't think there is.
>>


--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] any macro for viewing host parent?

2010-11-09 Thread diego.roc...@gmail.com
Isn't it $_HOSTPARENT_HOST$ ?
btw, in order to avoid the double declaration (and human errors) you
could add in generic-host (ot whatever template you define)

define generic-host {
   ...
   parents $_HOSTPARENT_HOST$
   }

and in the real host definition you will define only the custom macro.
Haven't tried it, but it should work

On Tue, Nov 9, 2010 at 7:55 PM, Paul M. Dubuc  wrote:
> Paul M. Dubuc wrote:
>> John Alberts wrote:
>>> I would like to have our notification emails for service alerts, include
>>> the host parent.  Is there any existing macro I can use to include
>>> this?  I couldn't find anything when googling.  If not, any suggesions
>>> how I might get it in an email?
>>>
>>
>> The way we do this is to use a user-defined macro in the host definition 
>> like so:
>>
>>
>> define host{
>>       use                     aps-launcher
>>       host_name               APS-P52
>>
>>       parents                 aps52
>>       __PARENT_HOST           aps52
>> }
>>
>> Then you can expand expand it, $_PARENT_HOST$, in the notification.
>
> I mean that would be $_HOST_PARENT_HOST$
>
>> Unfortunately this means you need to define the parent in 2 places.  Would be
>> nice if there was built-in macro for this, but I don't think there is.
>
> --
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> ___
> 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
>



-- 
Diego Roccia
diego.roccia (at) gmail (dot) com

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] Problem running ssh script in nagios

2010-11-09 Thread Charlie R
Hi List,

Before we start, check_ssh and check_by_ssh is not a workable solution  
for me. I have a special setup in place that needs to run checks over  
native ssh since I have a bunch of ssh config options per host and  
need to use a proxy from where my nagios server is. So far what I have  
found doesn't let me use my ssh config file. My goal is to use ssh to  
check for host uptime since that's available on every host.

I wrote a script that is very very basic. It's job is to ssh to a host  
to determine if it's up or down. Here's the meat and potatoes of that.

--- checkhost.sh ---
#!/bin/bash

# Purpose: Replacement host alive check for nagios
# on hosts that cannot be directly pinged

# Usage function
usage()
{
cat << EOF

usage: checkhost.sh -H 

OPTIONS:
-h  Show this message
-H  SSH host address
EOF
}

# Variables
SSHPath='/usr/bin/ssh'

# Options menu
while getopts "hH:" OPTION
do
case $OPTION in
h)
usage
exit 1
;;
H)
SSHHost=$OPTARG
;;
?)
usage
exit 1
;;
esac
done

# Make sure the required stuff is here
if [[ -z $SSHHost ]]
then
usage
exit 1
fi

# Connect function
SSHConnect()
{
$SSHPath -q $SSHHost exit
if [[ "$?" -eq 0 ]]
then
echo "Host is reachable"
exit 0
else
echo "Unable to reach host"
exit 2
fi
}
SSHConnect
--- end script ---

When I run this script on my bash shell, it works perfect. When I run  
this as a host check in nagios, it fails with (Return code of 255 is  
out of bounds).

I've checked to make sure it's not getting prompted to accept the  
local host key.
I've checked nagios.debug to make sure the command is parsing correctly
I've checked ssh key permissions
I've changed my ssh code around to return something no matter what and  
it works.

At this point, I'd like to blame ssh but I'm not 100% sure on that.

Is there any caveats to run SSH on the native system with ssh keys and  
a more than customized ssh config file? Maybe I'm missing a ssh  
option? I've tried with and with out -T and -t. I've specifcally  
specified my config file along with my ssh keys.

Thanks,

Charlie

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] any macro for viewing host parent?

2010-11-09 Thread John Alberts
On 11/09/2010 12:55 PM, Paul M. Dubuc wrote: 

> Unfortunately this means you need to define the parent in 2 places.  
Would be
> nice if there was built-in macro for this, but I don't think there is.



Yeah, I thought about doing it this way as well, but as you said, you then have 
to define the parent in 2 places which can be messy and get tedious.  I guess 
if no one else chimes in with a magical solution that we can't think of, I 
guess I'll be doing it this way as well. :)



-- 
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev___
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] ndomod: Could not open data sink!

2010-11-09 Thread Morris, Patrick
On 11/8/2010 3:07 AM, shacky wrote:
> Hi.
> I'm succesfully using Nagios 3.2.3 and I installed ndoutils-1.4b9 to
> have data in a MySQL db.
> I configured ndomod and ndo2db and I made a lot of tries, but it does not 
> work.
> I have this in nagios.log:
>
> [1289212021] Nagios 3.2.3 starting... (PID=1583)
> [1289212021] Local time is Mon Nov 08 11:27:01 CET 2010
> [1289212021] LOG VERSION: 2.0
> [1289212021] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009
> Nagios Core Development Team and Community Contributors
> [1289212021] ndomod: Could not open data sink!  I'll keep trying, but
> some output may get lost...
> [1289212021] Event broker module '/opt/nagios/bin/ndomod.o'
> initialized successfully.
> [1289212021] Finished daemonizing... (New PID=1584)

Forgive me if I'm asking an obvious question, but is nod2db running?  
Also, since you've specified "localhost" in your config, can you still 
connect to the DB as nagios of you specify that hostname when you 
connect (I'd think you could, but don't have a similar config I can try 
that on)?

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] Setting Command Timeout that isn't global?

2010-11-09 Thread Morris, Patrick
On 11/9/2010 10:23 AM, Litwin, Matthew wrote:
> Is there a way to set the command timeout within an object definition that 
> overrides the global definition?

Sure, most plugins support a timeout value.  However, the global timeout 
is absolute and you won't be able to go over it.  Shorter timeouts are 
possible, though.

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] any macro for viewing host parent?

2010-11-09 Thread Paul M. Dubuc
Paul M. Dubuc wrote:
> John Alberts wrote:
>> I would like to have our notification emails for service alerts, include
>> the host parent.  Is there any existing macro I can use to include
>> this?  I couldn't find anything when googling.  If not, any suggesions
>> how I might get it in an email?
>>
>
> The way we do this is to use a user-defined macro in the host definition like 
> so:
>
>
> define host{
>   use aps-launcher
>   host_name   APS-P52
>
>   parents aps52
>   __PARENT_HOST   aps52
> }
>
> Then you can expand expand it, $_PARENT_HOST$, in the notification.

I mean that would be $_HOST_PARENT_HOST$

> Unfortunately this means you need to define the parent in 2 places.  Would be
> nice if there was built-in macro for this, but I don't think there is.

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] Setting Command Timeout that isn't global?

2010-11-09 Thread Litwin, Matthew
Is there a way to set the command timeout within an object definition that 
overrides the global definition?
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] any macro for viewing host parent?

2010-11-09 Thread Paul M. Dubuc
John Alberts wrote:
> I would like to have our notification emails for service alerts, include
> the host parent.  Is there any existing macro I can use to include
> this?  I couldn't find anything when googling.  If not, any suggesions
> how I might get it in an email?
>

The way we do this is to use a user-defined macro in the host definition like 
so:


define host{
 use aps-launcher
 host_name   APS-P52

 parents aps52
 __PARENT_HOST   aps52
}

Then you can expand expand it, $_PARENT_HOST$, in the notification. 
Unfortunately this means you need to define the parent in 2 places.  Would be 
nice if there was built-in macro for this, but I don't think there is.

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] any macro for viewing host parent?

2010-11-09 Thread John Alberts
I would like to have our notification emails for service alerts, include
the host parent.  Is there any existing macro I can use to include
this?  I couldn't find anything when googling.  If not, any suggesions
how I might get it in an email?


Thanks

-- 
John Alberts
Hosted Services
Exlibris USA
john.albe...@exlibrisgroup.com

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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