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).
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.
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.
- behaviorExtensions
- endpointBehaviors
- webHttpRelayBinding
- endpoint
Example content from a Nodinite Monitoring Agent configuration file
1. behaviorExtensions
2. endpointBehaviors
- Uncomment this section.
- Change the keyName and key according to your setup in the Azure portal
3. webHttpRelayBinding
- Uncomment this section.
4. endpoint
- Uncomment this section
- Change the ServiceBusNameSpace according to your setup in the Azure portal
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
Settings tab
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).
Security tab
A connection using the Service Bus Relay has the following format:
SharedAccessKeyName=%SharedAccessKeyName%;SharedAccessKey=%SharedAccessKey%;AuthenticationKey=%AuthenticationKey%
You must perform changes to the following three fields:
SharedAccessKeyName - According to your named policy, copy this name from the Azure Portal (Default name is RootManageSharedAccessKey)
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
Related
Monitoring Agents
Monitoring Service
Microsoft Service Bus Relaying
Service Bus Relaying Pricing