I created simple prompt that shows coloured ceph status and you can include in your ~/.bashrc:
It will show status in:
green if HEALTH__OK
red if HEALTH_ERR
yellow if HEALTH_WARN
as shown on attachment.
Bash:
ceph_status() { ceph health | awk '/HEALTH_OK/ {print "\033[32m" $0 "\033[0m"}; /HEALTH_ERR/ {print "\033[31m" $0 "\033[0m"}; /HEALTH_WARN/ {print "\033[33m" $0 "\033[0m"}'; }
PS1='$(ceph_status)\n[\u@\h \W]\$ '
It will show status in:
green if HEALTH__OK
red if HEALTH_ERR
yellow if HEALTH_WARN
as shown on attachment.