Assure1 Metric TCP Client Collector¶
Overview¶
The Assure1 Metric TCP Client Collector is a generic TCP socket collection application that will connect to a device using a configurable port, get the streams of ASCII delimited messages and process the messages into metrics and compare them for thresholding. This collector is device and instance oriented.
By default, Assure1 has the Metric TCP Client Collector and Metric TL1 Collector metric services that utilizes the TCP Client Collector to collect metrics.
TCP Client Collector Setup¶
-
Determine the host and port settings needed to establish a client connection.
-
Review the logic in the rules files referenced in the configuration to see the processing that will be done when messages are retrieved:
- "LoadRules" will be executed during application startup to load data that might be needed during processing.
- "IncludeRules" will be read during application startup to load additional files that might be called during processing.
- "BaseRules" will be executed for each device that is selected based on the configuration.
Update the logic as needed.
-
Create a clone of the default service, making changes to the configuration as needed.
-
Enable the Service.
Default Service¶
Field | Value |
---|---|
Package Name | coreCollection-app |
Service Name | Metric TCP Client Collector |
Service Program | bin/core/collection/TCPClientCollectord |
Service Arguments | |
Service Description | Metric rules-based TCP client collector |
Failover Type | Standalone (Supported: Standalone, Primary/Backup) |
Status | Disabled |
Privileged | (Checked) |
Default Configuration¶
Name | Value | Possible Values | Notes |
---|---|---|---|
BaseRules | collection/metric/tcpclient/base.rules | Text, 255 characters | Relative path to Base Rules. |
BranchDir | core/default | Text, 255 characters | relative path to Rules dir. |
CheckTime | 900 | Integer | How often (in seconds) where the application checks to see if there are any relevant changes. |
Host | localhost | Text, 255 characters | The FQDN/IP Address of the device to be connected to. |
IncludeRules | collection/metric/tcpclient/base.includes | Text, 255 characters | Relative path to Include Rules. |
LoadRules | collection/metric/tcpclient/base.load | Text, 255 characters | Relative path to Load Rules. |
LogFile | logs/MetricTCPClientCollector.log | Text, 255 characters | Relative path to Log File. |
LogLevel | ERROR | OFF, FATAL, ERROR, WARN, INFO, DEBUG | Logging level used by application. |
PollTime | 300 | Integer | How often the poller will start a poll cycle, in seconds. |
Port | 9001 | Integer | The port to use when connecting to the device. |
Threads | 3 | Integer | Number of process threads created. The aggregator takes a third of this value (rounded up) for database threads unless overridden by the "DBThreads" application configuration. |
DBThreads | Integer | Optional - Number of database threads to be created. If not specified, defaults to a third (rounded up) of "Threads" application configuration. | |
ThresholdThreads | Integer | Optional - Number of threshold threads to be created. Enables the checking of thresholds in the application instead of the Default Threshold Engine. If not specified, application threshold checking is disabled. | |
SendAllViolations | Disabled | Enabled/Disabled | Optional - If enabled, thresholds will send violation notifications every poll cycle rather than only on state change. Requires 'ThresholdThreads' |
Metric TL1 Collector Service¶
Field | Value |
---|---|
Package Name | coreCollection-app |
Service Name | Metric TL1 Collector |
Service Program | bin/core/collection/TCPClientCollectord |
Service Arguments | |
Service Description | Metric rules-based TL1 Performance collector via the TL1 Gateway |
Failover Type | Standalone (Supported: Standalone, Primary/Backup) |
Status | Disabled |
Privileged | (Checked) |
Metric TL1 Collector Configuration¶
Name | Value | Possible Values | Notes |
---|---|---|---|
BaseRules | collection/metric/tl1g/base.rules | Text, 255 characters | Relative path to Base Rules. |
BranchDir | core/default | Text, 255 characters | relative path to Rules dir. |
CheckTime | 900 | Integer | How often (in seconds) where the application checks to see if there are any relevant changes. |
Host | localhost | Text, 255 characters | The FQDN/IP Address of the device to be connected to. |
IncludeRules | collection/metric/tl1g/base.includes | Text, 255 characters | Relative path to Include Rules. |
LoadRules | collection/metric/tl1g/base.load | Text, 255 characters | Relative path to Load Rules. |
LogFile | logs/MetricTL1Collector.log | Text, 255 characters | Relative path to Log File. |
LogLevel | ERROR | OFF, FATAL, ERROR, WARN, INFO, DEBUG | Logging level used by application. |
PollTime | 300 | Integer | How often the poller will start a poll cycle, in seconds. |
Port | 9001 | Integer | The port to use when connecting to the device. |
Threads | 3 | Integer | Number of process threads created. The aggregator takes a third of this value (rounded up) for database threads unless overridden by the "DBThreads" application configuration. |
DBThreads | Integer | Optional - Number of database threads to be created. If not specified, defaults to a third (rounded up) of "Threads" application configuration. | |
ThresholdThreads | Integer | Optional - Number of threshold threads to be created. Enables the checking of thresholds in the application instead of the Default Threshold Engine. If not specified, application threshold checking is disabled. | |
SendAllViolations | Disabled | Enabled/Disabled | Optional - If enabled, thresholds will send violation notifications every poll cycle rather than only on state change. Requires 'ThresholdThreads' |
Rules¶
This collector uses the Assure1 standard rules architecture, which are 100% Perl syntax. Refer to the following articles to assist in rules creation:
Tokens¶
The collector exposes the following tokens for rules processing.
Token | Description |
---|---|
$Message->{'RxTime'} | Received Time |
$Message->{'Message'} | Message received |
$Message->{'Host'} | Host connected to |
$AppConfig | Hash reference to the application configuration name-value pairs that were configured. (i.e. use $AppConfig->{'Host'} to retrieve the set value for 'Host'.) |
$CustomHash | Custom key, value cache available across all rules. Contents commonly defined in Load Rules then used in Base or other rules. NOTE: This variable is a shared object and any additional sub hashes or arrays must be shared before use or it will cause the error: "Invalid value for shared scalar". Instantiate the sub hash/array using '&share({})' e.g. $CustomHash->{SubObject} = &share({}); |
$StorageHash | Internal cache used as the StorageHash option when calling rules functions such as FindDeviceID(). NOTE: The structure of this cache is subject to change! Not recommended for custom global storage or manual manipulation; use $CustomHash. |
Administration Details¶
The following list shows the technical details needed for advanced administration of the application:
-
Package - coreCollection-app
-
Synopsis -
./TCPClientCollectord [OPTIONS]
-
Options:
-c, --AppConfigID N Application Config ID (Service, Job, or Request ID) -?, -h, --Help Print usage and exit
-
Threaded - Multi-Threaded