Router

The Syntinel Router allows for reporters to send Signal messages to custom channels based on an id (and optional type) provided in the signal message.

For example, the default channels in the reporter database object can refer to the Production channels, but for testing purposes, the reporter can include a "routerId" and "routerType" fields in the Signal message. If a record is found in the Router database matching those Id's it would route to DEV-specific channels instead.

Signal Message

{
  "name": "Utilization",
  "description": "EC2 Utilization Montior",
  "maxReplies": 1,
  "reporterId": "my-reporter-id",
  "routerId": "dev",
  "routerType": "environment",
  "cues": {
    "ec2": {
      "template": "ec2-usage",
      "arguments": {
        "instance": "i-8675309JENNY",
        "notify": "true"
      }
    }
  }
}

Routing Options

The router requires two values to search, an ID (routerId) and a TYPE (routerType). When the routerType is not provided or a record is not found, the reporterId will be used as the TYPE to search on instead. This allows for both scenarios below.

Consolidation

In this scenario, the desire is to have ALL messages, no matter who is reporting them, wind up in the same channel(s). Using the signal example above, this router entry below would accomplish this scenario.

Router Database Entry

{
  "_id": "dev",
  "_type": "environment",
  "channels": [
    "my-consolidated-channel-slack",
    "my-consolidated-channel-teams"
  ]
}

Segregation

Here, the desire is to have each reporter send to their own channel(s). This can be accomplished by creating the router entry with the reporter id as the "_type" and by either :

Router Database Entries

{
  "_id": "dev",
  "_type": "my-reporter-id",
  "channels": [
    "my-segregrated-channel-slack",
    "my-segregrated-channel-teams"
  ]
}
{
  "_id": "test",
  "_type": "my-other-reporter-id",
  "channels": [
    "my-other-channel-slack",
    "my-other-channel-teams"
  ]
}

Routing Examples

The diagram below shows example routing results based on the signals received, matching against the Database Entries provided.

The entries are color coded, meaning the Red Signal winds up in the Red channles because of the Red database entry.

Channel Database Record