R: [Nagios-users] start a script automatically

2006-04-04 Thread Marco Borsani



I followed istructions on the 
manual.
 
When Nagios try to run the command, in the 
nagios.log I still read :
 
Warning: Attempting to execute the command 
"/usr/local/nagios/libexec/eventhandlers/restart-http  

 
ls -la 
/usr/local/nagios/libexec/eventhandlers/restart-http
-rwxr-xr-x   1 
root   sys     489 Apr  4 
15:06 
 /usr/local/nagios/libexec/eventhandlers/restart-http
 
Any 
idea?
Marco

  
  
  Da: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] Inviato: lunedì 3 aprile 2006 
  14.01A: Marco BorsaniCc: 'NAGIOS'; 
  [EMAIL PROTECTED]Oggetto: Re: [Nagios-users] 
  start a script automatically
  Look into event handlers. 
  Joe Petrucci Office: 
  704-383-6089Cell : 724-462-0443
  


  "Marco Borsani" 
<[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 
04/03/2006 07:57 AM 
  

  
  

  To
"'NAGIOS'" 
   
  

  cc

  

  Subject
[Nagios-users] start a 
  script automatically

  
  

Hi all!Is it possible to start a script automatically on a 
  remote host in case of aparticolar event?For example, if nagios 
  detects that process "named" on a DNS server is down,will Nagios can run a 
  remote command on that server to restart the 
  process?RegardsMarco Borsani         
                 Unix & 
  Monitoring System AdministratorTechnical OperationTel.   
   +39 010 4310115Fax     +39 010 4327454E-mail: 
  [EMAIL PROTECTED]ITnet S.r.l. - Direzione e Coordinamento di WIND 
  Telecomunicazioni S.p.A.Internet Service ProviderSede legale:   
                    Via C.G.Viola, 
  48 - 00148 RomaDir. Centrale e Amministrativa:         
            Via Pacinotti, 39      
                        
                   16151 Genova 
  (Italy)                  
                        
                      
  http://www.it.net                 
                 mailto:[EMAIL PROTECTED] 
  ___Altre 
  sedi ITnet:MILANO tel.: +39 02 30114900   
   [EMAIL PROTECTED]ROMA    tel.: +39 06 83116707   
   [EMAIL PROTECTED]___ITnet 
  is associated to CIX (Commercial IP eXchange) and RIPEITnet is associated 
  to AIIP (Associazione Italiana Internet 
  Providers)---This 
  SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat 
  extends applications into web and mobile media. Attend the live webcastand 
  join the prime developer group breaking into this new coding 
  territory!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___Nagios-users 
  mailing 
  listNagios-users@lists.sourceforge.nethttps://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/nullForwardSourceID:NT00014CEE     



R: [Nagios-users] start a script automatically

2006-04-05 Thread Marco Borsani
 
-}Marc wrote:
-}
-}Not without the rest of the error that you chopped off. 
-}What's the '' part? That's probably the most useful bit 
-}of information. You've been on the list long enough to know 
-}we need more information than that
-};)

Complete message is:
Warning: Attempting to execute the command
"/usr/local/nagios/libexec/eventhandlers/restart-http $SERVICESTATE$
$STATETYPE$ $SERVICEATTEMPT$"

I see restart-http script on the manual (in the "event handlers" chapter)
and copy it to test and understand how event handlers work.

-}
-}Can you run restart-http as the nagios user? Show us the 
-}command and service definition. Verify that you're using full 
-}paths for commands used within restart-http. Detail what 
-}restart-http is doing specifically.
-}

# 'restart-http' command definition
define command{
command_namerestart-http
command_line/usr/local/nagios/libexec/eventhandlers/restart-http
$SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$
}

One problem could be "where" define restart-http command. Yesterday I put it
in the checkcommands.cfg file, today I am defined it in the
misccommands.cfg.
Another one is how to restart the httpd (in this case) like nagios user (the
manual mentions this possibility, but no ideas are given to solve it).
Again, if I would run a command on a Windows 2003 server, how will I do ?

Regards
Marco



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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


R: [Nagios-users] start a script automatically

2006-04-05 Thread Marco Borsani
Well, now it is working correclty!
There was a network problem between the hosts.

I still have to know how to run a command with the Event Handler on a
Windows 2003 server.
Moreover, will I have any authentication problems?
Any idea?

Regards.
Marco

-}-Messaggio originale-
-}Da: [EMAIL PROTECTED] 
-}[mailto:[EMAIL PROTECTED] Per conto 
-}di Marco Borsani
-}Inviato: mercoledì 5 aprile 2006 9.59
-}A: 'Marc Powell'
-}Cc: 'NAGIOS'
-}Oggetto: R: [Nagios-users] start a script automatically
-}
-} 
-}-}Marc wrote:
-}-}
-}-}Not without the rest of the error that you chopped off. 
-}-}What's the '' part? That's probably the most useful bit 
-}-}of information. You've been on the list long enough to know 
-}-}we need more information than that
-}-};)
-}
-}Complete message is:
-}Warning: Attempting to execute the command 
-}"/usr/local/nagios/libexec/eventhandlers/restart-http 
-}$SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$"
-}
-}I see restart-http script on the manual (in the "event 
-}handlers" chapter) and copy it to test and understand how 
-}event handlers work.
-}
-}-}
-}-}Can you run restart-http as the nagios user? Show us the 
-}-}command and service definition. Verify that you're using 
-}full -}paths for commands used within restart-http. Detail 
-}what -}restart-http is doing specifically.
-}-}
-}
-}# 'restart-http' command definition
-}define command{
-}command_namerestart-http
-}command_line
-}/usr/local/nagios/libexec/eventhandlers/restart-http
-}$SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$
-}}
-}
-}One problem could be "where" define restart-http command. 
-}Yesterday I put it in the checkcommands.cfg file, today I am 
-}defined it in the misccommands.cfg.
-}Another one is how to restart the httpd (in this case) like 
-}nagios user (the manual mentions this possibility, but no 
-}ideas are given to solve it).
-}Again, if I would run a command on a Windows 2003 server, how 
-}will I do ?
-}
-}Regards
-}Marco
-}
-}
-}
-}---
-}This SF.Net email is sponsored by xPML, a groundbreaking 
-}scripting language that extends applications into web and 
-}mobile media. Attend the live webcast and join the prime 
-}developer group breaking into this new coding territory!
-}http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&;
-}dat=121642
-}___
-}Nagios-users mailing list
[EMAIL PROTECTED]
-}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 xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
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: R: [Nagios-users] start a script automatically

2006-04-04 Thread joseph . petrucci

The ID and group you start the Nagios
process with must have full permissions on the file that needs executed
as well as the directory. I usually have NAgios and the group own the directory
and files and have a 754 permission on them

Joe Petrucci 
Office: 704-383-6089
Cell : 724-462-0443






"Marco Borsani"
<[EMAIL PROTECTED]> 
04/04/2006 10:04 AM





To
<[EMAIL PROTECTED]>


cc
"'NAGIOS'" 


Subject
R: [Nagios-users] start a
script automatically








I followed istructions on the
manual.
 
When Nagios try to run the command,
in the nagios.log I still read :
 
Warning: Attempting to execute
the command "/usr/local/nagios/libexec/eventhandlers/restart-http
 
 
ls -la /usr/local/nagios/libexec/eventhandlers/restart-http
-rwxr-xr-x   1 root  
    sys     489 Apr  4 15:06  /usr/local/nagios/libexec/eventhandlers/restart-http
 
Any idea?
Marco

Da: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Inviato: lunedì 3 aprile 2006 14.01
A: Marco Borsani
Cc: 'NAGIOS'; [EMAIL PROTECTED]
Oggetto: Re: [Nagios-users] start a script automatically


Look into event handlers. 

Joe Petrucci 
Office: 704-383-6089
Cell : 724-462-0443





"Marco Borsani"
<[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED] 
04/03/2006 07:57 AM






To
"'NAGIOS'"
 


cc



Subject
[Nagios-users] start a script
automatically










Hi all!

Is it possible to start a script automatically on a remote host in case
of a
particolar event?

For example, if nagios detects that process "named" on a DNS
server is down,
will Nagios can run a remote command on that server to restart the process?

Regards

Marco Borsani                  
     
Unix & Monitoring System Administrator
Technical Operation
Tel.    +39 010 4310115
Fax     +39 010 4327454
E-mail: [EMAIL PROTECTED]

ITnet S.r.l. - Direzione e Coordinamento di WIND Telecomunicazioni S.p.A.
Internet Service Provider
Sede legale:                  
  Via C.G.Viola, 48 - 00148 Roma
Dir. Centrale e Amministrativa:            
      Via Pacinotti, 39
                    
                     
  16151 Genova (Italy)
                    
                     
                 
http://www.it.net                
               
mailto:[EMAIL PROTECTED] 
___
Altre sedi ITnet:
MILANO tel.: +39 02 30114900    [EMAIL PROTECTED]
ROMA    tel.: +39 06 83116707    [EMAIL PROTECTED]
___
ITnet is associated to CIX (Commercial IP eXchange) and RIPE
ITnet is associated to AIIP (Associazione Italiana Internet Providers)




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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

ForwardSourceID:NT00014CEE     
ForwardSourceID:NT000151D2
   


Re: R: [Nagios-users] start a script automatically

2006-04-05 Thread Toto Capuccino
Just write sc4ripts in whenever languages you feel happy with and then use nrpe to execute them on the Win host.2006/4/5, Marco Borsani <[EMAIL PROTECTED]
>:Well, now it is working correclty!There was a network problem between the hosts.
I still have to know how to run a command with the Event Handler on aWindows 2003 server.Moreover, will I have any authentication problems?Any idea?Regards.Marco-}-Messaggio originale-
-}Da: [EMAIL PROTECTED]-}[mailto:[EMAIL PROTECTED]
] Per conto-}di Marco Borsani-}Inviato: mercoledì 5 aprile 2006 9.59-}A: 'Marc Powell'-}Cc: 'NAGIOS'-}Oggetto: R: [Nagios-users] start a script automatically-}-}-}-}Marc wrote:-}-}
-}-}Not without the rest of the error that you chopped off.-}-}What's the '' part? That's probably the most useful bit-}-}of information. You've been on the list long enough to know-}-}we need more information than that
-}-};)-}-}Complete message is:-}Warning: Attempting to execute the command-}"/usr/local/nagios/libexec/eventhandlers/restart-http-}$SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$"-}-}I see restart-http script on the manual (in the "event
-}handlers" chapter) and copy it to test and understand how-}event handlers work.-}-}-}-}-}Can you run restart-http as the nagios user? Show us the-}-}command and service definition. Verify that you're using
-}full -}paths for commands used within restart-http. Detail-}what -}restart-http is doing specifically.-}-}-}-}# 'restart-http' command definition-}define command{-}command_namerestart-http
-}command_line-}/usr/local/nagios/libexec/eventhandlers/restart-http-}$SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$-}}-}-}One problem could be "where" define restart-http command.
-}Yesterday I put it in the checkcommands.cfg file, today I am-}defined it in the misccommands.cfg.-}Another one is how to restart the httpd (in this case) like-}nagios user (the manual mentions this possibility, but no
-}ideas are given to solve it).-}Again, if I would run a command on a Windows 2003 server, how-}will I do ?-}-}Regards-}Marco-}-}-}-}---
-}This SF.Net email is sponsored by xPML, a groundbreaking-}scripting language that extends applications into web and-}mobile media. Attend the live webcast and join the prime-}developer group breaking into this new coding territory!
-}http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&-}dat=121642-}___
-}Nagios-users mailing list-}Nagios-[EMAIL PROTECTED]-}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 xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642___Nagios-users mailing listNagios-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-- Le bon sens est la chose du monde la mieux partagée.


R: R: [Nagios-users] start a script automatically

2006-04-05 Thread Marco Borsani



I am using NSClient ...
 
Marco

  
  
  Da: Toto Capuccino [mailto:[EMAIL PROTECTED] 
  Inviato: mercoledì 5 aprile 2006 12.52A: Marco 
  BorsaniCc: NAGIOSOggetto: Re: R: [Nagios-users] start a 
  script automatically
  Just write sc4ripts in whenever languages you feel happy with and 
  then use nrpe to execute them on the Win host.
  2006/4/5, Marco Borsani <[EMAIL PROTECTED] >:
  Well, 
now it is working correclty!There was a network problem between the 
hosts. I still have to know how to run a command with the Event 
Handler on aWindows 2003 server.Moreover, will I have any 
authentication problems?Any 
idea?Regards.Marco-}-Messaggio originale- 
-}Da: [EMAIL PROTECTED]-}[mailto:[EMAIL PROTECTED] 
] Per conto-}di Marco Borsani-}Inviato: mercoledì 5 aprile 2006 
9.59-}A: 'Marc Powell'-}Cc: 'NAGIOS'-}Oggetto: R: [Nagios-users] 
start a script automatically-}-}-}-}Marc 
wrote:-}-}-}-}Not without the rest of the error that you chopped 
off.-}-}What's the '' part? That's probably the most useful 
bit-}-}of information. You've been on the list long enough to 
know-}-}we need more information than that 
-}-};)-}-}Complete message is:-}Warning: Attempting to 
execute the 
command-}"/usr/local/nagios/libexec/eventhandlers/restart-http-}$SERVICESTATE$ 
$STATETYPE$ $SERVICEATTEMPT$"-}-}I see restart-http script on the 
manual (in the "event -}handlers" chapter) and copy it to test and 
understand how-}event handlers work.-}-}-}-}-}Can you run 
restart-http as the nagios user? Show us the-}-}command and service 
definition. Verify that you're using -}full -}paths for commands used 
within restart-http. Detail-}what -}restart-http is doing 
specifically.-}-}-}-}# 'restart-http' command 
definition-}define 
command{-}command_namerestart-http 
-}command_line-}/usr/local/nagios/libexec/eventhandlers/restart-http-}$SERVICESTATE$ 
$STATETYPE$ 
$SERVICEATTEMPT$-}}-}-}One 
problem could be "where" define restart-http command. -}Yesterday I put 
it in the checkcommands.cfg file, today I am-}defined it in the 
misccommands.cfg.-}Another one is how to restart the httpd (in this 
case) like-}nagios user (the manual mentions this possibility, but no 
-}ideas are given to solve it).-}Again, if I would run a command on 
a Windows 2003 server, how-}will I do 
?-}-}Regards-}Marco-}-}-}-}--- 
-}This SF.Net email is sponsored by xPML, a 
groundbreaking-}scripting language that extends applications into web 
and-}mobile media. Attend the live webcast and join the 
prime-}developer group breaking into this new coding territory! 
-}http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&-}dat=121642-}___ 
-}Nagios-users mailing list-}Nagios-[EMAIL PROTECTED]-}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 xPML, a groundbreaking scripting language 
that extends applications into web and mobile media. Attend the live 
webcastand join the prime developer group breaking into this new coding 
territory!http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642___Nagios-users 
mailing listNagios-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-- Le bon sens est 
  la chose du monde la mieux partagée.