Add support for enable/disable keepalive detail
This commit is contained in:
parent
79f284a0a9
commit
443108f53d
|
@ -121,6 +121,10 @@ pvc:
|
||||||
stdout_logging: True
|
stdout_logging: True
|
||||||
# log_keepalives: Enable or disable keepalive logging
|
# log_keepalives: Enable or disable keepalive logging
|
||||||
log_keepalives: True
|
log_keepalives: True
|
||||||
|
# log_keepalive_cluster_details: Enable or disable node status logging during keepalive
|
||||||
|
log_keepalive_cluster_details: True
|
||||||
|
# log_keepalive_storage_details: Enable or disable node storage logging during keepalive
|
||||||
|
log_keepalive_storage_details: True
|
||||||
# console_log_lines: Number of console log lines to store in Zookeeper per VM
|
# console_log_lines: Number of console log lines to store in Zookeeper per VM
|
||||||
console_log_lines: 1000
|
console_log_lines: 1000
|
||||||
# networking: PVC networking configuration
|
# networking: PVC networking configuration
|
||||||
|
|
|
@ -145,6 +145,8 @@ def readConfig(pvcd_config_file, myhostname):
|
||||||
'file_logging': o_config['pvc']['system']['configuration']['logging']['file_logging'],
|
'file_logging': o_config['pvc']['system']['configuration']['logging']['file_logging'],
|
||||||
'stdout_logging': o_config['pvc']['system']['configuration']['logging']['stdout_logging'],
|
'stdout_logging': o_config['pvc']['system']['configuration']['logging']['stdout_logging'],
|
||||||
'log_keepalives': o_config['pvc']['system']['configuration']['logging']['log_keepalives'],
|
'log_keepalives': o_config['pvc']['system']['configuration']['logging']['log_keepalives'],
|
||||||
|
'log_keepalive_cluster_details': o_config['pvc']['system']['configuration']['logging']['log_keepalive_cluster_details'],
|
||||||
|
'log_keepalive_storage_details': o_config['pvc']['system']['configuration']['logging']['log_keepalive_storage_details'],
|
||||||
'console_log_lines': o_config['pvc']['system']['configuration']['logging']['console_log_lines'],
|
'console_log_lines': o_config['pvc']['system']['configuration']['logging']['console_log_lines'],
|
||||||
'keepalive_interval': o_config['pvc']['system']['fencing']['intervals']['keepalive_interval'],
|
'keepalive_interval': o_config['pvc']['system']['fencing']['intervals']['keepalive_interval'],
|
||||||
'fence_intervals': o_config['pvc']['system']['fencing']['intervals']['fence_intervals'],
|
'fence_intervals': o_config['pvc']['system']['fencing']['intervals']['fence_intervals'],
|
||||||
|
@ -1130,24 +1132,25 @@ def update_zookeeper():
|
||||||
),
|
),
|
||||||
state='t'
|
state='t'
|
||||||
)
|
)
|
||||||
logger.out(
|
if config['log_keepalive_cluster_details']:
|
||||||
'{bold}Domains:{nofmt} {domcount} '
|
logger.out(
|
||||||
'{bold}Networks:{nofmt} {netcount} '
|
'{bold}Domains:{nofmt} {domcount} '
|
||||||
'{bold}VM memory [MiB]:{nofmt} {allocmem} '
|
'{bold}Networks:{nofmt} {netcount} '
|
||||||
'{bold}Free memory [MiB]:{nofmt} {freemem} '
|
'{bold}VM memory [MiB]:{nofmt} {allocmem} '
|
||||||
'{bold}Used memory [MiB]:{nofmt} {usedmem} '
|
'{bold}Free memory [MiB]:{nofmt} {freemem} '
|
||||||
'{bold}Load:{nofmt} {load}'.format(
|
'{bold}Used memory [MiB]:{nofmt} {usedmem} '
|
||||||
bold=logger.fmt_bold,
|
'{bold}Load:{nofmt} {load}'.format(
|
||||||
nofmt=logger.fmt_end,
|
bold=logger.fmt_bold,
|
||||||
domcount=this_node.domains_count,
|
nofmt=logger.fmt_end,
|
||||||
freemem=this_node.memfree,
|
domcount=this_node.domains_count,
|
||||||
usedmem=this_node.memused,
|
freemem=this_node.memfree,
|
||||||
load=this_node.cpuload,
|
usedmem=this_node.memused,
|
||||||
allocmem=this_node.memalloc,
|
load=this_node.cpuload,
|
||||||
netcount=len(network_list)
|
allocmem=this_node.memalloc,
|
||||||
),
|
netcount=len(network_list)
|
||||||
)
|
),
|
||||||
if enable_storage:
|
)
|
||||||
|
if enable_storage and config['log_keepalive_storage_details']:
|
||||||
logger.out(
|
logger.out(
|
||||||
'{bold}Ceph cluster status:{nofmt} {health_colour}{health}{nofmt} '
|
'{bold}Ceph cluster status:{nofmt} {health_colour}{health}{nofmt} '
|
||||||
'{bold}Total OSDs:{nofmt} {total_osds} '
|
'{bold}Total OSDs:{nofmt} {total_osds} '
|
||||||
|
|
Loading…
Reference in New Issue