+ /* if the associated threshold has a missing message, then use custom
+ * message. FIXME: we do a threshold_search here and in uc_check_timeout
+ * (calling ut_check_interesting, but we really need to do this once */
+ if ( !ut_search_threshold(&vl, &th) &&
+ (th.missing_message != NULL) )
+ {
+ char msg[NOTIF_MAX_MSG_LEN];
+ char temp[NOTIF_MAX_MSG_LEN];
+
+ sstrncpy (msg, th.missing_message, sizeof (msg));
+ (void) ut_build_message (msg, NOTIF_MAX_MSG_LEN, th.missing_message,
+ &ds, 0, &vl, ce->values_gauge,
+ &n, &th);
+
+#define REPLACE_FIELD(t,v) \
+ if (subst_string (temp, sizeof (temp), msg, t, v) != NULL) \
+ sstrncpy (msg, temp, sizeof (msg));
+
+ char itoa_temp[NOTIF_MAX_MSG_LEN];
+#define ITOA(string,i) \
+ memset(string,0x00,sizeof(string)); \
+ snprintf(string, sizeof(string), "%i", i);
+
+ ITOA(itoa_temp, (int)(n.time - ce->last_update))
+ REPLACE_FIELD("%{missing}", itoa_temp)
+
+ (void) ssnprintf (n.message, sizeof (n.message),
+ "%s", msg);
+ }
+ else
+ {
+ ssnprintf (n.message, sizeof (n.message),
+ "%s has not been updated for %i seconds.", name,
+ (int) (n.time - ce->last_update));
+ }