System Overview

class activelogic.SystemOverview

This is the resource for System Overview.

async SystemOverview.list(cls)

Generic list function for all kinds of data that belong to this resource.

Parameters

cls – An object dataclass that determines what kind of data to get.

Returns

A list with objects of the given dataclass.

Raises
  • ValueError – Invalid dataclass.

  • PLDBNewDataCommitted – Conflict with new data committed by an other session.

The following data can be listed by this resource:

  • GraphTemplate: Lists all graph templates.

  • GraphSystem: Lists all systems defined in systems overview.

  • SystemInformation: Lists system data for the systems to which the Python API is connected.

The list may or may not be cached depending on if cache_enabled is set.

Given that you have done the following:

>>> import activelogic as api
>>> conn = api.sync_connect(<IP or host>, <user>, <password>)
>>> so = conn.system_overview()

It is now possible to get information using:

>>> so.list(api.GraphTemplate)
(3, 'example name')
>>> so.list(api.GraphSystem)
[GraphSystem(systemid='000BAB666E93', name='Undefined', host='255.1.2.3')]
>>> so.list(api.SystemInformation)
[SystemInformation(name='system', value='', children=[SystemInformation(name='sys_model', value='PL8960', children=[]),  ...
class activelogic.GraphSystem

Information about a System in the SystemOverview. Get this list by calling list(GraphSystem).

Parameters
  • systemid (str) – SystemID (MachineID).

  • name (str) – Name given to identify this system.

  • host (str) – Host name or IP address.

  • lastupdate (datetime) – ISO Date/time when last updated.

  • firstupdate (datetime) – ISO Date/time when first updated.

  • distversion (str) – Version of distribution/firmware.

  • drdlrevision (str) – DRDL Revision.

  • values (list) – Read-only list of TemplateValue objects.

  • configmd5 (str) – Config md5sum.

class activelogic.GraphTemplateValueType

Defines a set of constants for the type of a template value

Variables
  • STRING – Type of the value is a string.

  • INT – Type of the value is an integer.

  • RATE – Type of the value is an integer representing a rate (per second).

  • BANDWIDTH – Type of the value is an integer representing bandwidth (bps)

  • TRANSFER – Type of the value is an integer representing bytes transfered.

  • DURATION – Type of the value is a time duration.

  • TIMESTAMP – Type of the value is a timestamp.

  • BITMASK – Type of the value is an integer representing a bitmask.

  • INT_K – Type of the value is an integer measuring thousands.

class activelogic.GraphTemplateAggregationType

Defines a set of constants for the aggregation type of a template value

Variables
  • TOTAL – Value is a total since system restart.

  • RATE – Value is a speed or rate.

  • MAX – Value is the maximum reached since system restart.

  • MIN – Value is the minimum reached since system restart.

  • MAX_TIME – Time when maximum rate was observed.

  • MIN_TIME – Time when minimum rate was observed.

class activelogic.GraphTemplateType

Defines a set of constants for the type of a GraphTemplate object

Variables
  • SYSDIAG – Value is from System Diagnostics.

  • CHANNEL – Value is from Channel Statistics.

  • CHANNEL_LINK – Value is from Channel Statistics with a channel link.

class activelogic.GraphTemplate

Object representing a value selected for System Overview, what kind of value it is, and how to interpret individual graph values. Returned in a list by list(GraphTemplate).

Parameters
  • templateid (int) – Internal ID, used as a parameter when calling graph_data().

  • name (str) – Name of the template.

  • type (int) – One of the types in GraphTemplateValueType.

  • flags (int) – Boolean flags.

  • vtype (GraphTemplateAggregationType) – Aggregated type, one of the types in GraphTemplateAggregationType.

  • desc1 (int) – See the table below for how this field is used in different types of templates.

  • desc2 (int) – See the table below for how this field is used in different types of templates.

  • ttype (int) – Template type, one of the types in GraphTemplateType.

  • descstr (str) – String description of value (usually OID).

Content of desc1 and desc2

Template type

desc1

desc2

SYSDIAG

Zone

Value id in zone

CHANNEL

Channel id

Netdevice sysdiag id

CHANNEL_LINK

Channel id

Link

async SystemOverview.graph_data(templateid, systemid)

Returns a list of graph data for the specified system. Each value represent one minute, and there are 1440 values (24 hours). Each value is an int with the value, or False if data was missing at that time. If a system has not been running long enough to have 1440 values, the remaining values will show up as (-1, ‘Never’).

Parameters
  • templateid (int) – The templateid to use, see list(GraphTemplate).

  • systemid (str) – The systemid for which to fetch data. See list(GraphSystem).

Returns

A list of tuples of (int or False, timestamp)

Raises
  • TypeError – Invalid type of systemid or templateid.

  • KeyError – Invalid systemid or templateid.

  • PLDBNewDataCommitted – Conflict with new data committed by another session.

>>> templates = so.list(GraphTemplate)
>>> systems = so.list(GraphSystem)
>>> so.graph_data(templates[0].templateid, systems[0].systemid)
class activelogic.SystemInformation

Information about a System in the SystemOverview. Get this list by calling list(SystemInformation).

Parameters
  • name (str) – SystemID (MachineID).

  • value (str) –

  • children (List of SystemInformation objects) – Additional values for the system.

Example of printing children recursively with indent:

import activelogic as al
conn = al.sync_connect("127.0.1.2", "admin", "password")
so = conn.system_overview()
systems_info = so.list(al.SystemInformation)

def printsysinfo(systems_info, indent=0):
    for info in systems_info:
        if info.children:
            print('|  ' * indent + "name: {}, value: {}".format(info.name, info.value))
            printsysinfo(info.children, indent + 1)
        else:
            print('|  ' * indent + "name: {}, value: {}".format(info.name, info.value))

printsysinfo(systems_info)

Example of output:

name: system, value:
  |name: sys_model, value: <some value>
  |name: bmc_version, value: <some value>
  |name: boot_time, value: 1623843427
  |name: dist_version, value: 23.20.00.8-2106161136
  |name: sys_machineid, value: <some value>
  |name: firmware_version, value: 6520E110
  |name: raid_type, value: software
  |name: raid, value:
  |  |name: adapter, value:
  |  |  |name: 0, value:
  |  |  |  |name: ld, value:
  |  |  |  |  |name: 0, value:
  |  |  |  |  |  |name: raidlevel, value: raid1
  |  |  |  |  |  |name: spans, value:
  |  |  |  |  |  |  |name: 0, value:
  |  |  |  |  |  |  |  |name: state, value: optimal
  |  |  |  |  |  |  |  |name: disks, value:
  |  |  |  |  |  |  |  |  |name: 1, value:
  |  |  |  |  |  |  |  |  |  |name: snr, value: <some value>
  |  |  |  |  |  |  |  |  |  |name: vendor-model, value: <some value>
  |  |  |  |  |  |  |  |  |  |name: label, value: Upper disk
  |  |  |  |  |  |  |  |  |  |name: scsiid, value: 1:0:0:0
  |  |  |  |  |  |  |  |  |  |name: state, value: optimal
  |  |  |  |  |  |  |  |  |name: 0, value:
  |  |  |  |  |  |  |  |  |  |name: snr, value: <some value>
  |  |  |  |  |  |  |  |  |  |name: vendor-model, value: <some value>
  |  |  |  |  |  |  |  |  |  |name: label, value: Lower disk
  |  |  |  |  |  |  |  |  |  |name: scsiid, value: 2:0:0:0
  |  |  |  |  |  |  |  |  |  |name: state, value: optimal
  |  |  |  |  |  |name: state, value: optimal
  |name: raid_status, value: Adapter 0, logical device 0: optimal