Why does Prometheus container exits after configure rule and restart

Ah, sorry for such a late reply. If you haven’t figured it out, I believe it has to do with the last line. It reads

d:wqescription: “[{{$labels.instance}}] of job [{{$labels.job}}] has been down for more than 1 minute.”

I think you want

description: “[{{$labels.instance}}] of job [{{$labels.job}}] has been down for more than 1 minute.”

Nitty Gritty

The problem lies with the extra :wq characters in there. Since YAML uses the colon : as a delimiter between keys and values, it actually saw a key called d which has an object as a value. That object has one key-value mapping of key wqescription and value “[{{$labels.instance}}] of job [{{$labels.job}}] has been down for more than 1 minute.” :grinning_face_with_smiling_eyes:

If I could guess, you use vim/neovim and you tried to save and quit with :wq, but you were still in INSERT mode. Make sure you get into NORMAL mode before run ex commands :grinning_face_with_smiling_eyes: (I’ve done this a lot myself :man_facepalming:)