Skip to main content
Solved

notifications teams

  • 15 June 2022
  • 6 replies
  • 606 views

hello,

 

 

I have implemented the open source version of Centreon 22.04. I'm trying to set up notifications via Microsoft Teams but unfortunately it doesn't work.

 

I applied the procedure https://www.centreon.com/blog/envoyez-vos-notifications-centreon-dans-vos-salons-microsoft-teams-en-toute-simplicite/ .
Email notifications work fine. If on the user I replace the TEAMS notification by EMAIL it works. On the other hand for a TEAMS notification nothing happens; I don't see any log relating to the attempt to send, and on the internal firewall I don't see any packets going out so I assume that Centreon is not sending this notification.

 

I tried this command with ssh /usr/lib/centreon/plugins/centreon_notification_teams.pl --plugin=notification::microsoft::office365::teams::plugin --mode=alert --custommode=webhookapi --teams-webhook=https:hMON_WEBOOK] --notification-type='RECOVERY' host-name='posteAF' --service-state='UP'  --date='14-06-2022' --action-links --centreon-url=oURL_CENTREON]

mURL_CENTREON] → l’url of my server centreon

It works correctly and I receive my notification on teams.
Do you have any ideas, advice or experience on this kind of malfunction

?

 

regards

A.FAUVIN

 

 

6 replies

Userlevel 5
Badge +11

Hi @FAUVIN , Please ask your problem in English. This will help all other non-french speaking users who have the same issue to benefit from the solutions that will be proposed. Thank you for your understanding 😊

Userlevel 4
Badge +10

Hi !

Notifications are sent by centreon-engine, so can you try to execute notification command line with centreon-engine user (su - centreon-engine -c “XXX”) to check if there are no right issues.

you can also check centreon-engine logs to check notifications information in /var/log/centreon-engine/centengine.log

Badge +1

Hi @kduret ,

Thank you for your reply.

I tested with success the commande su - centreon-engine -c “XXX”, I have a notification in my Teams.

But I don’t have information about notification in the file /var/log/centreon-engine/centengine.log; I have juste only the information that my host is down ( HOST ALERT: posteAF;DOWN;SOFT;1;CRITICAL - 10.0.0.76: rta nan, lost 100%);

 

 

Userlevel 4
Badge +10

The log you have paste is a SOFT state 

Notifications are only sent when the state is HARD

 

If yopu have some HARD state in logs, but no notifications, you have probably a mistake in notification configuration which is not necessarily related to teams.

You should check the notification parameters in contact form and host/service forms.

Badge +1

I found the solution.

 

I did not have a log concerning the notifications in /var/log/centreon-engine/centengine.log, for this it is necessary to modify the value of the parameter log_level_notifications = info (default err) in configuration file /etc/centreon-engine/centengine.cfg; warningthis parameter changes each time the collector is updated. A restart of the centreon engine service is necessary after this modification (service centengine reload).

 

For Teams problem, my mistake was that I forgot to fill in the adress field 1 (address1) in section configuration/users/contact users/ [My user Teams] / Additional information.

Badge +1

 

Hi. @FAUVIN  I don't know if you're still around. But I wanted to follow your method to test sending notifications with the command on my centreon server:

/usr/lib/centreon/plugins/centreon_notification_teams.pl --plugin=notification::microsoft::office365::teams::plugin --mode=alert --custommode=webhookapi --teams-webhook=[URL_WEBHOOK] --notification-type='RECOVERY' host-name='posteAF' --service-state='UP'  --date='14-06-2022' --action-links --centreon-url=[URL_CENTREON]
Use of uninitialized value in concatenation (.) or string at /usr/lib/centreon/plugins/centreon_notification_teams.pl line 9512.
Use of uninitialized value in concatenation (.) or string at /usr/lib/centreon/plugins/centreon_notification_teams.pl line 9512.
Use of uninitialized value in concatenation (.) or string at /usr/lib/centreon/plugins/centreon_notification_teams.pl line 9569.
Use of uninitialized value in concatenation (.) or string at /usr/lib/centreon/plugins/centreon_notification_teams.pl line 9569.
UNKNOWN: 500 Can't connect to *******.webhook.office.com:443 (certificate verify failed)

But I have this message: I don't know if anyone else has had this certificate problem?

UNKNOWN: 500 Can't connect to *******.webhook.office.com:443 (certificate verify failed)

Reply