- 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 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-monitor-waveform 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]

In essence, you can install and host Nodinite Monitoring Agents anywhere and everywhere! Perform the installation and configure it for use with the Service Bus Relaying option.

Costs and pricing information

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

The cost varies with the following parameters:

  • 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...
    • Many LogText changes - for custom-coded Monitoring Agents, make sure the LogText only changes when necessary.
  • Caching - 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 pricing information, 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
    • Your account must have at least the Contributor role.
  • Namespace
    • Endpoint address must be unique; When you have two or more agents of the same type, you may choose to use separate Namespaces or change the endpoint address in the config file and set the Service URI 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.

Important

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. Uncomment this section.
  2. Change the keyName and key according to your setup in the Azure portal

3. webHttpRelayBinding

  1. Uncomment this section.

4. endpoint

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

Service Bus Relay Namespace
Create and select the service bus relay 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 (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%

Security tab

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)

Important

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.

Tip

Additional information to aid the troubleshooting may exist in the Windows Event Logs..


Next Step

Add or manage Monitoring Agent

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