Omnify Server Monitor
Help Files | HelpDesk
Web Services
Skip Navigation Links.
Links
Help Files Help Files
Server Home Page Server Home Page
Omnify HelpDesk HelpDesk Module
Omnify Support Portal Omnify Support Portal
Email Omnify Support Email Omnify Support
Each Omnify Server Monitor process thread executes a separate Web Service at the interval defined by the associated setting name in the XML configuration file.



The Server Monitor uses the value of the "OmnifyServerMonitor_localhost_ServerMonitor" (OmnifyServerMonitor.exe.config file) setting to determine the location of the Web Services.

<OmnifyServerMonitor.Properties.Settings>
  <setting name="OmnifyServerMonitor_localhost_ServerMonitor" serializeAs="String">
    <value>http://localhost/Omnify5/WebServices/ServerMonitor.asmx</value>
  </setting>


The Web Service methods that the Server Monitor uses are defined in the ServerMonitor.cs file in the App_Code directory of the Omnify Server install folder (e.g. C:\inetpub\wwwroot\Omnify5\App_Code). The Web Services are open-source C# files that can be modified to meet your specific requirements.

The Server Monitor web services contain pre-configured examples for SystemAuditFrequent (configured for stale license releasing), SystemAuditNormal (configured to remove files from temporary directories used by vaulting functions), and AlertAuditNormal (configured for sending email notices for active Tasks).

It is highly recommended that these files be modified only by a qualified Omnify Software Application Engineer. For more information, contact Omnify support at 978.988.3800.
Many of the example Web Services use the Web.config file to determine options for audit processes. To store and use settings from the Web.config file, place the settings in the AppSettings section.

<configuration>
  <appSettings>
    <add key="ServerMonitor-RunViewDirCleanup" value="no"/>
    <add key="ServerMonitor-CleanupFolders" value="C:\Inetpub\wwwroot\Omnify5\VaultView"/>
  </appSettings>


To create a setting, add an <add> tag and use the key and value attributes to define the setting name and value.

<add key="MyTestSetting" value="SomeValue"/>

To use these settings programmatically, use the ConfigurationManager object and assign the key value to a variable.

string strMyValue = ConfigurationManager.AppSettings["MyTestSetting"];

In the example above, the value of strMyValue should be "SomeValue". You should build error checking before using the assigned variables (e.g. check for null value and/or assign default).

if (strMyValue == null)
  strMyValue = "MyDefaultValue";

The Omnify Server Monitor includes an alert log that can be used to track when your specific audit process are executed. The timeframes of each audit cycle (see the Process Threads section) determine when/how often the Server Monitor executes the associated Web Services.

However, within the code for the Web Service you can leverage the alert log to determine which specific routines (in the Web Services) will be executed.

For example, you may want the Server Monitor to execute the AlertAuditNormal method every 60 minutes, but you may only want to run a specific routine in that service once a day. In this case, you can use the alert log to add a record when the event is executed and then check the log for subsequent executions to determine if that event had already been executed within a specific timeframe.

The source code for the Server Monitor web services provides 3 functions that can be used to determine if a particular task should be executed and record when tasks have been executed.

Function Description Returns Parameters Example
CanRunAlertCheck Used to determine if a specific alert has been executed within the timeframe specified boolean
true Alert can be run
false Alert has been executed within the specified timeframe
Alert Name string
Timeframe in Minutes integer
bool bCanRun = CanRunAlertCheck("ERP_New Item_Upload", "10")
CanRunDailyCheck Used to determine if a specific alert has been executed within the past 24 hours boolean
true Alert can be run
false Alert has been executed within the past 24 hours
Alert Name string
bool bCanRun = CanRunDailyCheck("ERP_New Item_Upload")
UpdateCheckRun Used to record when a specific alert has been executed
Alert Name string
UpdateCheckRun("ERP_New Item_Upload")