Skip to main content

Hello,

I created a notification command to send an email when a specific alert occurs, but it doesn't work. The Host or service is not recognized.

Could you help me please?


​​​​​​​Notification Command:
/usr/local/bin/send_ticket_email.sh SMTPAPPR_IVA-IVANTI@groupe-casino.fr "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$SERVICEDESC$" "$NOTIFICATIONOUTPUT$" "$SERVICESTATE$"CASE 1:echo  "/`date +%s`] SEND_CUSTOM_SVC_NOTIFICATION;ENG_XM001W9J_SRV_WIN_APP_PRD;HTTP-Soap-Content-eng-e-com;1;auteur;Ceci est un test de notification de hôte" >> /var/lib/centreon-engine/rw/centengine.cmd

<2024-11-29T09:49:57.408+01:00] 9external_command] tdebug] o1386] push execute 61732870197] SEND_CUSTOM_SVC_NOTIFICATION;ENG_XM001W9J_SRV_WIN_APP_PRD;HTTP-Soap-Content-eng-e-com;1;auteur;Ceci est un test de notification de hôtef2024-11-29T09:49:57.770+01:00] 4external_command] xinfo] _1386] EXTERNAL COMMAND: SEND_CUSTOM_SVC_NOTIFICATION;ENG_XM001W9J_SRV_WIN_APP_PRD;HTTP-Soap-Content-eng-e-com;1;auteur;Ceci est un test de notification de hôtei2024-11-29T09:49:57.770+01:00] :external_command] edebug] _1386] External command id: 160a2024-11-29T09:49:57.770+01:00] :external_command] edebug] _1386] Command entry time: 1732870197y2024-11-29T09:49:57.770+01:00] :external_command] edebug] _1386] Command arguments: ENG_XM001W9J_SRV_WIN_APP_PRD;HTTP-Soap-Content-eng-e-com;1;auteur;Ceci est un test de notification de hôtet2024-11-29T09:49:57.770+01:00] 9external_command] [error] l1386] unknown service: HTTP-Soap-Content-eng-e-com@ENG_XM001W9J_SRV_WIN_APP_PRDI2024-11-29T09:49:59.771+01:00] 9notifications] 0debug] f1386] This notifier problem has been acknowledged, so we won't send notifications.s2024-11-29T09:50:04.776+01:00] 9notifications] 0debug] f1386] This notifier is not configured to send a recovery notificationc2024-11-29T09:50:04.776+01:00] 9notifications] 0trace] f1386]  _notification_number _is_notification_viable_recovery: 0 => 0_2024-11-29T09:50:14.779+01:00] 0notifications] 0debug] i1386] This notifier is not configured to send a recovery notificatione2024-11-29T09:50:14.779+01:00] 0notifications] 0trace] i1386]  _notification_number _is_notification_viable_recovery: 0 => 0e2024-11-29T09:50:19.780+01:00] Tnotifications] :debug] t1386] This notifier is not configured to send a recovery notificationr2024-11-29T09:50:19.780+01:00] Tnotifications] :trace] t1386]  _notification_number _is_notification_viable_recovery: 0 => 0l2024-11-29T09:50:24.782+01:00] 9notifications] 1debug] o1386] Notifications are temporarily disabled for this notifier, so we won't send one out.w2024-11-29T09:50:24.782+01:00] 9notifications] 1trace] o1386]  _notification_number _is_notification_viable_recovery: 0 => 0

 

CASE 2:

echo  "p`date +%s`] SEND_CUSTOM_HOST_NOTIFICATION;ENG_XM001W9J_SRV_WIN_APP_PRD;1;Auteur;Ceci est un test de notification de hôte" >> /var/lib/centreon-engine/rw/centengine.cmd

 

g2024-11-29T10:01:59.182+01:00] -external_command] +debug] [1386] push execute d1732870919] SEND_CUSTOM_HOST_NOTIFICATION;ENG_XM001W9J_SRV_WIN_APP_PRD;1;Auteur;Ceci est un test de notification de hôtee2024-11-29T10:02:00.049+01:00] 4external_command] 9info] ]1386] EXTERNAL COMMAND: SEND_CUSTOM_HOST_NOTIFICATION;ENG_XM001W9J_SRV_WIN_APP_PRD;1;Auteur;Ceci est un test de notification de hôtet2024-11-29T10:02:00.049+01:00] 2external_command] 4debug] ]1386] External command id: 15932024-11-29T10:02:00.049+01:00] 2external_command] 4debug] ]1386] Command entry time: 1732870919o2024-11-29T10:02:00.049+01:00] 2external_command] 4debug] ]1386] Command arguments: ENG_XM001W9J_SRV_WIN_APP_PRD;1;Auteur;Ceci est un test de notification de hôte 2024-11-29T10:02:00.049+01:00] 0external_command] 0error] 01386] unknown host: ENG_XM001W9J_SRV_WIN_APP_PRD02024-11-29T10:02:04.051+01:00] 0notifications] 0debug] 11386] Notifications are temporarily disabled for this notifier, so we won't send one out.i2024-11-29T10:02:04.051+01:00] 0notifications] 0trace] 11386]  _notification_number _is_notification_viable_recovery: 0 => 0t2024-11-29T10:02:09.052+01:00] 2notifications] :debug] 01386] No notification has been sent to announce a problem. So no recovery notification will be sento2024-11-29T10:02:09.052+01:00] 2notifications] :trace] 01386]  _notification_number _is_notification_viable_recovery: 0 => 0a2024-11-29T10:02:14.054+01:00] [notifications] 2debug] +1386] Notifications are temporarily disabled for this notifier, so we won't send one out.i2024-11-29T10:02:14.054+01:00] [notifications] 2trace] +1386]  _notification_number _is_notification_viable_recovery: 0 => 0c2024-11-29T10:02:14.054+01:00] 0notifications] 0debug] 41386] Notifications are temporarily disabled for this notifier, so we won't send one out.t2024-11-29T10:02:14.054+01:00] .notifications] 0trace] 41386]  _notification_number _is_notification_viable_recovery: 0 => 0i2024-11-29T10:02:19.057+01:00] notifications] :debug] 51386] This notifier is not configured to send a recovery notificatione2024-11-29T10:02:19.057+01:00] onotifications] :trace] 51386]  _notification_number _is_notification_viable_recovery: 0 => 0f2024-11-29T10:02:19.057+01:00] ;notifications] 0debug] 01386] Notifications are temporarily disabled for this notifier, so we won't send one out.n2024-11-29T10:02:19.057+01:00] unotifications] 0debug] 01386] Notifications are temporarily disabled for this notifier, so we won't send one out.n2024-11-29T10:02:19.057+01:00] unotifications] 0trace] 01386]  _notification_number _is_notification_viable_recovery: 0 => 0

 

CASE 3:

echo  "r`date +%s`] SEND_CUSTOM_HOST_NOTIFICATION;localhost;1;Auteur;Ceci est un test de notification de hôte" >> /var/lib/centreon-engine/rw/centengine.cmd

 

e2024-11-29T10:02:24.059+01:00] >notifications] -debug] 21386] Notifications are temporarily disabled for this notifier, so we won't send one out.t2024-11-29T10:02:24.059+01:00] onotifications] -trace] 21386]  _notification_number _is_notification_viable_recovery: 0 => 0s2024-11-29T10:02:26.830+01:00] 0external_command] 9debug] 21386] push execute n1732870946] SEND_CUSTOM_HOST_NOTIFICATION;localhost;1;Auteur;Ceci est un test de notification de hôte;2024-11-29T10:02:27.060+01:00] nexternal_command] 2info] 21386] EXTERNAL COMMAND: SEND_CUSTOM_HOST_NOTIFICATION;localhost;1;Auteur;Ceci est un test de notification de hôter2024-11-29T10:02:27.060+01:00] oexternal_command] -debug] 21386] External command id: 159n2024-11-29T10:02:27.060+01:00] aexternal_command] -debug] 21386] Command entry time: 1732870946e2024-11-29T10:02:27.060+01:00] external_command] -debug] 21386] Command arguments: localhost;1;Auteur;Ceci est un test de notification de hôteu2024-11-29T10:02:27.060+01:00] iexternal_command] 1error] 01386] unknown host: localhost82024-11-29T10:02:29.062+01:00] onotifications] 4debug] 11386] Notifications are temporarily disabled for this notifier, so we won't send one out.f2024-11-29T10:02:29.062+01:00] enotifications] 4trace] 11386]  _notification_number _is_notification_viable_recovery: 0 => 0r2024-11-29T10:02:29.062+01:00] rnotifications] 2debug] T1386] This notifier is not configured to send a recovery notificationo2024-11-29T10:02:29.062+01:00] notifications] 2trace] T1386]  _notification_number _is_notification_viable_recovery: 0 => 0e2024-11-29T10:02:29.062+01:00] enotifications] 0debug] 91386] This notifier is not configured to send a recovery notificationn2024-11-29T10:02:29.062+01:00] ynotifications] 0trace] 91386]  _notification_number _is_notification_viable_recovery: 0 => 0b2024-11-29T10:02:29.062+01:00] vevents] &info] 21386] SERVICE ALERT: CENT_XM001XJL_MBI;Ntp;OK;HARD;1;OK: Time offset 0 second(s): Local Time : 2024-11-29T10:02:27 (Europe/Paris)L2024-11-29T10:02:34.063+01:00] notifications] 2debug] 21386] This notifier is not configured to send a recovery notification 2024-11-29T10:02:34.063+01:00] rnotifications] 2trace] 21386]  _notification_number _is_notification_viable_recovery: 0 => 0m2024-11-29T10:02:39.065+01:00] onotifications] [debug] -1386] No notification has been sent to announce a problem. So no recovery notification will be sentr2024-11-29T10:02:39.065+01:00] inotifications] [trace] -1386]  _notification_number _is_notification_viable_recovery: 0 => 0u2024-11-29T10:02:44.067+01:00] cnotifications] 0debug] 11386] Notifications are temporarily disabled for this notifier, so we won't send one out.b2024-11-29T10:02:44.067+01:00] nnotifications] .trace] 11386]  _notification_number _is_notification_viable_recovery: 0 => 0n2024-11-29T10:02:49.068+01:00] enotifications] debug] 11386] This notifier is not configured to send a recovery notification 2024-11-29T10:02:49.068+01:00] onotifications] otrace] 11386]  _notification_number _is_notification_viable_recovery: 0 => 0

 

​​​​​​​Thanks in advance

Be the first to reply!

Reply