Solved

Notification command signal

  • 25 November 2022
  • 5 replies
  • 157 views

Badge +3

Hello,

i tried to send notification command with SIGNAL-CLI. It doesn’t work, messages are never received on Signal. So i activated debug and check the log :

[1669374178] [936] Processed notification command: /usr/local/sbin/signal-cli/bin/signal-cli -a +3374996xxxx send -m "PROBLEM xxxxxx Check_Maintenance_xxx CRITICAL Des xxx sont en maintenance Fri Nov 25 12:02:58 CET 2022" +3367305xxxx
[1669374178] [936] Making callbacks (type 9)...
[1669374178] [936] Callback #1 (type 9) return (code = 0)

 

I opened a session on centreon-engine with su - centreon-engine and launch the command :

/usr/local/sbin/signal-cli/bin/signal-cli -a +3374996xxxx send -m "PROBLEM xxxxxx Check_Maintenance_xxx CRITICAL Des xxx sont en maintenance Fri Nov 25 12:02:58 CET 2022" +3367305xxxx 

and it works ! I really don't understand why it works manually, and not directly via the centreon engine. I use Centreon 22.10.1.

Thanks for your help.

icon

Best answer by TeXmeX 27 February 2023, 09:03

View original

5 replies

Userlevel 4
Badge +13

🤔

 

@TeXmeX  can you share your Configuration under “Configuration  >  Commands  >  Notifications”

Badge +3

🤔

 

@TeXmeX  can you share your Configuration under “Configuration  >  Commands  >  Notifications”

 

/usr/local/sbin/signal-cli/bin/signal-cli -a +3374996xxxx send -m "$NOTIFICATIONTYPE$ $HOSTNAME$ $SERVICEDESC$ $SERVICESTATE$ $SERVICEOUTPUT$ $LONGDATETIME$" $CONTACTPAGER$

 

This command works since when I run it exactly as in the debug log, it works.

Badge +3

 

Hello, no my problem is not solved, I just say that the command works manually. How to have the return by the command in the logs? It would help me a lot. Thank you.

Badge +3

Hi,

Looking at the log below, can we conclude that the command was successful please ? I added in the command a log file to try to debug it, but the log stays empty. I remind you when I launch the command manually in the user context "centreon-engine" it works, but when it’s the centreon engine that executes the command itself, it does not work.

[1676648349] [9025] Processed notification command: /bin/sh -c '/usr/local/sbin/signal-cli/bin/signal-cli --log-file /tmp/LOG -a +3374996xxxx send -m "NORCA - Host PC-TEST-ALEX is DOWN - Info: CRITICAL - 192.168.x.xxx: rta nan, lost 100%" +336866xxxx'
[1676648349] [9025] Making callbacks (type 9)...
[1676648349] [9025] Callback #1 (type 9) return (code = 0)

Badge +3

 

Finally problem is solved, it was java version conflict because signal-cli relies on java runtime.

Reply