Ad Widget

Collapse

Send messages to different users evy day

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pietro54
    Senior Member
    • Feb 2011
    • 112

    #1

    Send messages to different users evy day

    Hi,
    I wanna to make a system that will send sms to $user(phone number) that will be evry day different.
    Let say we edit file evry day phonebook.txt. Evry night 00:00 crontab do:
    phone=tail -1 phonebook.txt and put this $phon as a number in database, that should get today sms with all events.
    I wanna to cumulate events from night lets say from 1am to 6am and in 6am send to specific user, becouse we dont wanna weak up our administrator ha?

    how should look insert,
    insert $phone into media.sendto where userid = xxxxxxx ?
    And how to cumulate all events from period of time?

    I think its good idea to compilate in to zabbix, why?
    U can tell your administrator if they should run to work or they can slowly walk from the bus

    ---Edit---
    Hi, i think i got the problem.
    If im right then topic is going to trash.
    I add action by cloning, two changes i made is
    Action is sending now sms
    And add one line to conditions
    "Time period in "1-7,8:00-9:00""

    Type of calculation
    (A) and (B) and (C)
    Conditions
    (A) Maintenance status not in "maintenance"
    (B) Time period in "1-7,8:00-9:00"
    (C) Trigger value = "PROBLEM"
    So expected scenario is:
    I will get calculated valuses from zabbix.
    when one trigger goes down after few hours goes up i wont get any message, but when some triggers goes down and wont come up i will get messages about it, is this correct?


    ---EDIT---
    I got a bit problem with my modem...
    I was getting error in open(/dev/ttyS0): [13] Permission denied
    so i add chmod 777 to /dev/ttyS0
    and now Im getting:
    Expected [OK] received []
    Maybe some one got simillar?


    OK that problem SOLVED.
    Maybe some one else will use this resolution:
    So: add right permission to /dev/ttyS0
    chmod 777 /dev/ttyS0
    remove from /var/lock file what is locking our device:
    for example: /var/lock/LCK...19890 or /var/lock/LCK..ttyS0
    rm /var/lock/LCK..ttyS0
    For test use app called minicom.
    Run it from zabbix user.

    Piotr
    Last edited by pietro54; 14-10-2012, 12:18.
  • pietro54
    Senior Member
    • Feb 2011
    • 112

    #2
    Hi,

    i found same topic


    Is there other way to do that?
    Becouse adding 10 or more action is bit "not clever".

    Maybe should be some action that look at specific time, is there is any problem and send message.
    Last edited by pietro54; 14-10-2012, 19:15.

    Comment

    Working...