ソースを参照

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 年 前
コミット
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) {
 	} else if (status == STATE_CRITICAL) {
 		printf("QUERY %s: ", _("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");
 	printf("\n");
 
 
 	return status;
 	return status;