'set alert' is not context aware

Issue #90 resolved
Former user created an issue

Currently 'set alert' with different email set for different checks will cause all of the mailboxes receive notification for events from all other checks so it is impossible for different mailboxes (users) to receive only email related to their services/checks

Such a new 'set alert' might be also valid until redefined, for example I write: set alert user@domain all checks that ONLY user@domain should be notified about go here

then I redefine delivery to another user set alert user2@domain all checks that ONLY user2@domain should be notified about go here

Either such redefining or making 'set alert' context boumd will make it possible for users to only receive notification related to their checks.

Comments (3)

  1. Tildeslash repo owner

    Actually this is possible, but the syntax is kind of glossed over in the manual. Anyway, you can set a standalone alert per service, for instance:

    # Global alert for all services
    set alert foo@bar not on {instance, action} 
    
     check host mysql with address localhost
           # Alert another user if this service fails
           alert baz@bar
           # Don't alert the global user 
           noalert foo@bar
           if failed port 3306 protocol mysql then alert # will only send alert to baz@bar
    
  2. Tom K

    Given shared server and 1 monitored process (check) per user, 100 users how would the config look like?

    check process p1 ...
        alert user1@host
        noalert user2@host
        noalert user3@host
        ...
        noalert user100@host
    
    check process p2 ...
        alert user2@host
        noalert user1@host
        noalert user3@host
        ...
        noalert user100@host
    ...
    
    check process p100 ...
        alert user100@host
        noalert user1@host
        noalert user2@host
        ...
        noalert user99@host
    

    And given 10 checks per user? 1000 alert/noalert lines per check?

  3. Tildeslash repo owner

    The global "set alert" is not required - it is also possible to use only the "alert" statement in the context of each service => the following configuration is sufficient:

    check process p1 ...
        alert user1@host
    
    check process p2 ...
        alert user2@host
    
    ...
    
    check process p100 ...
        alert user100@host
    
  4. Log in to comment