- 5 minutes to read

How to enable Service Bus Relaying connections for Nodinite Log and Monitoring Agents

What is Service Bus Relaying? The Service Bus relay service from Microsoft enables the Nodinite Monitoring Service to talk with the Nodinite Monitoring Agents. These, may run in both an Azure datacenter and in your own on-premises enterprise environment (even remote on-premises, like your customers and business partners).

graph TD subgraph "On-Premise" ro(fal:fa-watch-fitness Monitoring Service) end subgraph "Microsoft Azure" ro --> |outbound traffic| ro1(fal:fa-cloud Service Bus Relaying) end subgraph "Off-Site" ro3(fal:fa-heart-rate Any Monitoring Agent) --> |outbound traffic| ro1 end id1[*.servicebus.windows.net
443 Listeners on Service Bus Relay over TCP requires 443 for Access Control token acquisition
5671-5672 Advanced Message Queuing Protocol AMQP
9350-9354 Net.TCP]

This means that you can install and host Nodinite Monitoring Agents anywhere and everywhere! Simply perform the installation and configure it for use with the Service Bus Relaying option.

Costs and pricing information

There is acost associated with running the Nodinite Monitoring Agents using the Service Bus Relaying option.

Cost varies with:

  • Number of installed agents using Service Bus Relaying
  • Synchronization interval set on the Monitoring Agent Configuration
  • State changes in exposed Resources - error-prone environments will cost slightly more...
    • Also if the LogText changes - for custom-built Monitoring Agents, make sure the LogText only changes when necessary.
  • Caching implemented or not - All Nodinite Monitoring Agents are built with caching support (ETAG). The Nodinite Monitoring Agents are designed and built with caching in mind to reduce costs and improve performance.
  • Number of Remote Actions executed

Note: Using the Service Bus Relay induces costs and requires an account with a credit card associated

sbcosts
For the latest information about pricing, read more here.

How to configure the Monitoring Agents to use Service Bus Relaying

Here you will find general information that applies to all Monitoring Agents and describes how to configure the communication using Service Bus Relaying.

Prerequisites

  • Firewall
  • An Azure Subscription with a valid credit card
  • Namespace
    • Endpoint address must be unique, when you have 2 or more agents of the same type, you may either choose to use separate Namespaces or change the endpoint address in the config file and set correspondingly in the general tab.
  • Shared Access Signature security Key. See the following Microsoft article for more information MDSN.

Local Configuration

The installed Monitoring Agent has a local configuration file (.config). Within this file, there is a commented Service Bus Relaying configuration. You need to remove the wrapping comments and enter your Service Bus Namespace details.

Note: This is a manual step and requires an RDP session and local administrative rights (a restart of the Monitoring Agent is required). After a restart, the README.txt file should now display the URI to use in the Monitoring Agent Configuration

  1. behaviorExtensions
  2. endpointBehaviors
  3. webHttpRelayBinding
  4. endpoint

appconfig
Example content from a Nodinite Monitoring Agent configuration file

1. behaviorExtensions

  1. Uncomment the behaviorExtensions section behaviorExtensions

2. endpointBehaviors

  1. Uncommment this section.
  2. Change the keyName and key according to you setup in the Azure portal

3. webHttpRelayBinding

  1. Simply uncomment this section.

4. endpoint

  1. Uncomment this section
  2. Change the ServiceBusNameSpace according to your setup in the Azure portal

Service Bus Namespace
Create and select the namespace to use for your Service Bus

Monitoring Agent Configuration

From within the Monitoring Agent Configuration, you must change the following settings:

  • Service URL
  • Enable Authentication
    • Set the Authentication Key

In the Service URL field, enter the address to the installed [Monitor Agent][Monitor Agents] (copy this detail from either the Readme.txt file or from the <endpoint address ... section of %Monitoring Agent%.exe.config)

general

Security tab

A connection using the Service Bus Relay, has the following format:

    SharedAccessKeyName=%SharedAccessKeyName%;SharedAccessKey=%SharedAccessKey%;AuthenticationKey=%AuthenticationKey%

securitytab

You must perform changes to the following three fields:

  1. SharedAccessKeyName - According to your named policy, copy this name from the Azure Portal (Default name is RootManageSharedAccessKey)
    SharedAccessKeyName

  2. SharedAccessKey - Copy from either primary or secondary key
    SharedAccessKey

  3. AuthenticationKey - The AuthenticationKey is provided by the Nodinite Monitoring Agent. Copy this value from the local Readme.txt file

Firewall

The following ports must be open for outbound communication with '*.servicebus.windows.net' from both the on-premise and the off-site location:

Port Name Inbound Outbound TCP UDP Comment
443 HTTPS Secure outbound traffic
5671, 5672 Secure AMQP
9350 - 9354 Net.TCP

Troubleshooting

To debug connectivity related problems, you may enable WCF diagnostics logging, read more here

Add the following <system.diagnostics> section to the local configuration file (.config)

Note: The Windows Service Account running the Agent must have write access to the configured folder (C:\Temp\WCFlog\ in the example below, change according to your needs/policy). Make sure the destination folder exists(!)

...
<configuration>
<system.diagnostics>
 <sources>
   <Monitoring Agent Configuration name="System.ServiceModel"
           switchValue="Information, ActivityTracing"
           propagateActivity="true" >
     <listeners>
          <add name="xml"/>
     </listeners>
   </Monitoring Agent Configuration>
   <Monitoring Agent Configuration name="System.ServiceModel.MessageLogging">
     <listeners>
         <add name="xml"/>
     </listeners>
   </Monitoring Agent Configuration>
   <Monitoring Agent Configuration name="myUserTraceSource"
           switchValue="Information, ActivityTracing">
     <listeners>
         <add name="xml"/>
     </listeners>
   </Monitoring Agent Configuration>
 </sources>
 <sharedListeners>
     <add name="xml"
          type="System.Diagnostics.XmlWriterTraceListener"
          initializeData="C:\Temp\WCFlog\Error.svclog" />
 </sharedListeners>
</system.diagnostics>
</configuration>
...

Contact our Support for additional guidance if you fail to resolve the problem.

Note: There may be additional information written to the Windows Event logs.


Next Step

Add or manage Monitoring Agent

Monitoring Agents
Monitoring Service
Microsoft Service Bus Relaying
Service Bus Relaying Pricing