help • App. L: High Availability Solution for SwyxWare • Configuring the SwyxWare HealthMonitor
L.6 Configuring the SwyxWare HealthMonitor
The SwyxWare 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 Change to the directory where you unpacked the files and install SwyxWare HealthMonitor with 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 parameter "-EnableHyperVSupport" configures the SwyxWare HealthMonitor service to run with local administration rights. 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.
 
* 
As of SwyxWare Health Monitor 1.2 the steps in this section can be omitted for standard setups, because the file "appSettings.json" is adjusted automatically 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 an installation with multiple network interfaces and the SwyxWare services are fixed to one of the interfaces (see Network card(s)), use the IP address of that interface. If you use the machine name instead of the IP address, HealthMonitor will use the first IP address provided by Windows for the machine name and not necessarily the fixed one configured in SwyxWare.
5 Make sure that there is an entry in the probes list in the "appSettings.json" for each installed SwyxWare 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 adjusts the service restart options of the SwyxWare services in Windows. A SwyxWare service that stops unexpectedly is restarted only once by Windows. 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": "*"
}