Просмотр исходного кода

check_mysql_query.c: Add performance data to return string

    Slight alteration to minimize code changes via awiddersheim in issue #1202 from M-P tracker. - SR
Spenser Reinhardt 12 лет назад
Родитель
Сommit
045d38a672
1 измененных файлов с 8 добавлено и 1 удалено
  1. 8 1
      plugins/check_mysql_query.c

+ 8 - 1
plugins/check_mysql_query.c

@@ -152,7 +152,14 @@ main (int argc, char **argv)
 	} else if (status == STATE_CRITICAL) {
 		printf("QUERY %s: ", _("CRITICAL"));
 	}
-	printf(_("'%s' returned %f"), sql_query, value);
+	printf(_("'%s' returned %f | %s"), sql_query, value,
+	 fperfdata("result", value, "",
+	 my_thresholds->warning?TRUE:FALSE, my_thresholds->warning?my_thresholds->warning->end:0,
+	 my_thresholds->critical?TRUE:FALSE, my_thresholds->critical?my_thresholds->critical->end:0,
+	 FALSE, 0,
+	 FALSE, 0)
+	);
+
 	printf("\n");
 
 	return status;