Closed AEGEGE closed 3 months ago
Hello!
It's not supported now, could you elaborate your usecase for having multiple vmalerts addresses?
With --vmalert.proxyURL=http://1.1.1.1:8880,http://1.1.1.2:8880
, do you want the results to be merged or proxied? If merged, how to deal with duplicated resources like rules.
Multi-node deployment is mainly to avoid being unable to handle alarms when vmalert on 1.1.1.1 fails. At present, no large number of repeated alarms have been found in the test. Only time inconsistencies will occur occasionally. We hope this can be considered in subsequent development.
Multi-node deployment is mainly to avoid being unable to handle alarms when vmalert on 1.1.1.1 fails.
In this case, you should add a proxy like nginx or vmauth with http://1.1.1.1:8880
and http://1.1.1.2:8880
as servers, and use the proxy address in vmselect.
At present, no large number of repeated alarms have been found in the test. Only time inconsistencies will occur occasionally.
I don't quite understand.
So if you have --vmalert.proxyURL=http://1.1.1.1:8880,http://1.1.1.2:8880
, when both of them are healthy, should the result be any one of them or merge them. If it can be any one of them, you can add a proxy like above; if you want to merge them, there will be conflicted issues.
There is one more use-case for setting multiple URLs for vmalert.proxyURL
: alerts for different tenants.
Currently, in order to run alerts for each tenant separately with OSS version of vmalert it is required to set up vmalert per tenant. Since vmalert.proxyURL
accepts only one value it is not possible to view alerts of different tenants.
When using enterprise version of vmalert which has multitenancy support it is possible to view alerts for all tenants at once, but not possible to narrow the scope to see only alerts of specific tenant.
Multi-node deployment is mainly to avoid being unable to handle alarms when vmalert on 1.1.1.1 fails.
In this case, you should add a proxy like nginx or vmauth with
http://1.1.1.1:8880
andhttp://1.1.1.2:8880
as servers, and use the proxy address in vmselect.At present, no large number of repeated alarms have been found in the test. Only time inconsistencies will occur occasionally.
I don't quite understand. So if you have
--vmalert.proxyURL=http://1.1.1.1:8880,http://1.1.1.2:8880
, when both of them are healthy, should the result be any one of them or merge them. If it can be any one of them, you can add a proxy like above; if you want to merge them, there will be conflicted issues.Multi-node deployment is mainly to avoid being unable to handle alarms when vmalert on 1.1.1.1 fails.
In this case, you should add a proxy like nginx or vmauth with
http://1.1.1.1:8880
andhttp://1.1.1.2:8880
as servers, and use the proxy address in vmselect.At present, no large number of repeated alarms have been found in the test. Only time inconsistencies will occur occasionally.
I don't quite understand. So if you have
--vmalert.proxyURL=http://1.1.1.1:8880,http://1.1.1.2:8880
, when both of them are healthy, should the result be any one of them or merge them. If it can be any one of them, you can add a proxy like above; if you want to merge them, there will be conflicted issues.
Yes, but in order to achieve high availability, at least two nodes are required. A single node is unreliable. You need to use a platform like kubernetes.
There is one more use-case for setting multiple URLs for
vmalert.proxyURL
: alerts for different tenants.Currently, in order to run alerts for each tenant separately with OSS version of vmalert it is required to set up vmalert per tenant. Since
vmalert.proxyURL
accepts only one value it is not possible to view alerts of different tenants.When using enterprise version of vmalert which has multitenancy support it is possible to view alerts for all tenants at once, but not possible to narrow the scope to see only alerts of specific tenant.
Not trying to achieve multi-tenancy, just for high availability
I think the question is answered. And @AEGEGE is actually looking for HA solution in case single vmselect
goes down. I don't think it should be handle within vmalert. You could try external HA setup as previously mentioned. Also refer to our member blog post of HA: https://medium.com/@haleygo/how-to-set-up-ha-victoriametrics-b0e047b5f63e
Is your question request related to a specific component?
vmselect,vmalert
Describe the question in detail
For example: --vmalert.proxyURL=http://1.1.1.1:8880,http://1.1.1.2:8880
Troubleshooting docs