[Nagiosplug-help] RE : check_nt counter with coma problem
NAYRAT Adrien
adrien.nayrat at brest-metropole-oceane.fr
Thu Jun 19 08:46:41 CEST 2008
Hi,
I use nsclient++.
I think it will be unchanged, as you can see, my printf returns this description : "octets/s"
But it is not the description, it is included in the name of counter.
-----Message d'origine-----
De : Anthony Montibello [mailto:amontibello at gmail.com]
Envoyé : jeudi 19 juin 2008 00:32
À : NAYRAT Adrien
Cc : nagiosplug-help at lists.sourceforge.net
Objet : Re: [Nagiosplug-help] check_nt counter with coma problem
Hi,
I am not sure what Windows Plugin you are using with Check_nt,
this may not be completly a problem with check_nt
But NC_NEt has a new update that deals with NON standard ASKII characters, (the problem you posed)
Email me direct and I will send you a test copy of it(if you want to try it), I need a little more testing before anouncing a release
Tony (Author of NC_NEt)
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
More information about the Help
mailing list