The Server Monitor Service Status Tool is a web application that can be used to stop and start any <Server> that is running as part of the SystemWeaver Monitor Service. The web application can be run directly as an executable in the Windows session as needed, or as a <Server> in the monitor service. It is only accessible from the server machine where the SystemWeaver Monitor Service and Status Tool are running. 


Prerequisites

  • The SystemWeaver Monitor Service 2 is installed and running.
  • An installation of the SystemWeaver Monitor Service Web App Host (swServerMonitorWebAppHost.exe)
  • SystemWeaver version R40 or later


Configuring the Status Tool

To configure the Server Monitor Service Status Tool, open swServerMonitorWebAppHost.exe.config in a text editor. 

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <appSettings>
    <add key="WebHostPort" value="5000" />
    <add key="WebHostAddress" value="localhost"/>
    <add key="ServerMonitorWCFServiceAddress" value="http://localhost:9090/ServerMonitor" />
  </appSettings>
</configuration>

In the <appSettings> tag at the bottom, modify the following keys: 


WebHostPort defines the port used by the Status Tool web application. Enter a unique port number. This is the port to be used in the browser URL to view the tool, e.g., http://localhost:5000/status:



WebHostAddress defines from where the web GUI can be accessed. localhost means it can only be accessed/viewed from the machine where the swServerMonitorService/swServerMonitorWebAppHost is running. This is the default. You can also enter "*" to allow access from any machine on your network that has access to the server machine.


ServerMonitorWCFServiceAddress defines the port used by the SystemWeaver Monitor Service. Enter the unique port number used. This value should match the value entered in the swServerMonitorService.settings file:



Running the Status Tool as an Executable

To run the Status Tool on an as-needed basis, double-click on the swServerMonitorWebAppHost.exe executable. 



If you receive "Access is denied", try right-clicking on the executable and "Run as administrator".


Adding the Status Tool to the Service

If you prefer to have the Status Tool web application running as part of the SystemWeaver Monitor Service, it is possible. Simply add a <Server> for the swServerMonitorWebAppHost application to the monitor service settings


Example Settings

<SystemWeaverMonitor wcfServicePort="9090">
   Servers>
   	<Server restart="true" id="1355">
   	   <exe>D:\systemweaver\MS_Port 1355 ISO26262\Server\swDBServer.exe</exe>
   	   <ini>D:\systemweaver\MS_Port 1355 ISO26262\Server\swServer.ini</ini>
   	</Server>
   	<Server restart="true" id="1700">
   	   <exe>D:\systemweaver\Releases\MS_Port 1700 Training DB\Server\swDBServer.exe</exe>
   	   <ini>D:\systemweaver\Releases\MS_Port 1700 Training DB\Server\swServer.ini</ini>
   	</Server>
   	<Server restart="true" id="Monitor WebApp">
   	   <exe>D:\systemweaver\MonitorService\swServerMonitorWebAppHost.exe</exe>
   	</Server>
   /Servers>
</SystemWeaverMonitor>

What's Next?

Learn how to use the Status Tool.