Like global data items, monitored data can be accessed in a number of ways within WinGate.
The Monitoring tab, located at Control Panel > Data in the WinGate Management console, displays all of the data items that have been published by different WinGate components so they can be monitored.
The Monitoring tab allows you to easily turn on and off monitoring for these pieces of data. You can also set threshold values (both upper and lower) that the monitored data should not exceed. When setting thresholds on a piece of monitored data, you can create an incident to trigger of a notification plan in the WinGate Notifications system if the threshold is breached.
When using a script system inside WinGate, monitored data items can be read and referred to by using the methods (functions) made available by the Data object published by the Data module. These are the same Data object methods also visible in the Symbol browser (See the WinGate objects section below for the methods provided by the Data object).
All monitored data is published in the WinGate Schema. Components can perform the same tasks available from script using the Schema interface - a C language API.
When using a WinGate scripting system (such as the Lua or Javascript event processors) or a WinGate configuration that has access to the Symbol browser, you can access monitored data items using the GetMonitor(Text DataSource,Text DataItem) methods provided by the Data object.
There are several functions that allow you to choose different monitoring scopes for the selected monitored data item you are accessing. You can choose monitored values based on current, per day, per hour, per minute, and per second values. This makes the GetMonitor methods useful for rate limiting in scripts or policies, based on the values of a monitored data item.
Whenever a GetMonitor method is used, the Data system will check to see if the requested data item is set to be monitored. If it isn't, then it will set monitoring on the data item provided in the method automatically. This allows you to turn on monitoring for a published data item from within a script, rather then using the Monitoring tab in the WinGate Management console.
Remember that data must be published in WinGate before it will be available to be monitored.
Member |
Description |
---|---|
GetMonitor(TextDataSource,TextDataName).Current
|
Allows you to access and retrieve the current value of the monitored data in question. You can also choose the current maximum, minimum values if required using the applicable method. e.g. A script could contain: Data.GetMonitor("PerCounters","Counter1").Current.Value In this example, this will return the current value of a piece of monitored data called Counter1 (published by PerfCounters). |
GetMonitor(TextDataSource,TextDataName).PerDay
|
Allows you to access and retrieve a monitored data value based on per day monitoring. e.g. A script could contain: Data.GetMonitor("PerfCounters","Counter2").PerDay.Max In this example, this will return the maximum value reached by the monitored data called Counter2 (published by PerfCounters) in the last 24 hours. |
GetMonitor(TextDataSource,TextDataName).PerHour
|
Allows you to access and retrieve a monitored data value based on per hour monitoring. e.g. A script could contain: Data.GetMonitor("PerfCounters","Counter3").PerHour.Min In this example, this will return the minimum value reached by the monitored data called Counter3 (published by PerfCounters) over the last hour. |
GetMonitor(TextDataSource,TextDataName).PerMinute
|
|
GetMonitor(TextDataSource,TextDataName).PerSecond
|
|
GetMonitor(TextDataSource,TextDataName).Source
|
The Data manager also creates a Monitor object which contains methods similar to the GetMonitor methods, but are strictly related to the selected piece of monitored data that is being accessed. As such, the Monitor object will only be available in the Symbol browser when configuring the selected piece of monitored data through the Monitoring tab.
The Monitor object is also available when using a WinGate scripting system only when the selected data item has been set to be monitored first.
©2012 Qbik New Zealand Limited
no comments yet...
You can use basic Full-Text Searches against the page title and body to find matching articles. Use the following search modifiers to refine your query:
You can create a new account or reset your password at forum.wingate.com.