Gluster vol info - command to retrive information of gluster volumes

The parsers here provide information about the time sources used by glusterd.

class insights.parsers.gluster_vol.GlusterVolInfo(context, extra_bad_lines=None)[source]

Bases: LegacyItemAccess, CommandParser

This parser processes the output of the command gluster vol info and provides the information as a dictionary.

The LegacyItemAccess class provides some helper functions for dealing with a class having a data attribute.

Sample input:

Volume Name: test_vol
Type: Replicate
Volume ID: 2c32ed8d-5a07-4a76-a73a-123859556974
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: 172.17.18.42:/home/brick
Brick2: 172.17.18.43:/home/brick
Brick3: 172.17.18.44:/home/brick

Examples

>>> parser_result_v_info['test_vol']['Type']
'Replicate'

Override the base class parse_content to parse the output of the ‘’’gluster vol info’’’ command. Information that is stored in the object is made available to the rule plugins.

data

Dictionary containing each of the key:value pairs from the command output.

Type:

dict

Raises:

ParseException -- raised if data is not parsable.

parse_content(content)[source]

This method must be implemented by classes based on this class.

class insights.parsers.gluster_vol.GlusterVolStatus(context, extra_bad_lines=None)[source]

Bases: LegacyItemAccess, CommandParser

This parser processes the output of the command gluster vol status and provides the information as a dictionary.

The LegacyItemAccess class provides some helper functions for dealing with a class having a data attribute.

Sample input:

Status of volume: test_vol
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick 172.17.18.42:/home/brick              49152     0          Y       26685
Brick 172.17.18.43:/home/brick              49152     0          Y       27094
Brick 172.17.18.44:/home/brick              49152     0          Y       27060
Self-heal Daemon on localhost               N/A       N/A        Y       7805
Self-heal Daemon on 172.17.18.44            N/A       N/A        Y       33400
Self-heal Daemon on 172.17.18.43            N/A       N/A        Y       33680

Task Status of Volume test_vol
------------------------------------------------------------------------------
There are no active volume tasks

Examples

>>> parser_result_v_status['test_vol'][0]["Online"]
'Y'

Override the base class parse_content to parse the output of the ‘’’gluster vol status’’’ command. Information that is stored in the object is made available to the rule plugins.

data

Dictionary containing each of the key:value pairs from the command output.

Type:

dict

Raises:

ParseException -- raised if data is not parsable.

parse_content(content)[source]

This method must be implemented by classes based on this class.