Ad Widget

Collapse

How are you handling actions + notifications ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lcondado
    Member
    • May 2006
    • 37

    #1

    How are you handling actions + notifications ?

    ¿ Are you doing (or have you done) something like this ?

    I am planning to organize notifications beggining with the definition of the next nomenclature for my items:

    sol-dataserver-oracle-sap-epp

    where

    sol = Solaris (send WARNING to sysadmins)
    dataserver = Name of the server (send ALERT to the sysadmin on charge in that moment)
    oracle = Name of the database (send WARNING to DBA's)
    sap = Application that uses the database (send ALERT to SAP admins)
    epp = SAP module that uses the database (send

    So, each token is used to add people to the notificacion, but we want to send email to some persons, SMS to other persons, and both notifications to other persons, so the script we use to do this is getting confusing.

    As a first aproximation, we will use four tables to handle notifications:

    N_AREAS -> N_PERSONS -> N_NOTIFICATIONS <- N_TRIGGER_TOKENS

    N_AREAS
    id
    description
    celular1
    tipo_cel1


    N_PERSONS
    id
    area_id
    num_employee
    name
    extension1
    extension2
    email1
    email2
    celular1
    tipo_cel1
    celular2
    tipo_cel2


    N_NOTIFICATIONS
    id
    person_id
    trigger_id
    include_exclude
    f_email1
    f_email2
    f_celular1
    f_celular2


    N_TRIGGER_TOKENS
    id
    token
  • lcondado
    Member
    • May 2006
    • 37

    #2
    getting notifications

    This is are my test notifications for the tokens hpux and pardev (this is a server name).

    mysql> select tt.id, n.person_id, n.token_id, n.include_exclude, n.f_email1, n.f_celular1, p.email1, p.celular1, p.tipocel1
    -> from N_Trigger_Tokens tt, N_Notifications n, N_Persons p
    -> where tt.token in ('hpux','pardev') and tt.id = n.token_id and n.person_id = p.id
    -> order by person_id;
    +------+-----------+----------+-----------------+----------+------------+----------------------------------------+------------+----------+
    | id | person_id | token_id | include_exclude | f_email1 | f_celular1 | email1 | celular1 | tipocel1 |
    +------+-----------+----------+-----------------+----------+------------+----------------------------------------+------------+----------+
    | 10 | 20 | 10 | I | Y | Y | [email protected] | 5534636083 | TP |
    | 10 | 30 | 10 | I | Y | N | [email protected] | 5540657296 | TP |
    | 80 | 30 | 80 | E | Y | N | [email protected] | 5540657296 | TP |
    | 10 | 40 | 10 | I | Y | N | [email protected] | 5530072604 | TB |
    | 80 | 40 | 80 | I | Y | Y | [email protected] | 5530072604 | TB |
    +------+-----------+----------+-----------------+----------+------------+----------------------------------------+------------+----------+
    5 rows in set (0.00 sec)

    Comment

    Working...