Kaynağa Gözat

20181120 src/nodes2prom.sml (keine timestamp mehr in die .prom Datei wg. node_exporter-0.16.0)

Altlast 6 yıl önce
ebeveyn
işleme
cab0d6b658
1 değiştirilmiş dosya ile 2 ekleme ve 3 silme
  1. 2 3
      src/nodes2prom.sml

+ 2 - 3
src/nodes2prom.sml

@@ -42,8 +42,7 @@ struct
 		   (ListFormat.fmt {init = "{", sep= ",", final = "}",
 				    fmt = fn (label, value) => label ^ "=\"" ^ (String.translate esc value) ^ "\""}
 				   labels) ^ " " ^
-		   scalar ^ " " ^
-		   (!timestamp) ^ newline
+		   scalar ^ newline
 		end
 
 	(* exnMessage from JSONUtil - slightly extended *)
@@ -271,7 +270,7 @@ struct
 			 case forward of SOME forward' => SOME ("forward", Real.toString(forward')) | NONE => NONE,
 			 case mgmt_tx of SOME mgmt_tx' => SOME ("mgmt_tx", Real.toString(mgmt_tx')) | NONE => NONE,
 			 case mgmt_rx of SOME mgmt_rx' => SOME ("mgmt_rx", Real.toString(mgmt_rx')) | NONE => NONE]
-		    fun item2prom (key, value) = (key, stats_prefix ^ key ^ "{hostname=\"" ^ hostname ^ "\",node_id=\"" ^ node_id ^ "\",branch=\"" ^ branch ^ "\",firmware=\"" ^ firmware ^ "\",model=\"" ^ model ^ "\"} " ^ value ^ " " ^ !timestamp ^ "\n")
+		    fun item2prom (key, value) = (key, stats_prefix ^ key ^ "{hostname=\"" ^ hostname ^ "\",node_id=\"" ^ node_id ^ "\",branch=\"" ^ branch ^ "\",firmware=\"" ^ firmware ^ "\",model=\"" ^ model ^ "\"} " ^ value ^ "\n")
 		in List.mapPartial (fn (SOME i) => SOME (item2prom i) | NONE => NONE) items
 		end