Initial prometheus config
Also did provision config for grafana, could be done directly but went through skynet.grafana config
This commit is contained in:
parent
50abdb90ab
commit
183f5a0e7d
4 changed files with 137 additions and 0 deletions
|
@ -29,6 +29,10 @@ in {
|
|||
|
||||
# every server will need the config to backup to
|
||||
../applications/restic.nix
|
||||
|
||||
# every server will be monitored for grafana
|
||||
../applications/prometheus.nix
|
||||
#TODO: make sure no additional config needed for exporters ?
|
||||
];
|
||||
|
||||
options.skynet = {
|
||||
|
|
|
@ -10,6 +10,7 @@ Notes:
|
|||
*/
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
nodes,
|
||||
...
|
||||
|
@ -26,6 +27,7 @@ Notes:
|
|||
in {
|
||||
imports = [
|
||||
../applications/grafana.nix
|
||||
../applications/prometheus.nix
|
||||
];
|
||||
|
||||
deployment = {
|
||||
|
@ -50,6 +52,32 @@ in {
|
|||
sudo_groups = groups;
|
||||
};
|
||||
|
||||
services.skynet.prometheus.server = {
|
||||
host = {
|
||||
ip = ip_pub;
|
||||
name = name;
|
||||
};
|
||||
|
||||
port = 9001;
|
||||
|
||||
servers = [
|
||||
"agentjones"
|
||||
"cadie"
|
||||
"earth"
|
||||
"galatea"
|
||||
"gir"
|
||||
"glados"
|
||||
"kitt"
|
||||
"marvin"
|
||||
"neuromancer"
|
||||
"optimus"
|
||||
"skynet"
|
||||
"vendetta"
|
||||
"vigil"
|
||||
"wheatly"
|
||||
];
|
||||
};
|
||||
|
||||
services.skynet.grafana = {
|
||||
enable = true;
|
||||
|
||||
|
@ -57,6 +85,12 @@ in {
|
|||
ip = ip_pub;
|
||||
name = name;
|
||||
};
|
||||
|
||||
# maybe just do provision config directly ?
|
||||
datasource = {
|
||||
name = "Prometheus";
|
||||
url = "localhost:${toString config.services.prometheus.port}";
|
||||
};
|
||||
};
|
||||
|
||||
skynet_dns.records = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue