Ad Widget

Collapse

SMS alerting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aakaa
    Junior Member
    • Feb 2013
    • 10

    #1

    SMS alerting

    Hi,
    First we have zabbix 1.8.15 which works 1 year and everything works fine, then we want to upgrade it, then sms alerts stoped working, we back to 1.8.15 ver and it still don't work
    No I install fresh instance of Zabbix Server. I made action with sms and mail alert. Mails works great every times but there is no sms. I spend almost all day and I couldn't resolve problem. Script in sh which will send sms with gnokii (script from root account works) doesn't work, I couldnt found any info i log that it even started. Please help me

    SMS error from zabbix_server.log
    PHP Code:
     1837:20130214:161001.939 In read_gsm() [OK] [NULL] [NULL] [NULL]
      
    1837:20130214:161002.042 Read from GSM modem [^MOK^M]
      
    1837:20130214:161002.042 In check_modem_result()
      
    1837:20130214:161002.042 End of check_modem_result():SUCCEED
      1837
    :20130214:161002.042 End of read_gsm():SUCCEED
      1837
    :20130214:161002.042 write to GSM modem [AT+CMGS="]
      1837:20130214:161002.042 write to GSM modem [+telephone_number]
      1837:20130214:161002.042 write to GSM modem ["
    ^M]
      
    1837:20130214:161002.042 In read_gsm() [> ] [NULL] [NULL] [NULL]
      
    1859:20130214:161002.130 In process_proxy()
      
    1859:20130214:161002.130 In DCconfig_get_proxypoller_hosts()
      
    1859:20130214:161002.130 End of DCconfig_get_proxypoller_hosts():0
      1859
    :20130214:161002.130 End of process_proxy()
      
    1859:20130214:161002.130 proxy poller #1 spent 0.000261 seconds while processing   0 proxies
      
    1859:20130214:161002.130 In DCconfig_get_proxypoller_nextcheck()
      
    1859:20130214:161002.130 End of DCconfig_get_proxypoller_nextcheck():-1
      1859
    :20130214:161002.130 sleeping for 5 seconds
      1860
    :20130214:161002.162 In collect_selfmon_stats()
      
    1860:20130214:161002.162 End of collect_selfmon_stats()
      
    1860:20130214:161002.162 sleeping for 1 seconds
      1837
    :20130214:161002.179 Read from GSM modem [^M> ]
      
    1837:20130214:161002.179 In check_modem_result()
      
    1837:20130214:161002.179 End of check_modem_result():SUCCEED
      1837
    :20130214:161002.179 End of read_gsm():SUCCEED
      1837
    :20130214:161002.179 write to GSM modem [TriggerZabbix agent on Server01 is unreachable.
    Trigger statusPROBLEM
    Trigger severity
    High
    Trigger URL
    :

    Item values:

    1. System Check Status (Server01): 1]
      
    1837:20130214:161002.179 write to GSM modem [^Z]
      
    1837:20130214:161002.179 In read_gsm() [+CMGS: ] [NULL] [NULL] [NULL]
      
    1837:20130214:161002.307 Read from GSM modem [^MERROR^M]
      
    1837:20130214:161002.307 In check_modem_result()
      
    1837:20130214:161002.307 End of check_modem_result():FAIL
      1837
    :20130214:161002.307 End of read_gsm():FAIL
      1837
    :20130214:161002.307 write to GSM modem [^MESC^Z]
      
    1837:20130214:161002.307 In read_gsm() [] [NULL] [NULL] [NULL]
      
    1837:20130214:161002.307 error during wait for GSM modem
      1837
    :20130214:161002.307 Read from GSM modem []
      
    1837:20130214:161002.307 End of read_gsm():SUCCEED
      1837
    :20130214:161002.325 End of send_sms():FAIL
      1837
    :20130214:161002.325 End of execute_action():FAIL
      1837
    :20130214:161002.326 error sending alert ID [391]
      
    1837:20130214:161002.326 query without transaction detected
      1837
    :20130214:161002.326 query [txnlev:0] [update alerts set retries=1,error='Expected [+CMGS: ] received [ERROR]' where alertid=391
    uname -a
    PHP Code:
    Linux Zabbix 2.6.32-279.22.1.el6.i686 #1 SMP Wed Feb 6 00:31:03 UTC 2013 i686 i686 i386 GNU/Linux 
    /etc/redhat-release
    PHP Code:
    CentOS release 6.3 (Final) 
    /etc/passwd
    PHP Code:
    zabbixsrv:x:492:498:Zabbix Monitoring System -- Proxy or server:/var/lib/zabbixsrv:/sbin/nologin
    zabbix
    :x:491:498:Zabbix Monitoring System:/var/lib/zabbix:/sbin/nologin 
    /etc/group
    PHP Code:
    dialout:x:18:zabbixsrv,zabbix
    zabbix
    :x:498:
    smstools:x:494:zabbixsrv
    gnokii
    :x:491:
    uucp:x:14:uucp,zabbixsrv,zabbix
    gnokii
    :x:491:zabbixsrv,zabbix 
    ls -la /dev/ttyACM0
    PHP Code:
    crw-rw---- 1 root dialout 1660 02-14 16:13 /dev/ttyACM0 
    Media types
    PHP Code:
    SMS GSM modem"/dev/ttyACM0"
    SMS_gnokii Script name"sms_sender.sh" 
    cat /etc/zabbix_server.conf |grep Alert
    PHP Code:
    AlertScriptsPath=/var/lib/zabbixsrv/alertscripts 
    ls -la /var/lib/zabbixsrv/alertscripts
    PHP Code:
    -rwxr-xr-x 1 zabbixsrv zabbix  230 02-14 14:37 sms_sender.sh 
    cat sms_sender.sh
    PHP Code:
    #!/bin/bash
    LOGFILE="/var/log/zabbix/zabbix-sms.log"
    echo "To: '$1' Text: '$3'" >> ${LOGFILE}
    PHONENR=`echo "$1" | sed s#\s##`
    /
    bin/echo "$3" | /usr/bin/gnokii --config /etc/gnokiirc --sendsms "${PHONENR}1>>${LOGFILE2>&
    getenforce
    PHP Code:
    Disabled 
    Actions - SMS - Operation details
    PHP Code:
    Step    
    From    1
    To 1
    Step duration 0
    Operation type Send message
    Send to User group 
    sms users
    Send only to 
    All 
    I think this is everything, so please anyone help me make it works!
    Thx



    --------------------------------
    OK i resolve the problem, I find information that this error is arrive when sms message is to long, I remove new and empty lines and sms is working fine from Zabbix.
    Last edited by aakaa; 15-02-2013, 11:11.
  • aakaa
    Junior Member
    • Feb 2013
    • 10

    #2
    OK I find the the answer sms message was to long, I remove every new line and everything works!

    Comment

    Working...