VictoriaMetrics: vmalert: doesn't restore the state of alert properly

Describe the bug It seems like vmalert doesn’t restore the state of alert between restarts.

To Reproduce I have remote write and read specified in helm chart:

      remote:
        write:
          url: "https://victoria-metrics.example.com/insert/0/prometheus"
        read:
          url: "https://victoria-metrics.example.com/select/0/prometheus"

When it starts up, I see that it was able to restore the state of alert:

"VictoriaMetrics/app/vmalert/alerting.go:439","msg":"alert \"TLAAdminDown\"(11235504160798675190) restored to state at 2020-10-29 00:37:20 +0000 UTC"}

But, in api/v1/alerts for vmalert I am seeing this:


        "id": "17739412673847745131",
        "name": "TLAAdminDown",
        "group_id": "17747172397439028248",
        "expression": "up{osfamily=\"debian\", snmp_module=\"ibm-imm\"} == 0",
        "state": "pending",
        "value": "0e+00",

Could it be that id of alert is not preserved for some reason and vmalert thinks it is a new alert?

Version 1.44

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17

Commits related to this issue

Most upvoted comments

@valyala Confirmed, works correctly now! Thank you!

Hi @sagor999! The fix was merged in commit https://github.com/VictoriaMetrics/VictoriaMetrics/pull/886/commits/08a89cf794e1c99c823ba7033edad634615d0087. You can verify it by building vmalert from sources. The change will be also included in the next release.

Hi @sagor999! Confirming the issue.