소스 검색

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

Altlast 6 년 전
부모
커밋
cab0d6b658
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  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