+ if ($environment == "production") {
+ $monitored_key = 3
+ @profile::monitoring::local_service { "Last redis report is less than 2 hours old":
+ local => {
+ check_command => "check_date!redis-cli -s $redis_host GET /cryptoportfolio/$monitored_key/latest/date!2"
+ }
+ }
+
+ @profile::monitoring::local_service { "Last bot report is less than one week old":
+ sudos => {
+ "naemon-cryptoportfolio-bot" => "naemon ALL=($user) NOPASSWD: /usr/bin/find $cf_bot_app_reports -mindepth 1 -maxdepth 1 -printf %T@?n",
+ },
+ local => {
+ check_command => "check_last_file_date!$cf_bot_app_reports!168!$user",
+ },
+ }
+ }
+