[Nagiosplug-help] RE : check_nt counter with coma problem
Anthony Montibello
amontibello at gmail.com
Fri Jun 20 01:41:09 CEST 2008
THe counter name can be changed in the Windows Registry, However this should
be tested before implementing in production
TOny (Author of NC_Net)
On Thu, Jun 19, 2008 at 3:37 AM, NAYRAT Adrien <
adrien.nayrat at brest-metropole-oceane.fr> wrote:
> I found the problem.. The problem is in this function :
> strtok (value_list, "&");
>
> It replace the coma "," by a "&". Even if the coma is in the name of the
> counter.
>
> Why microsoft put coma in the name of the french counters!
>
>
> On Wed, Jun 18, 2008 at 8:58 AM, NAYRAT Adrien <
> adrien.nayrat at brest-metropole-oceane.fr> wrote:
>
>>
>> Hello,
>>
>> I have a problem with the check_nt plugin, with the counter variable.
>> When the name of the counter contain a coma "," check_nt use the text
>> after the coma as a description :
>> For example :
>> The counter is :
>> \Disque physique(_Total)\Lectures disque, octets/s
>>
>> My command line is :
>> ./check_nt -H hcu11 -p 1248 -v COUNTER -s "public" -l "\\Disque
>> physique(_Total)\\Lectures disque, octets/s"
>>
>> I modified the sources, and I had some printf:
>>
>>
>> Here ==>> printf ("\nvalue list : %s\n",value_list);
>> if (value_list == NULL)
>> output_message = strdup (_("No counter
>> specified"));
>> else
>> ........
>> else if ((counter_unit == NULL) && (description !=
>> NULL))
>> {
>> Here ==>> printf("\ncounter_unit %s,
>> description %s\n",counter_unit,description);
>> output_message = strdup (_("No unit
>> counter specified"));
>> }
>> if (allRight)
>> {.......
>>
>>
>> And the result of the command line is :
>> m9427:/usr/lib/nagios/plugins/libexec# ./check_nt -H hcu11 -p 1248
>> -v COUNTER -s "public" -l "\\Disque physique(_Total)\\Lectures disque,
>> octets/s"
>>
>> value list : \Disque physique(_Total)\Lectures disque, octets/s
>>
>> counter_unit (null), description octets/s
>> No unit counter specified
>>
>>
>> I also try with
>> ./check_nt -H hcu11 -p 1248 -v COUNTER -s "public" -l "\\Disque
>> physique(_Total)\\Lectures disque\, octets/s"
>> The result is the same.
>>
>>
>> I hope we will find a solution.
>> PS : Before this problem I have had problems with the accents "é" solved
>> by using a perl script :
>> #!/usr/bin/perl
>>
>> $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"`;
>> chomp $response2;
>> ($used) = ($response2);
>>
>> print "$response2\n";
>>
>>
>> Thanks you for your help, I'm a french user of nagios ;)
>>
>>
>> Adrien NAYRAT
>> Apprenti Ingénieur Réseaux et Télécommunications
>> DIT - Brest-Métropole-Océane
>> 6, Boulevard de l'Europe
>> Tel/fax 02.98.34.30.19
>> adrien.nayrat at brest-metropole-oceane.fr
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Nagiosplug-help mailing list
>> Nagiosplug-help at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>> ::: Please include plugins version (-v) and OS when reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20080619/0168a58e/attachment.html>
More information about the Help
mailing list