cluster/services/consul: set agent HTTP API port
This commit is contained in:
parent
0888ecce1a
commit
52008b6f0a
1 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,8 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
links.consulAgent.protocol = "http";
|
||||||
|
|
||||||
services.consul = {
|
services.consul = {
|
||||||
enable = true;
|
enable = true;
|
||||||
webUi = true;
|
webUi = true;
|
||||||
|
@ -24,11 +26,14 @@ in
|
||||||
ports.serf_lan = hl.port;
|
ports.serf_lan = hl.port;
|
||||||
retry_join = map (hostName: hostLinks.${hostName}.consul.tuple) (cfg.otherNodes.agent hostName);
|
retry_join = map (hostName: hostLinks.${hostName}.consul.tuple) (cfg.otherNodes.agent hostName);
|
||||||
bootstrap_expect = builtins.length cfg.nodes.agent;
|
bootstrap_expect = builtins.length cfg.nodes.agent;
|
||||||
|
addresses.http = config.links.consulAgent.ipv4;
|
||||||
|
ports.http = config.links.consulAgent.port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.grafana-agent.settings.integrations.consul_exporter = {
|
services.grafana-agent.settings.integrations.consul_exporter = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
instance = hostName;
|
instance = hostName;
|
||||||
|
server = config.links.consulAgent.url;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue