avatar  

Log out

Recently viewed tickets

SiteManager Internal Collector

The purpose of this article is to be a reference for Aggregation part
of the full Data Collection Module documentation

Prerequisite:

A Starter package (SiteManager + accounts)
A device capable of supporting data collection via 1 of the DCM protocols
Samplepoints where the aggregation can get data from
Other sections in DCM:


Data that you can collect from SiteManager itself is:

"SystemTemperature" (in centigrades Celcius)
"CPULoad" (in percent)
"FreeMem" (in kB), "UTCRTC" UTC Real TIme Clock broken into 8 separate values
"DigitalInput" (as 0/1)
"IngressRate" (in bytes/s)
"EgressRate" (in bytes/s)
"DBCachesize" (in bytes)
"DBSize" (in bytes)
"GSMRssi" (in dBm)
"GSMBer" (in percent)
"GSMOperator" (text string)
"GSMTechnology" (text string: "4G", "3G", "GPRS" etc.).



The General config elements contains the following fields:
FunctionTypeImportanceDescription
ConfigNamestringmandatoryUnique name for this configuration file. Follows the rules for names. ConfigDescription (string, optional) text describing this configuration.
CheckpointIntervalinteger == 0 or >= 60optionalThe interval with which all data from the internal datasample cache is saved to disk. This more unstable (power) the SiteManager, the more often data should be saved. Saving it often, however will also cost performance and wear on the hard-disk/flash. A value of 0 means, never checkpoint, otherwise it means interval in seconds between saves. If not specified the value 15 * 60 (15 minutes) is used.
AlarmsSavedinteger >= 4optionalThe number of alarms saved in the store-and-forward database. If this values is not specified, it will default to 32.
WaitForNTPbooleanoptionalSynchronize DCM data collection with NTP time. If this parameter is true, all DCM collectors will not begin collecting data until NTP is enabled and configured and NTP has synchronized date/time. If not specified, the value is true. Mostly used for troubleshooting


The Collectors (array of objects, mandatory) list elements contains the following fields:
FunctionTypeImportanceDescription
CollectorNamestringmandatorywhich is unique name (within this configuration file) of a device to collect data from. (This is the name used in the agent configuration). Follows the normal rules for names.
CollectorDesriptionstringoptionaldescription of this collector.
CollectorIPAddrstringoptionalprovides a default IP address (or DNS name) for the device to be polled. The agent Target IP address will take precedence over this.
CollectorPortnointeger > 0 and < 65535optionalprovides the default port number for the device to be polled. The agent Target Port number will take precedence over this. If neither CollectorPortno, nor agent Target Port Number is specified, the appropriate port will be used, depending on the Protocol parameter value.
Aliasstringoptional)This is the CollectorName of another collector, from which, all the parameters (expect CollectorName, CollectorDescription, CollectorIPAddr and CollectorPortno) are copied from. An alias cannot refer to another alias.
Protocolstring-enummandatorythe protocol used to collected data. Currently 7 possible values exists: "OPC-UA/TCP", "Modbus/TCP", "S7/TCP", "Http/GET", "Rockwell", "Simulator" and "Internal".
ConnectRetryMininteger > 0mandatoryMinimum number of seconds before trying to reestablish a connection to the device being sampled. An exponential back-off algorithm is used to retry connection establishment, starting after ConnectRetryMin and increasing to ConnectRetryMax.
ConnectRetryMaxinteger > 0mandatoryMaximum number of seconds before trying to reestablish a connection to the device being sampled.
SamplePointsArray of objectsmandatoryList of samples to be collected, possibly aggregated and stored in the Store'n'Forward database.


Samplepoint items

The SamplePoints objects contains the following elements:
FunctionTypeImportanceDescription
SampleNamestringmandatoryName of this sampled value (sometimes called a tagname). Follows the normal rules for names.
SampleDescriptionstringoptionalis a text description of this sample value.
SampleUnitstringoptionalis a description of the unit of messurement for this sample.
SampleGroupstringoptionaldesignates (in some datasrvs) that all samplepoints in that group should be handled (displayed) together. The DCM system itself places no meaning on this group affiliation.
SamplesSavedinteger > 0mandatoryis the number of values collected that is saved as minimum in the Store'n'Forward database. If set to 0 the Samplepoint isn't stored in the S'n'F database and thus not delivered to cloud, but can be used for aggregations.
OnlySaveOnChangedbooloptionalcontrol if new sample values should only be saved to the store-and-forward database if the values have changed since last sample. If not set, it is false.
SampleDataTypestring-enummandatoryThe type of data collected. The possible values are: "bool" (1 bit), "sbyte" (8 bit signed), "byte" (8 bit unsigned), "int16" (16 bit signed), "uint16" (16 bit unsigned), "int32" (32 signed), "uint32" (32 bit unsigned), "int64" (64 bit signed), "uint64" (64 bit unsigned), "float" (32 bit), "double" (64 bit), "string" (variable text up to 24575 bytes. Includes terminating NUL), "data" (variable variable data up to 24575 bytes).
SampleLowerLimitinteger/doubleoptionalThe lower limit for the collected data. If the collected data value is less than SampleLowerLimit it is evaluated inaccordance to SampleLimitDiscard and SampleLimitAlarm.
SampleUpperLimitinteger/doubleoptionalThe upper limit for the collected data. If the collected data value is more than SampleUpperLimit it is evaluated inaccordance to SampleLimitDiscard and SampleLimitAlarm.
SampleLimitDiscardboolmaybe-optionalControls if a sample limit violation results in the sample value being discarded. Mandatory if either SampleLowerLimit or SampleUpperLimit is present.
SampleLimitAlarmboolmaybe-optionalControls if a sample limit violation generates an alarm. Mandatory if either SampleLowerLimit or SampleUpperLimit is present.
InternalDataObjectmaybe-optionalDescription of the internal behavior of this sample point. Mandatory if the protocol type is "Internal".



Aggregation

The InternalData object contains the following elements:
FunctionTypeImportanceDescription
InternalFunctionstring-enummandatoryThis is the internal function to be performed. The currently possible values are:
"SystemTemperature" (in centigrades Celcius),
"CPULoad" (in percent),
"FreeMem" (in kB),
"UTCRTC" UTC Real TIme Clock broken into 8 separate values,
"DigitalInput" (as 0/1),
"IngressRate" (in bytes/s),
"EgressRate" (in bytes/s),
"DBCachesize" (in bytes),
"DBSize" (in bytes),
"GSMRssi" (in dBm),
"GSMBer" (in percent),
"GSMOperator" (text string),
"GSMTechnology" (text string: "4G", "3G", "GPRS" etc.).
InternalIndexinteger >= 0maybe-optionalIf InternalFunction is "DigitalInput" this is the mandatory index of the Digital I/O input port to collect value from. If InternalFunction is "UTCRTC" this is the mandatory index of the time:
0 - second (0-59),
1 - minute (0-59),
2 - hour (0-23),
3 - day of the month (1-31),
4 - month (0-11),
5 - Year (-1900),
6 - day of the week (0-6, Sunday = 0),
7 - day in the year (0-365, Jan 1st = 0).
InternalFieldnamestringoptional)Used when the InternalFunction is "IngressRate" as a nameref for the sample to show the ingress rate for or when the InternalFunction is "EgressRate" as the name of a Dataserver to show the egress rate for. If not specified, the rate is the total ingress or egress rate.
InternalSampleIntervalinteger >= 0mandatoryThe number of seconds between each sample of this Internal object. If the interval is 0, only eventdriven polling is used.


Aggregation samplepoint for condition monitoring (Eventbased logging)
{
  "CollectorDescription": "SDCM Internal Values Server",
  "CollectorName": "demointernal",
  "Protocol": "Internal",
  "SamplePoints": [
    {
      "SampleDataType": "double",
      "SampleDescription": "CPU load",
      "SampleLimitAlarm": false,
      "SampleLimitDiscard": false,
      "SampleLowerLimit": -1000,
      "SampleName": "CPU",
      "SampleUpperLimit": 1000,
      "SamplesSaved": 3000000,
      "InternalData": {
        "InternalFunction": "CPULoad",
        "InternalSampleInterval": 1
      }
    },
    {
      "SampleDataType": "double",
      "SampleDescription": "FreeMem",
      "SampleLimitAlarm": false,
      "SampleLimitDiscard": false,
      "SampleLowerLimit": -1000,
      "SampleName": "FreeMemory",
      "SampleUpperLimit": 1000,
      "SamplesSaved": 3000000,
      "InternalData": {
        "InternalFunction": "FreeMem",
        "InternalSampleInterval": 1
      }
    },
    {
      "SampleDataType": "double",
      "SampleDescription": "SystemTemperature",
      "SampleLimitAlarm": false,
      "SampleLimitDiscard": false,
      "SampleLowerLimit": -1000,
      "SampleName": "SystemTemperature",
      "SampleUpperLimit": 1000,
      "SamplesSaved": 3000000,
      "InternalData": {
        "InternalFunction": "SystemTemperature",
        "InternalSampleInterval": 1
      }
    }
  ]
}
See complete aggregation examples here:
Creation date: 11/12/2019 14:10 (skr@secomea.com)      Updated: 04/09/2020 15:59 (tvo@secomea.com)