Ad Widget

Collapse

zabbix can't pass argument to AlertScriptPath's script.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • laughman
    Junior Member
    • Mar 2010
    • 4

    #1

    zabbix can't pass argument to AlertScriptPath's script.

    hi
    i write sql/shell two script using database sms gateway for sms notificaction.
    i know that zabbix passes 3 argument(phone number,subject,message) to AlertScriptPath's script.

    ---------- sms_send.sql ----------
    Code:
    insert into column(phone_num,subject,message) values(&1,&2,&3);

    -----------sendsms.sh --------------
    Code:
    #!/bin/sh
    sqlplus -S user/passwd@SID << EOF
    @sms_send.sql $1 $2 $3
    commit;
    exit
    EOF
    echo " $1 , $2 ,$3 sms sent" >> /tmp/sms_send.log
    when i excute sendsms.sh in shell
    in example
    Code:
    $ ./sendsms.sh 01012345678 hello zabbix
    above shell command succeed sending sms.

    but in zabbix frontend fail send SMS.
    even though zabbix excute sendsms.sh script (execution history in /tmp/sms_send.log),
    zabbix seems that fail - pass argument to sms_send.sql

    how do i fix this problem?

    need advice please.
    Last edited by laughman; 09-03-2010, 19:04.
  • laughman
    Junior Member
    • Mar 2010
    • 4

    #2
    find solution

    i find solution.

    add ORACLE_HOME enviorment variable.
    then problem is fixed.
    script send SMS successfully.

    Code:
    export ORACLE_HOME=/home/oralce/app/oracle/product/11.1.0/client

    Comment

    Working...