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] [external_command] [debug] [1386] push execute [1732870197] 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[2024-11-29T09:49:57.770+01:00] [external_command] [info] [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ôte[2024-11-29T09:49:57.770+01:00] [external_command] [debug] [1386] External command id: 160[2024-11-29T09:49:57.770+01:00] [external_command] [debug] [1386] Command entry time: 1732870197[2024-11-29T09:49:57.770+01:00] [external_command] [debug] [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ôte[2024-11-29T09:49:57.770+01:00] [external_command] [error] [1386] unknown service: HTTP-Soap-Content-eng-e-com@ENG_XM001W9J_SRV_WIN_APP_PRD[2024-11-29T09:49:59.771+01:00] [notifications] [debug] [1386] This notifier problem has been acknowledged, so we won't send notifications.[2024-11-29T09:50:04.776+01:00] [notifications] [debug] [1386] This notifier is not configured to send a recovery notification[2024-11-29T09:50:04.776+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T09:50:14.779+01:00] [notifications] [debug] [1386] This notifier is not configured to send a recovery notification[2024-11-29T09:50:14.779+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T09:50:19.780+01:00] [notifications] [debug] [1386] This notifier is not configured to send a recovery notification[2024-11-29T09:50:19.780+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T09:50:24.782+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T09:50:24.782+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0

 

CASE 2:

echo  "[`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

 

[2024-11-29T10:01:59.182+01:00] [external_command] [debug] [1386] push execute [1732870919] SEND_CUSTOM_HOST_NOTIFICATION;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] [external_command] [info] [1386] EXTERNAL COMMAND: SEND_CUSTOM_HOST_NOTIFICATION;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] [external_command] [debug] [1386] External command id: 159[2024-11-29T10:02:00.049+01:00] [external_command] [debug] [1386] Command entry time: 1732870919[2024-11-29T10:02:00.049+01:00] [external_command] [debug] [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] [external_command] [error] [1386] unknown host: ENG_XM001W9J_SRV_WIN_APP_PRD[2024-11-29T10:02:04.051+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T10:02:04.051+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:09.052+01:00] [notifications] [debug] [1386] No notification has been sent to announce a problem. So no recovery notification will be sent[2024-11-29T10:02:09.052+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:14.054+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T10:02:14.054+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:14.054+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T10:02:14.054+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:19.057+01:00] [notifications] [debug] [1386] This notifier is not configured to send a recovery notification[2024-11-29T10:02:19.057+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:19.057+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T10:02:19.057+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T10:02:19.057+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0

 

CASE 3:

echo  "[`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

 

[2024-11-29T10:02:24.059+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T10:02:24.059+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:26.830+01:00] [external_command] [debug] [1386] push execute [1732870946] SEND_CUSTOM_HOST_NOTIFICATION;localhost;1;Auteur;Ceci est un test de notification de hôte[2024-11-29T10:02:27.060+01:00] [external_command] [info] [1386] EXTERNAL COMMAND: SEND_CUSTOM_HOST_NOTIFICATION;localhost;1;Auteur;Ceci est un test de notification de hôte[2024-11-29T10:02:27.060+01:00] [external_command] [debug] [1386] External command id: 159[2024-11-29T10:02:27.060+01:00] [external_command] [debug] [1386] Command entry time: 1732870946[2024-11-29T10:02:27.060+01:00] [external_command] [debug] [1386] Command arguments: localhost;1;Auteur;Ceci est un test de notification de hôte[2024-11-29T10:02:27.060+01:00] [external_command] [error] [1386] unknown host: localhost[2024-11-29T10:02:29.062+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T10:02:29.062+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:29.062+01:00] [notifications] [debug] [1386] This notifier is not configured to send a recovery notification[2024-11-29T10:02:29.062+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:29.062+01:00] [notifications] [debug] [1386] This notifier is not configured to send a recovery notification[2024-11-29T10:02:29.062+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:29.062+01:00] [events] [info] [1386] SERVICE ALERT: CENT_XM001XJL_MBI;Ntp;OK;HARD;1;OK: Time offset 0 second(s): Local Time : 2024-11-29T10:02:27 (Europe/Paris)[2024-11-29T10:02:34.063+01:00] [notifications] [debug] [1386] This notifier is not configured to send a recovery notification[2024-11-29T10:02:34.063+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:39.065+01:00] [notifications] [debug] [1386] No notification has been sent to announce a problem. So no recovery notification will be sent[2024-11-29T10:02:39.065+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:44.067+01:00] [notifications] [debug] [1386] Notifications are temporarily disabled for this notifier, so we won't send one out.[2024-11-29T10:02:44.067+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0[2024-11-29T10:02:49.068+01:00] [notifications] [debug] [1386] This notifier is not configured to send a recovery notification[2024-11-29T10:02:49.068+01:00] [notifications] [trace] [1386]  _notification_number _is_notification_viable_recovery: 0 => 0

 

​​​​​​​Thanks in advance

Be the first to reply!