UNSOLVED

sbocquet

updated

6 years ago

S

sbocquet

2 Posts

0

940

December 1st, 2020 08:00

RecoverPoint: Journal Protection Window in a 'static' format

Hi,

Is there a way by CLI to have the Journal Protection Window of a CG in a 'static' time format ?

e.g. :

1 day, 2 hours => 26 hours

1 week, 1 day, 1 hour => 193 hours

I need a static format in order to parse it and then follow this value with Zabbix.

Thx for help

 

  • DELL-Josh Cr

    Community Manager

    •

    9801 Posts

    •

    45350 Points

    741

    0

    Posted December 2nd, 2020 09:00

    Hi,

    I was not able to find a way to change the time format.

  • Idan

    4 Apprentice

    •

    675 Posts

    689

    0

    Posted December 8th, 2020 08:00

    That's right, it cannot be controlled in the CLI today. We will enhance it in the future in the H5 plugin and the new RESTful API.

    That being said, the CLI output can certainly be parsed. Let me know how it goes.

     

    Regards,

    Idan

  • sbocquet

    2 Posts

    684

    1

    Posted December 8th, 2020 09:00

    Hi,

    I have parsed the result with a awk command but it's a big pain in the butt !

    ssh $1@$2 -i $3 get_group_statistics group=$4 | sed "s/^ [ ]*//" | grep "Value: " | sed "s/Value: //" | awk '{if ($$2 ~ /days/) {print $$1=$$1*24+$$3} else if ($$2 ~ /hr/) {print $$1} else if ($$2 ~ /weeks/) {print $$1=($$1*168)+($$3*24)}}'

    Enjoy

  • Idan

    4 Apprentice

    •

    675 Posts

    666

    0

    Posted December 8th, 2020 11:00

    Great job and all in a one-liner  

    We'll make it better, don't worry about it

     

    Thanks,

    Idan