blob: f30cf81f49579196370dc87838ad0c85d036b04f (
plain) (
tree)
|
|
{ lib, hostFQDN, emailCheck, openldap, ... }:
let
defaultPassiveInfo = {
filter = lib.attrsets.filterAttrs
(k: v: builtins.elem k ["service_description"] || builtins.substring 0 1 k == "_");
use = "external-passive-service";
freshness_threshold = "450";
retry_interval = "1";
servicegroups = "webstatus-resources";
host_name = hostFQDN;
};
in
{
resources = {
USER212 = "{{ .monitoring.quatresaisons.naemon_ldap }}";
};
activatedPlugins = [ "megaraid" "command" "postgresql" ];
service = [
{
passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-resources"; };
service_description = "No RAID device is degraded";
use = "local-service";
check_command = ["check_megaraid"];
}
{
passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-resources"; };
service_description = "LDAP is running";
use = "local-service";
check_command = [ "check_command_status" "${openldap}/bin/ldapwhoami -D uid=naemon,ou=services,dc=salle-s,dc=org -w $USER212$" "0" ""];
}
{
passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-resources"; };
service_description = "Postgresql is running";
use = "local-service";
check_command = [ "check_postgresql_database_count" "/run/postgresql" "5432" "3" ];
}
];
}
|