Results 1 to 9 of 9

Thread: sms notification without android sms ?

  1. #1

    sms notification without android sms ?

    i'm setting up to notifications for my monitoring environment. but is it possible to set this up without the android sms way?.

    and might it be possible to set it up to use a certain website that takes care of the sending of text for a different system of ours ?
    and if not what would be the best solution to set this up?

    thanks in advance

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: sms notification without android sms ?

    You can choose the way you want, just add a notification command you need.
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3

    Re: sms notification without android sms ?

    i want to make use of an online one so would it should be possible to just follow what is done in this topic using that script right ?
    http://www.shinken-monitoring.org/fo...pic,723.0.html

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: sms notification without android sms ?

    Give a try, should work. I don't know how I can answer to your question sorry.
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5

    Re: sms notification without android sms ?

    so i've been trying it a bit now. and got it mostly running but the message is a bit wrong.

    the variable service description $servicedesc is defined is variable $4 in the script but my service descriptions with spaces in the names just count up.
    so for example: memory usage.
    it wil get added like this: $4 = memory and $5 = usage
    but the script uses $5 as the service state
    i looked at the e-mail notification but it isn't really defined different in there.

    i used the configuration in the previously linked topic and it is the same as the config on the wiki.
    and it seems to send everything double. so if a state goes critical i receive 2 text messages.

    do you know a solution ?

  6. #6
    Junior Member
    Join Date
    Jun 2011
    Posts
    21

    Re: sms notification without android sms ?

    I have chosen to not depend of external SMS providers. The service can be out of order, or if the Internet access is down no SMS can be sent. I am actually using a SMS gateway based on a Raspberry PI and an USB 3G Modem (Huawei E367) and Kannel SMS server.

    If you want I can post here my config, Kannel and Shinken.

  7. #7

    Re: sms notification without android sms ?

    i have gotten everything to work.

    the problem with the variables in the script where easily fixed by putting the hostname and servicename variables between quotes.
    and the double text messages where caused by the fact that it tried to sent one from the admin and another one from the guest account.

  8. #8
    Junior Member
    Join Date
    Nov 2015
    Posts
    5
    Quote Originally Posted by Tulan View Post
    I have chosen to not depend of external SMS providers. The service can be out of order, or if the Internet access is down no SMS can be sent. I am actually using a SMS gateway based on a Raspberry PI and an USB 3G Modem (Huawei E367) and Kannel SMS server.

    If you want I can post here my config, Kannel and Shinken.
    Can you please post your shinken and kannel config here ?

    Thanks in advance.

  9. #9
    Junior Member
    Join Date
    Jun 2011
    Posts
    21
    Below my configurations

    Shinken commands.cfg:
    Code:
    define command {
            command_name                    host-notify-by-sms
            command_line                    wget -q --no-proxy "http://$SMSGW$:13009/cgi-bin/sendsms?username=kannel&password=XXXX&to=$CONTACTPAGER$&text=HOST $NOTIFICATIONTYPE$%0AH: $HOSTNAME$%0AE: $HOSTSTATE$%0AT: $TIME$%0AD: $HOSTOUTPUT$" > /dev/null
            register                        1
    }
    
    define command {
            command_name                    service-notify-by-sms
            command_line                    wget -q --no-proxy "http://$SMSGW$:13009/cgi-bin/sendsms?username=kannel&password=XXXX&to=$CONTACTPAGER$&text=SERVICE $NOTIFICATIONTYPE$%0AH: $HOSTNAME$%0AS: $SERVICEDESC$%0AE: $SERVICESTATE$%0AT: $TIME$%0AD: $SERVICEOUTPUT$" > /dev/null
            register                        1
    }
    kannel.conf:
    Code:
    group = core
    admin-port = 13000
    admin-password = bar
    #admin-deny-ip = "*.*.*.*"
    admin-allow-ip = "XXXX"
    smsbox-port = 13001
    wapbox-port = 13002
    wdp-interface-name = "127.0.0.1"
    log-file = "/var/log/kannel/bearerbox.log"
    #box-deny-ip = "*.*.*.*"
    #box-allow-ip = "127.0.0.1"
    
    group = wapbox
    bearerbox-host = localhost
    log-file = "/var/log/kannel/wapbox.log"
    
    
    group = smsbox
    bearerbox-host = localhost
    bearerbox-port = 13001
    sendsms-port = 13009
    log-file = "/var/log/kannel/smsbox.log"
    global-sender = +33679925580
    
    
    group = smsc
    smsc = at
    modemtype = huawei_e367
    device = /dev/ttyUSB1
    pin = 3939
    my-number = +33XXXX
    
    
    
    group = modems
    id = huawei_e367
    name = "Huawei E367"
    message-storage = sm
    
    
    group = sendsms-user
    username = kannel
    password = XXXX
    #user-deny-ip = "*.*.*.*"
    user-allow-ip = "XXXX"
    #concatenation = true
    
    
    group = sms-service
    text = "toto"
    keyword = default
    #keyword-regex = .*
    catch-all = yes
    max-messages = 0
    In wget URLs, you must use the same password defined in kannel.conf (group sendsms-user).

    Of course each time you see XXXX you must replace it with your parameters

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •