[Nagios-users] Global event handler problem in 3.0 ? [SEC=UNCLASSIFIED]

2008-01-05 Thread Stanley.Hopcroft

Dear Folks,

In sehandlers.c I see

   if(log_event_handlers==TRUE)
logit(NSLOG_EVENT_HANDLER,FALSE,"GLOBAL HOST EVENT HANDLER:
%s;%s;%s;%s;%s\n",hst->name,macro_x[MACRO_HOSTSTATE],macro_x[MACRO_HOSTS
TATETYPE],macro_x[MACRO_HOSTATTEMPT],global_host_event_handler);

which suggests that if the macro_x[FOO] vals are NULL, I will see what I
do in the nagios.log

[1199423092] GLOBAL HOST EVENT HANDLER:
Sydney-backup;(null);(null);(null);global_host_event_handler

Why on earth should the macros be undefined ?

The DEBUG statements look good but how do I enable debug for event
handlers ?

Yours sincerely.
Classification: UNCLASSIFIED

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] SMS gateway

2008-01-05 Thread Peter Edmonds
> which tools do you use to send sms through GSM modem (connected via COM)
> through nagios:
> smstools, kanal, or smsclient

I use gnokii. Modem is a Telular GSM SX5D

/etc/gnokiirc looks like this

[global]
port = /dev/ttyS0
model = AT
initlength = default
connection = serial
use_locking = yes
serial_baudrate = 19200
smsc_timeout = 10
[gnokiid]
bindir = /usr/sbin/
[connect_script]
TELEPHONE = 12345678
[disconnect_script]
[logging]
debug = on
rlpdebug = off
xdebug = off



Notify command for service notifications looks like this

echo -e 
"<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$SERVICEOUTPUT$\n$LONGDATETIME$"
|gnokii --sendsms $CONTACTPAGER$ >>
/usr/local/groundwork/nagios/var/gnokii.log 2>&1

For host notifications this does the job

echo -e 
"<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$HOSTOUTPUT$\n$LONGDATETIME$"
|gnokii --sendsms $CONTACTPAGER$ >> /usr/local/nagios/var/gnokii.log
2>&1

Peter Edmonds

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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


[Nagios-users] Debugging global host event handler in Nag 3 [SEC=UNCLASSIFIED]

2008-01-05 Thread Stanley.Hopcroft
Dear Folks,

The debug options in Nag 3.x are wonderful (especially for embedded
Perl. It is no longer necessary to enable debugging in p1.pl. This Is a
MASSIVE simply MASSIVE improvement. Thank you).

(FWIW the debug options for event handlers in nagios.cfg are

debug_level=16



# DEBUG VERBOSITY
# This option determines how verbose the debug log out will be.
# Values: 0 = Brief output
# 1 = More detailed
# 2 = Very detailed

debug_verbosity=2

)

The debug file then shows the event handler being called with all the
args

[1199526258.177826] [016.1] [pid=12436] Propagating checks to immediate
non-UNREACHABLE child hosts...
[1199526258.177833] [016.1] [pid=12436] Pre-handle_host_state() Host:
acisp014, Attempt=1/10, Type=HARD, Final State=1 [1199526258.177900]
[016.1] [pid=12436] Running global event handler for host 'acisp014'..
[1199526258.177919] [2320.2] [pid=12436] Raw Command Input:
$USER2$/global_host_event_handler $HOSTNAME$ $HOSTSTATE$ $HOSTSTATETYPE$
$LASTHOSTUP$ $LASTHOSTDOWN$ $LASTHOSTUNREACHABLE$ $HOSTDOWNTIME$
[1199526258.177928] [2320.2] [pid=12436] Expanded Command Output:
$USER2$/global_host_event_handler $HOSTNAME$ $HOSTSTATE$ $HOSTSTATETYPE$
$LASTHOSTUP$ $LASTHOSTDOWN$ $LASTHOSTUNREACHABLE$ $HOSTDOWNTIME$
[1199526258.177935] [016.2] [pid=12436] Raw global host event handler
command line: $USER2$/global_host_event_handler $HOSTNAME$ $HOSTSTATE$
$HOSTSTATETYPE$ $LASTHOSTUP$ $LASTHOSTDOWN$ $LASTHOSTUNREACHABLE$
$HOSTDOWNTIME$ [1199526258.177958] [016.2] [pid=12436] Processed global
host event handler command line:
/usr/lib/nagios/plugins/eventhandlers/global_host_event_handler acisp014
DOWN HARD 1199526081 1199526258 0 0 [1199526258.213601] [016.1]
[pid=12436] Post-handle_host_state() Host: acisp014, Attempt=1/10,
Type=HARD, Final State=1

even though it is logged like so in nagios.log

[1199526258] HOST ALERT: acisp014;DOWN;HARD;1;DOWN BABY DOWN.
[1199526258] GLOBAL HOST EVENT HANDLER:
acisp014;(null);(null);(null);global_host_event_handler

Later,

[1199527058.256653] [016.1] [pid=12436] HOST: acisp014, ATTEMPT=1/10,
CHECK TYPE=ACTIVE, STATE TYPE=HARD, OLD STATE=1, NEW STATE=0
[1199527058.256661] [016.1] [pid=12436] Host was DOWN/UNREACHABLE.
[1199527058.256667] [016.1] [pid=12436] Host experienced a HARD recovery
(it's now UP).
[1199527058.256673] [016.1] [pid=12436] Propagating checks to parent
host(s)...
[1199527058.256679] [016.1] [pid=12436] Propagating checks to child
host(s)...
[1199527058.256685] [016.1] [pid=12436] Pre-handle_host_state() Host:
acisp014, Attempt=1/10, Type=HARD, Final State=0 [1199527058.256750]
[016.1] [pid=12436] Running global event handler for host 'acisp014'..
[1199527058.256767] [2320.2] [pid=12436] Raw Command Input:
$USER2$/global_host_event_handler $HOSTNAME$ $HOSTSTATE$ $HOSTSTATETYPE$
$LASTHOSTUP$ $LASTHOSTDOWN$ $LASTHOSTUNREACHABLE$ $HOSTDOWNTIME$
[1199527058.256776] [2320.2] [pid=12436] Expanded Command Output:
$USER2$/global_host_event_handler $HOSTNAME$ $HOSTSTATE$ $HOSTSTATETYPE$
$LASTHOSTUP$ $LASTHOSTDOWN$ $LASTHOSTUNREACHABLE$ $HOSTDOWNTIME$
[1199527058.256783] [016.2] [pid=12436] Raw global host event handler
command line: $USER2$/global_host_event_handler $HOSTNAME$ $HOSTSTATE$
$HOSTSTATETYPE$ $LASTHOSTUP$ $LASTHOSTDOWN$ $LASTHOSTUNREACHABLE$
$HOSTDOWNTIME$ [1199527058.256806] [016.2] [pid=12436] Processed global
host event handler command line:
/usr/lib/nagios/plugins/eventhandlers/global_host_event_handler acisp014
UP HARD 1199527058 1199526258 0 0 [1199527058.385280] [016.1]
[pid=12436] Post-handle_host_state() Host: acisp014, Attempt=1/10,
Type=HARD, Final State=0

So the event handler is called correctly; there is ZERO likelihood of
the failure to get the handler results being the fault of Nagios 3 (it
is the fault of MY event handler).

On the other hand

1 why does the log entry not show the event handler args apart from
$HOSTNAME$

2 why does debug not show the return code of the handler

3 why does the debug not show the ePN processing (as it does very well
with service checks)
  of the event handler 

4 why does the debug output showing the 'Expanded Command Output:' not
show the macro values 

?

Your comments are very welcome.

Thank you,

Yours sincerely.





Classification: UNCLASSIFIED

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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


[Nagios-users] thresholds values

2008-01-05 Thread Pili Muñoz Gargallo
Hi list

I have to monitor the Signal to Noise Relationship in an antena... I thougth
in using check_snmp but in this case the warning thresholds and the critical
theshold  should have diferent meaning.. the device will be in a warning
state if the device is below the warning threshold and in a critical state
if the device is below the critical threshold...
This could be posible?

Thanks

Pili
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] NRPE Plug-in Development

2008-01-05 Thread Gerhard Lausser
Hi Heiko,
 
> In case you want to enable some extended monitoring 
> (performance), you may output the performance data:
> 
> "OK - current bw: 17Mbit/s|in:12 out:22"
 
Are you sure about the performance data format? : looks more
like Cacti-format.
According to the developer guidelines' proposal
'label'=value[UOM];[warn];[crit];[min];[max] it would be
in=12 out=22

Greetings from Munich,
Gerhard


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] thresholds values

2008-01-05 Thread Marc Powell

On Jan 5, 2008, at 8:23 AM, Pili Muñoz Gargallo wrote:

> Hi list
>
> I have to monitor the Signal to Noise Relationship in an antena... I  
> thougth in using check_snmp but in this case the warning thresholds  
> and the critical theshold  should have diferent meaning.. the device  
> will be in a warning state if the device is below the warning  
> threshold and in a critical state if the device is below the  
> critical threshold...
> This could be posible?

Yes, just set your warning and critical ranges appropriately.

check_snmp [...] -w 20:11 -c 10:0

see check_snmp --help for more information.

--
Marc


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] SMS gateway

2008-01-05 Thread Mad Unix
in the future am thinking of a good enhancements of SMS (gnokii or smstools)
to be 2 way communications, i.e. so the server can be controled via mobile
phone.
if a server/service goes down, you can reply to the
alert SMS message with a reboot command or start an application,
to fix a service as long the server reachable and the signal can get to the
server.

What do you think ?

Thanks Dennis and Peter for you inputs ... i have downloaded smstools
started with the configuration.







On 1/5/08, Peter Edmonds <[EMAIL PROTECTED]> wrote:
>
> > which tools do you use to send sms through GSM modem (connected via COM)
> > through nagios:
> > smstools, kanal, or smsclient
>
> I use gnokii. Modem is a Telular GSM SX5D
>
> /etc/gnokiirc looks like this
>
> [global]
> port = /dev/ttyS0
> model = AT
> initlength = default
> connection = serial
> use_locking = yes
> serial_baudrate = 19200
> smsc_timeout = 10
> [gnokiid]
> bindir = /usr/sbin/
> [connect_script]
> TELEPHONE = 12345678
> [disconnect_script]
> [logging]
> debug = on
> rlpdebug = off
> xdebug = off
>
>
>
> Notify command for service notifications looks like this
>
> echo -e
> "<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$SERVICEOUTPUT$\n$LONGDATETIME$"
> |gnokii --sendsms $CONTACTPAGER$ >>
> /usr/local/groundwork/nagios/var/gnokii.log 2>&1
>
> For host notifications this does the job
>
> echo -e
> "<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$HOSTOUTPUT$\n$LONGDATETIME$"
> |gnokii --sendsms $CONTACTPAGER$ >> /usr/local/nagios/var/gnokii.log
> 2>&1
>
> Peter Edmonds
>



-- 
madunix
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] SMS gateway

2008-01-05 Thread Dario B. Bestetti

- Original Message - 
From: "Mad Unix" <[EMAIL PROTECTED]> 
To: "Peter Edmonds" <[EMAIL PROTECTED]> 
Cc: nagios-users@lists.sourceforge.net 
Sent: Saturday, January 5, 2008 4:53:56 PM (GMT-0300) Auto-Detected 
Subject: Re: [Nagios-users] SMS gateway 





in the future am thinking of a good enhancements of SMS (gnokii or smstools) to 
be 2 way communications, i.e. so the server can be controled via mobile phone. 
if a server/service goes down, you can reply to the 
alert SMS message with a reboot command or start an application, 
to fix a service as long the server reachable and the signal can get to the 
server. 

What do you think ? 

Thanks Dennis and Peter for you inputs ... i have downloaded smstools started 
with the configuration. 






On 1/5/08, Peter Edmonds < [EMAIL PROTECTED] > wrote: 

> which tools do you use to send sms through GSM modem (connected via COM) 
> through nagios: 
> smstools, kanal, or smsclient 

I use gnokii. Modem is a Telular GSM SX5D 

/etc/gnokiirc looks like this 

[global] 
port = /dev/ttyS0 
model = AT 
initlength = default 
connection = serial 
use_locking = yes 
serial_baudrate = 19200 
smsc_timeout = 10 
[gnokiid] 
bindir = /usr/sbin/ 
[connect_script] 
TELEPHONE = 12345678 
[disconnect_script] 
[logging] 
debug = on 
rlpdebug = off 
xdebug = off 



Notify command for service notifications looks like this 

echo -e 
"<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$SERVICEOUTPUT$\n$LONGDATETIME$" 
|gnokii --sendsms $CONTACTPAGER$ >> 
/usr/local/groundwork/nagios/var/gnokii.log 2>&1 

For host notifications this does the job 

echo -e 
"<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$HOSTOUTPUT$\n$LONGDATETIME$" 
|gnokii --sendsms $CONTACTPAGER$ >> /usr/local/nagios/var/gnokii.log 
2>&1 

Peter Edmonds 



-- 
madunix 
- This 
SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) 
Visual Studio 2005. 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 



Actually, smstools allow you to interact with any application. You can send a 
message back and execute any command, it´s just a matter of configuration. And 
keep in mind the security issues. 

[]s 
_ 
Dario B. Bestetti OpServices 
R. Luciana de Abreu, 471 - Sala 403 
Porto Alegre, RS - CEP 90570-060 
Fone 55(51)30613588 Mobile 55(51)81518218 
Fax 55(51)30613588 Email [EMAIL PROTECTED] 

"In God we trust, the rest we monitor ..." 
_ 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] NRPE Plug-in Development

2008-01-05 Thread Heiko Schlittermann
Gerhard Lausser <[EMAIL PROTECTED]> (Sa 05 Jan 2008 15:53:22 CET):
> Hi Heiko,
>  
> > In case you want to enable some extended monitoring 
> > (performance), you may output the performance data:
> > 
> > "OK - current bw: 17Mbit/s|in:12 out:22"
>  
> Are you sure about the performance data format? : looks more
> like Cacti-format.
> According to the developer guidelines' proposal
> 'label'=value[UOM];[warn];[crit];[min];[max] it would be
> in=12 out=22

You're right.
-- 
Heiko


signature.asc
Description: Digital signature
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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