Hello everybody,

I want use 123-SMS to sent notification. I want use HTTP request, so i write a "bash" script. When i run my script from shell (with user shinken) it's ok, i receive a sms.
To use for notification i define this command :
Code:
## Notify Service by SMS (123-SMS)
# You need both reactionner_tag and module_type in most cases!
define command {
  command_name    notify-service-by-123-sms-http
  command_line    /opt/envoi_sms_123sms.sh $CONTACTPAGER$ $NOTIFICATIONTYPE$ $SERVICEDESC$ $HOSTNAME$ $SERVICESTATE$
}

## Notify host by SMS (123-SMS)
# You need both reactionner_tag and module_type in most cases!
define command {
  command_name    notify-host-by-123-sms-http
  command_line    /opt/envoi_sms_123sms.sh $CONTACTPAGER$ $NOTIFICATIONTYPE$ $SERVICEDESC$ $HOSTNAME$ $SERVICESTATE$
}
I define a contact with this command
Code:
 
define contact{
  contact_name          alain
  alias              Alain
  host_notifications_enabled   1
  service_notifications_enabled  1
  service_notification_period   24x7
  host_notification_period    24x7
  service_notification_options  w,u,c,r
  host_notification_options    d,u,r
#  service_notification_commands  notify-service-by-123-sms
#  host_notification_commands   notify-host-by-123-sms
  service_notification_commands  notify-service-by-123-sms-http
  host_notification_commands   notify-host-by-123-sms-http
  service_notification_commands  notify-service-by-email
  host_notification_commands   notify-host-by-email

  email              toto.titi@me.net
  pager              0123456789
  can_submit_commands       1
  is_admin
}            1
My script /opt/envoi_sms_123sms.sh
Code:
#!/bin/bash

# en parametre : numero_de_tel, type, host , service, etat

date > ~/datesms

NOTIFICATIONTYPE=$2
HOSTALIAS=$3
SERVICEDESC=$4
SERVICESTATE=$5
textesms="**"$NOTIFICATIONTYPE" alerte - "$HOSTALIAS"/"$SERVICEDESC" is "$SERVICESTATE" **"
wget -o ~/logenvoisms -O ~/reponse "http://www.123-SMS.net/http.php?email=toto.titi@me.net&pass=********&numero=$1&message=$textesms

exit 0
I receive email but no sms. I don't find file "datesms" in /home/shinken ou /root.

It's possible to run sh script for notification ?

Best regard's