<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<title>RE : [Nagios-users] Sybase check on windows servers</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Florent,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thank you so much for being patient with
me. I tried what you said. But unfortunately I am still getting the error “return
code of 139 is out of bounds”.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Here is my configuration-<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hostgroups.cfg-<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>define hostgroup{<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> hostgroup_name sybasetest<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> alias Sybase
Servers Test<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> members ganges,nila<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> }<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Commands.cfg-<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>define command{<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> command_name check_sybase<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> command_line $USER1$/check_nt
-v SERVICESTATE -d SHOWALL -l $ARG1$ $ARG2$<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> }<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Services.cfg-<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>define service{<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> use
local-service<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> hostgroup_name sybasetest<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> service_description Sybase<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> check_command check_sybase!0!SYBSQL_$HOSTNAME$<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> }<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Kindly help.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regards,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Lalita<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> </span></font><o:p></o:p></p>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Florent HOUBART
[mailto:Florent.HOUBART@Ajilon.fr] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, June 25, 2007 4:54
PM<br>
<b><span style='font-weight:bold'>To:</span></b> Lalita Drolia<br>
<b><span style='font-weight:bold'>Cc:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE : [Nagios-users]
Sybase check on windows servers</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Hi,<br>
<br>
>I am using nagios2.9 and Nagios plugins 1.4.9.<br>
><br>
>I have made a hostgroup for Sybase servers of the sort-<br>
><br>
>define hostgroup{<br>
> hostgroup_name sybase<br>
>
alias Sybase
Servers<br>
>
members machine1,machine2,machine3,machine4,machine5<br>
> }<br>
><br>
>Now I want to know if its possible to define a single service for all<br>
>these machines as the service name differs in each server because it is-<br>
>Sybsql-machine1,sybsql_machine2,sybsql_machine3 etc.<br>
><br>
>Can you please also provide me help on command definition and service<br>
>definition for Sybase check on linux machines.<br>
<br>
Here is a small test I done to validate that using HOSTNAME in serice
definition is OK.<br>
You can adapt this exemple with your real commands.<br>
<br>
I use the dummy check to verify if the hostname is well read by the command.
This plugin take in first argument the return value, and in second the status
message.<br>
I have two hosts, host1 and host2, and a hostgroup containing the two hosts.<br>
I then define the service on the hostgroup.<br>
I use the $HOSTNAME$ macro in service definition to specify parameters.<br>
<br>
<br>
##################################<br>
# Command definition<br>
<br>
# 'check_dummy' command definition<br>
define command{<br>
command_name check_dummy<br>
command_line
$USER1$/check_dummy $ARG1$ $ARG2$<br>
}<br>
<br>
<br>
##################################<br>
# hosts definition definition<br>
<br>
<br>
define host{<br>
use
linux-server<br>
host_name
host1<br>
alias
Host1<br>
address
127.0.0.1<br>
}<br>
define host{<br>
use
linux-server<br>
host_name
host2<br>
alias
Host2<br>
address
127.0.0.1<br>
}<br>
<br>
##################################<br>
# Hostgroup definition<br>
<br>
define hostgroup{<br>
hostgroup_name
Sybase ; The name of the
hostgroup<br>
alias Sybase
servers ; Long name of the group<br>
members
host1,host2 ; Comma separated list of hosts that belong
to this group<br>
}<br>
<br>
##################################<br>
# Service definition<br>
<br>
define service{<br>
use
local-service<br>
hostgroup_name
Sybase
; I specify here the hostgroup<br>
service_description
Sybase<br>
check_command
check_dummy!0!SYBSQL_$HOSTNAME$ ; The $HOSTNAME$ will be replaced by Nagios by
the name of the host<br>
}<br>
<br>
<br>
In nagios console, I then have :<br>
host1 Sybase OK:
SYBSQL_host1<br>
host2 Sybase OK:
SYBSQL_host2<br>
<br>
<br>
<br>
Best regards,<br>
<br>
Florent</span></font> <o:p></o:p></p>
</div>
</body>
</html>
<br>
Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.