Difference between revisions of "Notify"

From truxwiki.com
Jump to navigation Jump to search
Line 57: Line 57:
  
 
==Email==
 
==Email==
Sends email notifications via an smtp server.
+
Sends email notifications via an smtp server. Configurations for this notifier is nested in an "Email" block.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 81: Line 81:
 
| Who will receive this email.
 
| Who will receive this email.
 
|}
 
|}
 +
 +
E.G. for TruxtonSettings.xml
 +
<source lang="xml">
 +
<truxton_options>
 +
  <!-- ...
 +
      other configs
 +
      ...
 +
    -->
 +
  <Notify> 
 +
    <Notifiers>
 +
      <Email>
 +
        <Host>smtp.gmail.com</Host>
 +
        <!-- port will default to 587 (TLS), if you want SSL you need to manually specify -->
 +
        <Port>465</Port>
 +
        <Sender>load@mydomain.com</Sender>
 +
        <StaticRecipients name="0">firstemail@mydomain.com</StaticRecipients>
 +
        <StaticRecipients name="1">anotheremail@anotherdomain.com</StaticRecipients>
 +
        <StaticRecipients name="2">andanotheremail@foo.com</StaticRecipients>
 +
      </Email>
 +
    </Notifiers>
 +
  </Notify>
 +
</truxton_options>
 +
</source>
  
 
==Micosoft Teams==
 
==Micosoft Teams==

Revision as of 11:33, 1 April 2021

Details
Executable Notify.exe
Stage 255
Percent Complete 100%
Message Queue notify


The Notify ETL is responsible for broadcasting different topics of information to different communications channels when a load completes. The progress of a load is not dependent on Notify.

When giving examples on how to configure the individual items of Notify, we will use the TruxtonSettings.xml file as an example. Configurations for notify are nested in a "Notify" block.

E.G. for TruxtonSettings.xml

<truxton_options>
  <!-- ...
       other configs
       ...
    -->
  <Notify>  
    <!-- 
        individual notify configs here 
      -->
  </Notify>
</truxton_options>

Notifiers

The channel in which a topic will be sent. E.G. Email, SMS, Teams, etc. Configurations for each notifier is nested in a "Notifiers" block.

E.G. for TruxtonSettings.xml

<truxton_options>
  <!-- ...
       other configs
       ...
    -->
  <Notify>  
    <Notifiers>
      <!-- 
          individual notifiers configs here 
        -->
    </Notifiers>
  </Notify>
</truxton_options>

The Notify ETL contains the following notifiers out of the box:

Email

Sends email notifications via an smtp server. Configurations for this notifier is nested in an "Email" block.

Name Data Type Description
Host string The smtp host which will send the email.
Port number The smtp port to connect to the host. If omitted will default to the default smtp port: "587"
Sender string The name of the sender who sends this email
StaticRecipients string[] Who will receive this email.

E.G. for TruxtonSettings.xml

<truxton_options>
  <!-- ...
       other configs
       ...
    -->
  <Notify>  
    <Notifiers>
      <Email>
        <Host>smtp.gmail.com</Host>
        <!-- port will default to 587 (TLS), if you want SSL you need to manually specify -->
        <Port>465</Port>
        <Sender>load@mydomain.com</Sender>
        <StaticRecipients name="0">firstemail@mydomain.com</StaticRecipients>
        <StaticRecipients name="1">anotheremail@anotherdomain.com</StaticRecipients>
        <StaticRecipients name="2">andanotheremail@foo.com</StaticRecipients>
      </Email>
    </Notifiers>
  </Notify>
</truxton_options>

Micosoft Teams

Send Grid

Slack

Twilio

Topics

The information which is sent through a notifier. Configurations for each Topic is nested in a "Topics" block.

E.G. for TruxtonSettings.xml

<truxton_options>
  <!-- ...
       other configs
       ...
    -->
  <Notify>  
    <Topics>
      <!-- 
          individual topic configs here 
        -->
    </Topics>
  </Notify>
</truxton_options>

The Notify ETL contains the following topics out of the box:

Alert

Analyst Load Info

Loader Load Info

Plugins

Notify supports a plugin architecture to add additional Notifiers and Topics. See the .NET Core SDK articles to how to add a reference to the SDK. The nuget package thats relevant is Truxton.Notifications.Core - this package contains all the necessary transitive SDK dependencies.

Notification SDK

Truxton.Notifications.Core contains several interfaces and relevant classes to allow integration into the Notify ETL.


Plugin Scan Directory

Notify will scan C:\ProgramData\Truxton\Plugins when it starts up for plugins (if the plugin folder does not exist go ahead and create one).

The folder structure for a plugin must be as follows:

  • C:\ProgramData\Truxton\Plugins
    • \PLUGIN_ASSEMBLY_NAME
      • \PLUGIN_ASSEMBLY_NAME.dll
      • (any additional dependencies)

Please take note of the the nested directory. This is so every assembly doesn't need to scanned on startup. So as an example, if my plugin was foobar.dll, you would place it here: C:\ProgramData\Truxton\Plugins\foobar\foobar.dll. Any additional dependencies that foobar.dll needs will go into that directory.