description = "Eban credentials for webhook";
type = submodule {
options = {
+ user = mkOption { type = str; description = "User"; };
password = mkOption { type = str; description = "Password"; };
};
};
commonConfig = {
dilion = {
processWarn = "250"; processAlert = "400";
- loadWarn = "8.0"; loadAlert = "10.0";
+ loadWarn = "1.0"; loadAlert = "1.2";
interface = "eth0";
};
eldiron = {
processWarn = "250"; processAlert = "400";
- loadWarn = "8.0"; loadAlert = "10.0";
+ loadWarn = "1.0"; loadAlert = "1.2";
interface = "eth0";
};
backup-2 = {
};
quatresaisons = {
processWarn = "250"; processAlert = "400";
- loadWarn = "8.0"; loadAlert = "10.0";
+ loadWarn = "1.0"; loadAlert = "1.2";
interface = "eth0";
};
};
config.myEnv.monitoring.ovh_sms.consumer_key
config.myEnv.monitoring.ovh_sms.account
]}
- $USER210$=${config.myEnv.monitoring.eban.password}
+ $USER210$=${config.myEnv.monitoring.eban.user}
+ $USER211$=${config.myEnv.monitoring.eban.password}
'';
objectDefs = toObjects commonObjects
+ toObjects hostObjects
, interface ? "eth0"
, processWarn ? "250"
, processAlert ? "400"
-, loadWarn ? "8.0"
+, loadWarn ? "0.9"
, load5Warn ? loadWarn
, load15Warn ? load5Warn
-, loadAlert ? "10.0"
+, loadAlert ? "1.0"
, load5Alert ? loadAlert
, load15Alert ? load5Alert
, mdadm
check_imap_connection = "$USER2$/check_imap_connection -u \"$USER204$\" -p \"$USER205$\" -H \"imap.immae.eu:143\"";
check_local_disk = "$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$";
check_local_procs = "$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$";
- check_local_load = "$USER1$/check_load -w $ARG1$ -c $ARG2$";
+ check_local_load = "$USER1$/check_load -r -w $ARG1$ -c $ARG2$";
check_local_swap = "$USER1$/check_swap -n ok -w $ARG1$ -c $ARG2$";
check_local_bandwidth = "$USER2$/check_bandwidth -i=$ARG1$ -w $ARG2$ -c $ARG3$";
check_memory = "$USER2$/check_mem.sh -w $ARG1$ -c $ARG2$";
# $OVE is to force naemon to run via shell instead of execve which fails here
notify-service-by-email = "ADMINEMAIL=\"$ADMINEMAIL$\" SERVICENOTIFICATIONID=\"$SERVICENOTIFICATIONID$\" SERVICEDESC=\"$SERVICEDESC$\" SERVICESTATE=\"$SERVICESTATE$\" SERVICEOUTPUT=\"$SERVICEOUTPUT$\" $USER2$/notify_by_email service \"$NOTIFICATIONTYPE$\" \"$HOSTALIAS$\" \"$LONGDATETIME$\" \"$CONTACTEMAIL$\" $OVE";
notify-by-slack = "HOST=\"$HOSTALIAS$\" SERVICESTATE=\"$SERVICESTATE$\" SERVICEDESC=\"$SERVICEDESC$\" SERVICEOUTPUT=\"$SERVICEOUTPUT$\" $USER2$/notify_by_slack \"$ARG1$\" \"$ARG2$\"";
- notify-host-eban-url = "STATUS_NAME=\"Server\" PASSWORD=\"$USER210$\" HOSTSTATE=\"$HOSTSTATE$\" $USER2$/notify_eban_url";
- notify-service-eban-url = "STATUS_NAME=\"$_SERVICEWEBSTATUS_NAME$\" PASSWORD=\"$USER210$\" SERVICESTATE=\"$SERVICESTATE$\" $USER2$/notify_eban_url";
+ notify-host-eban-url = "STATUS_NAME=\"Server\" USER=\"$USER210$\" PASSWORD=\"$USER211$\" HOSTSTATE=\"$HOSTSTATE$\" $USER2$/notify_eban_url";
+ notify-service-eban-url = "STATUS_NAME=\"$_SERVICEWEBSTATUS_NAME$\" USER=\"$USER210$\" PASSWORD=\"$USER211$\" SERVICESTATE=\"$SERVICESTATE$\" $USER2$/notify_eban_url";
notify-master = "$USER2$/send_nrdp.sh -u \"$USER200$\" -t \"$USER201$\" -H \"$HOSTADDRESS$\" -s \"$SERVICEDESC$\" -S \"$SERVICESTATEID$\" -o \"$SERVICEOUTPUT$ | $SERVICEPERFDATA$\"";
};
webstatus-backup = { alias = "Backup resources"; };
};
hostgroup = {
- webstatus-hosts = { alias = "Hosts"; };
+ webstatus-hosts = { alias = "Hosts"; };
};
contactgroup = {
admins = { alias = "Naemon Administrators"; };
retain_nonstatus_information = "1";
retain_status_information = "1";
retry_interval = "2";
+ _webstatus_namespace = "immae";
};
local-service = {
use = "generic-service";
notification_interval = "120";
notification_options = "d,u,r,f";
retry_interval = "1";
+ _webstatus_namespace = "immae";
};
};
};
check_interval = "15";
servicegroups = "webstatus-resources";
+ _webstatus_namespace = "eban";
} // rest;
in
{
contact_groups = "null";
_webstatus_name = "Eban";
_webstatus_vhost = "status.eban.bzh";
+ _webstatus_namespace = "eban";
};
};
service = [
_webstatus_url = "https://git.eban.bzh/";
})
(serviceTemplate {
- service_description = "Eban Cloud is up and running";
- check_command = ["check_https" "cloud.eban.bzh" "/" "<title>"];
+ service_description = "Eban Bitwarden is up and running";
+ check_command = ["check_https" "bitwarden.eban.bzh" "/" "<title"];
- _webstatus_name = "Cloud";
- _webstatus_url = "https://cloud.eban.bzh/";
+ _webstatus_name = "Bitwarden";
+ _webstatus_url = "https://bitwarden.eban.bzh/";
})
];
}
use = "external-web-service";
contact_groups = "tiboqorl";
check_command = [ "check_https" "sc.groupe-cyllene.com" "/" "<title>Support Client Cyllene" ];
+ _webstatus_namespace = "tiboqorl";
}
{
use = "external-web-service";
contact_groups = "tiboqorl";
check_command = [ "check_https" "origny.tiboqorl.fr" "/" "<title>Home Assistant" ];
+ _webstatus_namespace = "tiboqorl";
}
] ++ to_resource to_backup_age nodes.eldiron.config.services.duplyBackup;
contact = {
notification_interval = "240";
retry_interval = "1";
servicegroups = "webstatus-resources";
+ _webstatus_namespace = "tiboqorl";
host_name = hostFQDN;
};
in
hostgroups = "webstatus-hosts";
_webstatus_name = "tiboqorl";
_webstatus_vhost = "status.immae.eu";
+ _webstatus_namespace = "tiboqorl";
};
};
service = [
use = "local-service";
check_command = [
"check_local_load"
- "3.0,3.0,3.0" # warn
- "4.0,4.0,4.0" # alert
+ "0.75,0.75,0.75" # warn
+ "1.0,1.0,1.0" # alert
];
}
{
#!/usr/bin/env bash
-PASS=$(echo "$PASSWORD" | base64 -d)
-
if [ "$SERVICESTATE" = "CRITICAL" -o "$SERVICESTATE" = "UNKNOWN" -o "$HOSTSTATE" = "DOWN" -o "$HOSTSTATE" = "UNREACHABLE" ]; then
- action=downAlert
-elif [ "$SERVICESTATE" = "OK" -o "$HOSTSTATE" = "UP" ]; then
- action=upAlert
-fi
-
-if [ -n "$action" ]; then
- curl -X GET -G --data-urlencode "service=$STATUS_NAME" --data-urlencode "mdp=$PASS" https://infra.eban.bzh/$action
+ MESSAGE="$STATUS_NAME seems down!"
+ curl -X GET -G --data-urlencode "user=$USER" --data-urlencode "pass=$PASSWORD" --data-urlencode "msg=$MESSAGE" https://smsapi.free-mobile.fr/sendmsg
fi
-Subproject commit 65b942ba13daa40fc45fa34d58676c213b5bad87
+Subproject commit e816753f9ffc851a6f1e35cfa267a03e2a0ad2aa