diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index 65c4e693adb4945cd0da4d6da15b963351fc32da..c7baa474215a9c4553657514fc280c12918710e6 100644 (file)
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
else if(utilization >= lvalue_list[1+offset] && return_code<STATE_WARNING)
return_code=STATE_WARNING;
else if(utilization >= lvalue_list[1+offset] && return_code<STATE_WARNING)
return_code=STATE_WARNING;
- asprintf(&output_message," (%lu min. %lu%)",lvalue_list[0+offset], utilization);
+ asprintf(&output_message," %lu%% (%lu min average)", utilization, lvalue_list[0+offset]);
asprintf(&temp_string,"%s%s",temp_string,output_message);
asprintf(&temp_string,"%s%s",temp_string,output_message);
- offset+=3; //move accross the array
+ offset+=3; //move across the array
}
if (strlen(temp_string)>10) {
// we had at least on loop
}
if (strlen(temp_string)>10) {
// we had at least on loop
int process_arguments(int argc, char **argv){
int c;
int process_arguments(int argc, char **argv){
int c;
-#ifdef HAVE_GETOPT_H
int option_index = 0;
static struct option long_options[] =
{
int option_index = 0;
static struct option long_options[] =
{
{"help", no_argument, 0,'h'},
{0,0,0,0}
};
{"help", no_argument, 0,'h'},
{0,0,0,0}
};
-#endif
/* no options were supplied */
if(argc<2) return ERROR;
/* no options were supplied */
if(argc<2) return ERROR;
}
while (1){
}
while (1){
-#ifdef HAVE_GETOPT_H
c = getopt_long(argc,argv,"+hVH:t:c:w:p:v:l:s:d:",long_options,&option_index);
c = getopt_long(argc,argv,"+hVH:t:c:w:p:v:l:s:d:",long_options,&option_index);
-#else
- c = getopt(argc,argv,"+hVH:t:c:w:p:v:l:s:d:");
-#endif
if (c==-1||c==EOF||c==1)
break;
if (c==-1||c==EOF||c==1)
break;
}
}
+ if (vars_to_check==CHECK_NONE)
+ return ERROR;
+
return OK;
}
void print_usage(void)
{
return OK;
}
void print_usage(void)
{
- printf("Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical] [-l params] [-d SHOWALL] [-t timeout]\n",progname);
+ printf("Usage: %s -H host -v variable [-p port] [-w warning] [-c critical] [-l params] [-d SHOWALL] [-t timeout]\n",progname);
}
}