-{ lib, hostFQDN, emailCheck, ... }:
+{ lib, hostFQDN, emailCheck, openldap, ... }:
let
defaultPassiveInfo = {
filter = lib.attrsets.filterAttrs
};
in
{
- activatedPlugins = [ "megaraid" ];
+ resources = {
+ USER212 = "{{ .monitoring.quatresaisons.naemon_ldap }}";
+ };
+ activatedPlugins = [ "megaraid" "command" "postgresql" ];
service = [
{
passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-resources"; };
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" ];
+ }
];
}