saphostctrl - Commands saphostctrl
¶
Parsers included in this module are:
SAPHostCtrlInstances - Command saphostctrl -function GetCIMObject -enuminstances SAPInstance
¶
-
class
insights.parsers.saphostctrl.
SAPHostCtrlInstances
(context, extra_bad_lines=None)[source]¶ Bases:
insights.core.CommandParser
,list
This class provides processing for the output of the
/usr/sap/hostctrl/exe/saphostctrl -function GetCIMObject -enuminstances SAPInstance
command on SAP systems.Sample output of the command:
********************************************************* SID , String , D89 SystemNumber , String , 88 InstanceName , String , HDB88 InstanceType , String , HANA Test Hostname , String , hdb88 FullQualifiedHostname , String , hdb88.example.com IPAddress , String , 10.0.0.88 SapVersionInfo , String , 749, patch 211, changelist 1754007 ********************************************************* SID , String , D90 SystemNumber , String , 90 InstanceName , String , HDB90 InstanceType , String , HANA Test Hostname , String , hdb90 FullQualifiedHostname , String , hdb90.example.com IPAddress , String , 10.0.0.90 SapVersionInfo , String , 749, patch 211, changelist 1754007
Examples
>>> type(sap_inst) <class 'insights.parsers.saphostctrl.SAPHostCtrlInstances'> >>> sap_inst[1]['SID'] 'D90' >>> sap_inst[0]['SapVersionInfo'] '749, patch 211, changelist 1754007' >>> sap_inst[1]['InstanceType'] 'HANA Test' >>> sap_inst.types ['HDB'] >>> sorted(sap_inst.sids) ['D89', 'D90']
-
instances
¶ The list of instances found in the cluster output.
Type: list
-
sids
¶ The list of SID found in the cluster output.
Type: list
-
types
¶ The list of short instance types. The short instance type is set as the characters of the InstanceName before the SystemNumber.
Type: list
Raises: SkipComponent
-- When input is empty.ParseException
-- When input cannot be parsed.
-
data
¶ List of dicts where keys are the lead name of each line and values are the string value.
Type: (list)
-