L.6 Configuring Swyx HealthMonitor
The Swyx HealthMonitor is a Windows service that must be installed separately in the VM. This section describes the installation and configuration of this service.
 
1 Download the ZIP file of the HealthMonitor service from the Swyx website enreach.com/products/support/support-downloads.html
2 Run the Windows PowerShell console as an administrator.
3 Create a directory under %program files%:
mkdir "$env:ProgramFiles\Swyx.Core.HealthMonitor"
4 Extract the HealthMonitor files to this directory:
Expand-Archive -Path Swyx.Core.HealthMonitor.zip -DestinationPath "$env:ProgramFiles\Swyx.Core.HealthMonitor"
5 Navigate to the directory where you extracted the files and install Swyx HealthMonitor using one of the following commands:
For use with VMware vSphere
./install-service.ps1
For use with Hyper-V Failover Cluster
./install-service.ps1 -EnableHyperVSupport
 
The "-EnableHyperVSupport" parameter configures the Swyx HealthMonitor service to run with local administrative privileges. This is necessary because Microsoft Windows only allows administrators to use Hyper-V Heartbeat Integration Services interface.
 
The installation script has some optional parameters to customize the installation. In most cases, the default settings are sufficient. You can get a description of the options with the normal PowerShell help function:
get-help ./install-service.ps1 -full
6 Adjust the configuration of the service as described in the next section before starting the service.
 
 
Starting with Swyx Heath Monitor 1.2, the steps in this section are no longer necessary for the default settings, as the "appSettings.json" file is automatically configured by the installation script.
 
1 Open the configuration file "appSettings.json" in a text editor.
2 Make sure that VSphereHeartbeat is set to "true".
3 Remove the comment characters (//) in front of the lines in the "Probes" section.
4 Replace in all "destination" lines the target "sip://example.com" with "sip://<server-ip>". "<server-ip>" is the IP address of SwyxServer.
If you have a setup with multiple network interfaces and have configured the Swyx services to use a specific interface (see Network Card(s)), use the IP address of that interface. If you use the computer name instead of the IP address, HealthMonitor uses the first IP address provided by Windows for that computer name, and not necessarily the one permanently configured in Swyx.
5 Make sure that there is an entry in the Probes list in the "appSettings.json" file for each installed Swyx service. If you have not installed a service, also remove it from the Probes list.
Services that are monitored via HTTP instead of SIP have an HTTP instead of SIP URL in the "appSettings.json" file at "destination". If the service does not have a verifiable TLS certificate, you can disable the HealthMonitor TLS certificate check for monitoring. To do this, add the setting "skipTlsCheck": "false".
The installation script configures the service restart options for the Swyx services in Windows. A Swyx service that terminates unexpectedly is restarted by Windows only once. The installation script only adjusts the services configured in "Probes" in appSettings.json. Therefore, run the installation script again when you add or remove probes.
The following example shows a typical configuration for a server with IP 10.0.0.1:
{
"HealthMonitorApp": {
"Prometheus": false,
"VSphereHeartbeat": true
"HyperVHeartbeat": false
},
"Probes": [
{
"Name": "server",
"Type": "Network",
"Configuration": {
"destination": "sip://10.0.0.1:5060",
"probingIntervalSeconds": 10,
"responseTimeoutMilliseconds": 5000
}
},
{
"Name": "uaCSTA",
"Type": "Network",
"Configuration": {
"destination": "sip://10.0.0.1:65012",
"probingIntervalSeconds": 10,
"responseTimeoutMilliseconds": 500
}
},
{
"Name": "linkmgr",
"Type": "Network",
"Configuration": {
"destination": "sip://10.0.0.1:65001",
"probingIntervalSeconds": 10,
"responseTimeoutMilliseconds": 500
}
},
{
"Name": "conferencemgr",
"Type": "Network",
"Configuration": {
"destination": "sip://10.0.0.1:5062",
"probingIntervalSeconds": 10
}
},
{
"Name": "phonemgr",
"Type": "Network",
"Configuration": {
"destination": "sip://10.0.0.1:65007",
"probingIntervalSeconds": 10
}
},
{
"Name": "swyxgate",
"Type": "Network",
"Configuration": {
"destination": "sip://10.0.0.1:5064",
"probingIntervalSeconds": 10
}
},
{
"Name": "ctiplus",
"Type": "Network",
"Configuration": {
"destination": "sip://10.0.0.1:65009",
"probingIntervalSeconds": 10
}
},
{
"Name": "faxserver",
"Type": "Network",
"Configuration": {
"destination": "sip://10.0.0.1:61000",
"probingIntervalSeconds": 10
}
},
{
"Name": "cds",
"Type": "Network",
"Configuration": {
"destination": "https://10.0.0.1:9100/ippbx/client/v1.0/login/systemhealth",
"probingIntervalSeconds": 10,
"responseTimeoutMilliseconds": 1000
}
}
],
"HealthRules": [
{
"ProbeName": "server",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 3
},
{
"ProbeName": "uaCSTA",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "linkmgr",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "conferencemgr",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "phonemgr",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "swyxgate",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "cds",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "pns",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "faxserver",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "ctiplus",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
},
{
"ProbeName": "ctiplus",
"MetricName": "swyx_number_of_failed_probes",
"LessThanOrEqual": 2
}
],
"Serilog": {
"MinimumLevel": {
"Default": "Information"
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"outputTemplate":
"{Timestamp:dd HH:mm:ss.fff} {Level:u4} {ThreadId} {SourceContext} {Message}{NewLine}{Exception}",
"theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console"
}
},
{
"Name": "File",
"Args": {
"path": "C:\\ProgramData\\Swyx\\Traces\\Swyx.Core.HealthMonitor.txt",
"rollingInterval": "Day",
"retainedFileCountLimit": 7,
"outputTemplate":
"{Timestamp:dd HH:mm:ss.fff} {Level:u4} {ThreadId} {SourceContext,-50} {Message}{NewLine}{Exception}"
}
}
],
"Enrich": ["FromLogContext", "WithThreadId"]
},
"AllowedHosts": "*"
}