<!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=447103407-19062008></SPAN><FONT face=Arial><FONT
color=#0000ff><FONT size=2>I<SPAN class=447103407-19062008> 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
class=447103407-19062008>strtok (value_list,
"&");</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=447103407-19062008></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=447103407-19062008>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 class=447103407-19062008><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>On Wed, Jun 18, 2008 at 8:58 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"><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">adrien.nayrat@brest-metropole-oceane.fr</A><BR><BR>-------------------------------------------------------------------------<BR>Check
out the new SourceForge.net Marketplace.<BR>It's the best place to buy or
sell services for<BR>just about anything Open Source.<BR><A
href="http://sourceforge.net/services/buy/index.php"
target=_blank>http://sourceforge.net/services/buy/index.php</A><BR>_______________________________________________<BR>Nagiosplug-help
mailing list<BR><A
href="mailto:Nagiosplug-help@lists.sourceforge.net">Nagiosplug-help@lists.sourceforge.net</A><BR><A
href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help"
target=_blank>https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</A><BR>:::
Please include plugins version (-v) and OS when reporting any issue.<BR>:::
Messages without supporting info will risk being sent to
/dev/null<BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>