<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.20733" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=459093506-20062008><FONT face=Arial color=#0000ff size=2>Hi
all,</FONT></SPAN></DIV>
<DIV><SPAN class=459093506-20062008><FONT face=Arial color=#0000ff size=2>I
found an alternative solution which works with accents and coma
!</FONT></SPAN></DIV>
<DIV><SPAN class=459093506-20062008><FONT face=Arial color=#0000ff size=2>I use
NRPE with nsclient++</FONT><BR><FONT face=Arial color=#0000ff size=2>In
the</FONT> NSC.ini: <BR>Under : <BR><BR></DIV>
<DL class=codebox>
<DT><CODE>[NRPE Handlers]</CODE></DT></DL>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR><FONT face=Arial><FONT
size=2><SPAN class=459093506-20062008>Add the following line</SPAN> <SPAN
class=459093506-20062008>(for the counter Counter:Ecriture disque/s=\Disque
physique(_Total)\Écritures disque,
octets/s) </SPAN> :</FONT></FONT><BR></DIV>
<DL class=codebox>
<DT><CODE> check_count=inject checkCounter "Counter:Ecriture
disque/s=\Disque physique(_Total)\Écritures disque, octets/s" ShowAll
MaxWarn=50000 MaxCrit=100000</CODE></DT>
<DT><CODE></CODE> </DT></DL>
<DIV><CODE><SPAN class=459093506-20062008></SPAN><FONT face=Arial color=#0000ff
size=2>A<SPAN class=459093506-20062008>nd you can test from the server
:</SPAN><BR></FONT></CODE></DIV>
<BLOCKQUOTE class=uncited>
<DIV>$./check_nrpe -H hcu11 -p 5666 -c check_count<BR>OK: Ecriture disque/s:
2063.39|'Ecriture disque/s'=2063.39;50000;100000;</DIV></BLOCKQUOTE>
<DIV><BR><BR><SPAN class=459093506-20062008></SPAN><FONT face=Arial>G<SPAN
class=459093506-20062008>reat!</SPAN></FONT><BR><BR><SPAN
class=459093506-20062008></SPAN><FONT face=Arial><FONT color=#0000ff><FONT
size=2>T<SPAN class=459093506-20062008>o obtain the list of the counters
:</SPAN></FONT></FONT></FONT><BR></DIV>
<BLOCKQUOTE class=uncited>
<DIV>nsclient++.exe CheckSystem listpdh</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV></BLOCKQUOTE>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=459093506-20062008>Easy
;)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV></SPAN>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left><FONT face=Tahoma
size=2>-----Message d'origine-----<BR><B>De :</B> Anthony Montibello
[mailto:amontibello@gmail.com] <BR><B>Envoyé :</B> vendredi 20 juin 2008
01:41<BR><B>À :</B> NAYRAT Adrien<BR><B>Cc :</B>
nagiosplug-help@lists.sourceforge.net<BR><B>Objet :</B> Re: RE :
[Nagiosplug-help] check_nt counter with coma problem<BR><BR></FONT></DIV>
<DIV>THe counter name can be changed in the Windows Registry, However this
should be tested before implementing in production</DIV>
<DIV> </DIV>
<DIV>TOny (Author of NC_Net)<BR><BR></DIV>
<DIV class=gmail_quote>On Thu, Jun 19, 2008 at 3:37 AM, NAYRAT Adrien <<A
href="mailto:adrien.nayrat@brest-metropole-oceane.fr">adrien.nayrat@brest-metropole-oceane.fr</A>>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV><SPAN></SPAN><FONT face=Arial><FONT color=#0000ff><FONT
size=2>I<SPAN> found the problem.. The problem is in this function
:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN>strtok
(value_list, "&");</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN>It replace the
coma "," by a "&". Even if the coma is in the name of the
counter.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2>Why microsoft put coma in
the name of the french counters!</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><BR></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=gmail_quote>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>On Wed, Jun 18, 2008 at 8:58 AM, NAYRAT Adrien <<A
href="mailto:adrien.nayrat@brest-metropole-oceane.fr"
target=_blank>adrien.nayrat@brest-metropole-oceane.fr</A>>
wrote:<BR></DIV></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c><BR>Hello,<BR><BR>I have a problem with the check_nt
plugin, with the counter variable.<BR>When the name of the counter
contain a coma "," check_nt use the text after the coma as a description
:<BR>For example :<BR>The counter is :<BR>
\Disque physique(_Total)\Lectures disque, octets/s<BR><BR>My
command line is :<BR> ./check_nt -H hcu11
-p 1248 -v COUNTER -s "public" -l "\\Disque
physique(_Total)\\Lectures disque, octets/s"<BR><BR>I modified the
sources, and I had some printf:<BR><BR><BR>Here ==>>
printf ("\nvalue list :
%s\n",value_list);<BR>
if (value_list == NULL)<BR>
output_message = strdup
(_("No counter specified"));<BR>
else<BR>
........<BR>
else if ((counter_unit == NULL)
&& (description != NULL))<BR>
{<BR>Here ==>>
printf("\ncounter_unit %s, description
%s\n",counter_unit,description);<BR>
output_message = strdup (_("No unit
counter specified"));<BR>
}<BR>
if (allRight)<BR>
{.......<BR><BR><BR>And the result of the command line is
:<BR> m9427:/usr/lib/nagios/plugins/libexec#
./check_nt -H hcu11 -p 1248 -v COUNTER -s "public" -l
"\\Disque physique(_Total)\\Lectures disque, octets/s"<BR><BR>
value list : \Disque physique(_Total)\Lectures
disque, octets/s<BR><BR> counter_unit (null),
description octets/s<BR> No unit counter
specified<BR><BR><BR>I also try with<BR>
./check_nt -H hcu11 -p 1248 -v COUNTER -s "public" -l
"\\Disque physique(_Total)\\Lectures disque\, octets/s"<BR>The result is
the same.<BR><BR><BR>I hope we will find a solution.<BR>PS : Before this
problem I have had problems with the accents "é" solved by using a perl
script :<BR> #!/usr/bin/perl<BR><BR>
$response2 =
`/usr/lib/nagios/plugins/libexec/check_nt -H $ARGV[0] -p 1248 -v COUNTER
-s "public" -l "\\Disque physique(_Total)\\Lectures disque\\,
octets/s"`;<BR> chomp $response2;<BR>
($used) = ($response2);<BR><BR>
print "$response2\n";<BR><BR><BR>Thanks you for your help, I'm a
french user of nagios ;)<BR><BR><BR>Adrien NAYRAT<BR>Apprenti Ingénieur
Réseaux et Télécommunications<BR>DIT - Brest-Métropole-Océane<BR>6,
Boulevard de l'Europe<BR>Tel/fax 02.98.34.30.19<BR><A
href="mailto:adrien.nayrat@brest-metropole-oceane.fr"
target=_blank>adrien.nayrat@brest-metropole-oceane.fr</A></DIV></DIV></BLOCKQUOTE></DIV></BLOCKQUOTE></DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>