X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fmonitoring%2Fobjects_eban.nix;fp=modules%2Fprivate%2Fmonitoring%2Fobjects_eban.nix;h=659b0ec5eca7c0730e2f9e7b1ef74cec72cdedae;hp=0000000000000000000000000000000000000000;hb=2edbb2d889bd9d1787bc1745a75c1b6969d148ab;hpb=b4b5eadc29d2547e181ce60d735a4b943beb2a9a diff --git a/modules/private/monitoring/objects_eban.nix b/modules/private/monitoring/objects_eban.nix new file mode 100644 index 0000000..659b0ec --- /dev/null +++ b/modules/private/monitoring/objects_eban.nix @@ -0,0 +1,60 @@ +{ ... }: +let + serviceTemplate = rest: { + host_name = "eban.bzh"; + use = "external-web-service"; + contacts = "eban"; + contact_groups = "null"; + check_interval = "15"; + + servicegroups = "webstatus-resources"; + } // rest; +in +{ + contact = { + eban = { + use = "generic-contact"; + host_notification_commands = "notify-host-eban-url"; + service_notification_commands = "notify-service-eban-url"; + }; + }; + host = { + "eban.bzh" = { + alias = "eban.bzh"; + address = "eban.bzh"; + use = "linux-server"; + hostgroups = "webstatus-hosts"; + contacts = "eban"; + contact_groups = "null"; + _webstatus_name = "Eban"; + _webstatus_vhost = "status.eban.bzh"; + }; + }; + service = [ + (serviceTemplate { + service_description = "Eban website is up and running"; + check_command = ["check_https" "eban.bzh" "/" ""]; + _webstatus_name = "Main Website"; + _webstatus_url = "https://eban.bzh/"; + }) + (serviceTemplate { + service_description = "Eban blog is up and running"; + check_command = ["check_https" "blog.eban.bzh" "/" "<title>"]; + _webstatus_name = "Blog"; + _webstatus_url = "https://blog.eban.bzh/"; + }) + (serviceTemplate { + service_description = "Eban gitea is up and running"; + check_command = ["check_https" "git.eban.bzh" "/" "<title>"]; + _webstatus_name = "Git"; + _webstatus_url = "https://git.eban.bzh/"; + }) + (serviceTemplate { + service_description = "Eban Cloud is up and running"; + check_command = ["check_https" "cloud.eban.bzh" "/" "<title>"]; + + _webstatus_name = "Cloud"; + _webstatus_url = "https://cloud.eban.bzh/"; + }) + ]; +}