- 4 minutes to read

Configure Service Bus Relaying for Nodinite Log and Monitoring Agents

What is the Service Bus relay? The Service Bus relay service from Microsoft enables the Monitoring Service of Nodinite to talk with Monitoring Agents that run in both an Azure datacenter and 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 --> ro1(fal:fa-cloud Service Bus Relaying) end subgraph "Off-Site" ro3(fal:fa-heart-rate Monitoring Agent A) -->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 use every Monitoring wherever you have the need! Simply install the agent and configure for Service Bus Relaying. Read more about this topic below.

Firewall

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

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

https://docs.microsoft.com/en-us/power-bi/service-gateway-onprem

Costs and pricing information

There is an additional cost associated with running Monitoring Agents off-site. This cost varies depending on the number of agents, the synchronization interval, and the number of Resources that changes state.

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 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
  • Number of Remote Actions executed

The Monitoring Agents for Nodinite are designed and built with caching in mind to reduce costs and improve performance.

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 communication using Service Bus Relaying.

Prerequisites

  • An account with valid credit card information set
  • 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][SAS]. The Monitoring needs additional configuration for Service Bus Relaying.

Local Configuration

The local configuration file (.config) has the Service Bus Relaying configuration withing comments. You need to remove the wrapping Comments and use your Service Bus Namespace information.

Note: This is a manual step and requires RDP session and administrative rights (restart of Windows service is required).

appconfig

Note: Changes on the configuration file requires the Monitoring Agent to be restarted for these changes to be used

The README.txt should now display the URI to use as a Monitoring Agent Configuration in later steps described below.

Configuration of the Monitoring Agent Configuration

You must edit the Security tab of a Monitoring Agent Configuration and provide the connection information for the Service Bus Relay in the following format:

General

Enter the address to the installed agent (take from README.txt for TCP connections or from endpoint address section of %Monitoring Agent%.exe.config file for service bus relayed connections)

general

Security

SharedAccessKeyName=%RootManageSharedAccessKey%;ServiceBusRelayingAppConfig.pngaredAccessKey=%SharedAccessKey%;AuthenticationKey=%AuthenticationKey%

securitytab
The 3 individual parts are:

  1. SharedAccessKeyName According to your policy, copy from Azure Portal (Default RootManageSharedAccessKey)

SharedAccessKeyName
2. SharedAccessKey Copy from connection string information in the Azure Portal

SharedAccessKey
3. AuthenticationKey Copy AuthenticationKey from README.txt file

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