<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C3F605.15A17CC0">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="time"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="date"/>
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
@font-face
        {font-family:sans-serif;
        panose-1:0 0 0 0 0 0 0 0 0 0;
        mso-font-alt:"Times New Roman";
        mso-font-charset:0;
        mso-generic-font-family:roman;
        mso-font-format:other;
        mso-font-pitch:auto;
        mso-font-signature:0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
tt
        {font-family:"Courier New";
        mso-ascii-font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";
        mso-hansi-font-family:"Courier New";
        mso-bidi-font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:36.0pt'>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>A couple of chown seems to solve the
problem.... Thanks for that.<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 style='margin-left:36.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> h.baecker@ecofis.de
[mailto:h.baecker@ecofis.de] <br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><st1:date
Month="2" Day="17" Year="2004"><font size=2 face=Tahoma><span style='font-size:
 10.0pt;font-family:Tahoma'>17 February 2004</span></font></st1:date><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> </span></font><st1:time
Hour="21" Minute="24"><font size=2 face=Tahoma><span style='font-size:10.0pt;
 font-family:Tahoma'>21:24</span></font></st1:time><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>To:</span></b>
Christiaan.Ehlers@inclarity.co.uk<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> Antwort: [Nagios-users]
SMS script...</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
</span></font><font size=2 face=sans-serif><span style='font-size:10.0pt;
font-family:sans-serif'>Hi,</span></font> <br>
<br>
<font size=2 face=sans-serif><span style='font-size:10.0pt;font-family:sans-serif'>Did
you try to execute your script as root or as the user nagios runs under?</span></font>
<br>
<font size=2 face=sans-serif><span style='font-size:10.0pt;font-family:sans-serif'>Sounds
like a file permission problem.</span></font> <br>
<br>
<font size=2 face=sans-serif><span style='font-size:10.0pt;font-family:sans-serif'>Regards</span></font>
<br>
<font size=2 face=sans-serif><span style='font-size:10.0pt;font-family:sans-serif'>Hendrik<br>
</span></font><br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></p>

<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
 style='width:100.0%;mso-cellspacing:1.5pt;margin-left:36.0pt'>
 <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'>
  <td width="39%" valign=top style='width:39.98%;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><b><font size=1 face=sans-serif><span style='font-size:
  7.5pt;font-family:sans-serif;font-weight:bold'>Christiaan Ehlers
  <Christiaan.Ehlers@inclarity.co.uk></span></font></b><font size=1
  face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'> </span></font><br>
  <font size=1 face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>Gesendet
  von: nagios-users-admin@lists.sourceforge.net</span></font> <o:p></o:p></p>
  <p><font size=1 face=sans-serif><span style='font-size:7.5pt;font-family:
  sans-serif'>17.02.2004 17:33</span></font> <o:p></o:p></p>
  </td>
  <td width="58%" valign=top style='width:58.98%;padding:.75pt .75pt .75pt .75pt'>
  <table class=MsoNormalTable border=0 cellpadding=0 width="100%"
   style='width:100.0%;mso-cellspacing:1.5pt'>
   <tr style='mso-yfti-irow:0'>
    <td style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>An</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=1 face=sans-serif><span style='font-size:
    7.5pt;font-family:sans-serif'>nagios-users@lists.sourceforge.net</span></font>
    <o:p></o:p></p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:1'>
    <td style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>Kopie</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span
    style='font-size:12.0pt'><o:p> </o:p></span></font></p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'>
    <td style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>Thema</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=1 face=sans-serif><span style='font-size:
    7.5pt;font-family:sans-serif'>[Nagios-users] SMS script...</span></font><o:p></o:p></p>
    </td>
   </tr>
  </table>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'><o:p> </o:p></span></font></p>
  <table class=MsoNormalTable border=0 cellpadding=0 style='mso-cellspacing:
   1.5pt'>
   <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span
    style='font-size:12.0pt'><o:p> </o:p></span></font></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span
    style='font-size:12.0pt'><o:p> </o:p></span></font></p>
    </td>
   </tr>
  </table>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'><o:p></o:p></span></font></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
<br>
<br>
</span></font><tt><font size=2 face="Courier New"><span style='font-size:10.0pt'>Hi</span></font></tt><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><br>
<br>
<tt><font face="Courier New">Our sms server can not take more than 160
characters in the body of the text</font></tt><br>
<tt><font face="Courier New">message.  I then wrote a script to help cut
down those notifications that</font></tt><br>
<tt><font face="Courier New">are larger than 160 characters.  (the script
is pretty shabby, please feel</font></tt><br>
<tt><font face="Courier New">free to sugest improvements)  Now when I run
the script manualy, I get a</font></tt><br>
<tt><font face="Courier New">txt.  But it would seem when I empliment the
script in nagios (see the</font></tt><br>
<tt><font face="Courier New">misccommand.cfg extract) I don't seem to get any
messages.</font></tt><br>
<br>
<tt><font face="Courier New">I have the following command in misccommand.cfg</font></tt><br>
<br>
<tt><font face="Courier New">define command{</font></tt><br>
<tt><font face="Courier New">       command_name  
 service-notify-cleansms</font></tt><br>
<tt><font face="Courier New">       command_line  
 /bin/echo "$SERVICESTATE$ alert for</font></tt><br>
<tt><font face="Courier New">$HOSTALIAS$/$SERVICEDESC$ $OUTPUT$" >
/home/scripts/msg && /home/scripts</font></tt><br>
<tt><font face="Courier New">/sms.sh $CONTACTEMAIL$</font></tt><br>
<tt><font face="Courier New">       }</font></tt><br>
<br>
<tt><font face="Courier New">And the sms.sh script is as follow... Deletes one
character after the other,</font></tt><br>
<tt><font face="Courier New">starting at the back, untill it has 160.</font></tt><br>
<br>
<tt><font face="Courier New">noclobber=0</font></tt><br>
<tt><font face="Courier New">FILE=/home/scripts/msg</font></tt><br>
<br>
<tt><font face="Courier New">while [ `wc -m $FILE | awk '{print $1}'` -gt 160 ]
</font></tt><br>
<tt><font face="Courier New">       do</font></tt><br>
<br>
<tt><font face="Courier New">       if [ `cat $FILE | sed
-n '$p' | wc -m`  = 1 ]; then</font></tt><br>
<tt><font face="Courier New">             
 cat $FILE | sed '$d' > $FILE</font></tt><br>
<tt><font face="Courier New">       else</font></tt><br>
<tt><font face="Courier New">             
 cat $FILE | sed '$s/.$//' > $FILE</font></tt><br>
<tt><font face="Courier New">       fi</font></tt><br>
<br>
<tt><font face="Courier New">       done</font></tt><br>
<br>
<tt><font face="Courier New">cat $FILE | mail $1</font></tt><br>
<br>
<br>
<tt><font face="Courier New">-------------------------------------------------------</font></tt><br>
<tt><font face="Courier New">SF.Net is sponsored by: Speed Start Your Linux
Apps Now.</font></tt><br>
<tt><font face="Courier New">Build and deploy apps & Web services for Linux
with</font></tt><br>
<tt><font face="Courier New">a free DVD software kit from IBM. Click Now!</font></tt><br>
<tt><font face="Courier New">http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click</font></tt><br>
<tt><font face="Courier New">_______________________________________________</font></tt><br>
<tt><font face="Courier New">Nagios-users mailing list</font></tt><br>
<tt><font face="Courier New">Nagios-users@lists.sourceforge.net</font></tt><br>
<tt><font face="Courier New">https://lists.sourceforge.net/lists/listinfo/nagios-users</font></tt><br>
<tt><font face="Courier New">::: Please include Nagios version, plugin version
(-v) and OS when reporting any issue. </font></tt><br>
<tt><font face="Courier New">::: Messages without supporting info will risk
being sent to /dev/null</font></tt><br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]></span></font><o:p></o:p></p>

</div>

</body>

</html>