[Nagiosplug-help] check_nt counter with coma problem

NAYRAT Adrien adrien.nayrat at brest-metropole-oceane.fr
Wed Jun 18 14:58:40 CEST 2008


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