Warning: this code is provided on a best effort basis and is not in any way officially supported or sanctioned by Cohesity. The code is intentionally kept simple to retain value as example code. The code in this repository is provided as-is and the author accepts no liability for damages resulting from its use.
This python script lists the currently running replication tasks, from oldest to newest.
- replicationQueue.py: the main python script
- pyhesity.py: the Cohesity REST API helper module
You can download the scripts using the following commands:
# download commands
curl -O https://raw.githubusercontent.com/bseltz-cohesity/scripts/master/python/replicationQueue/replicationQueue.py
curl -O https://raw.githubusercontent.com/bseltz-cohesity/scripts/master/python/pyhesity.py
chmod +x replicationQueue.py
# end download commandsPlace both files in a folder together and run the main script like so:
./replicationQueue.py -v mycluster -u myuser -d mydomain.net- -v, --vip: DNS or IP of the Cohesity cluster to connect to
- -u, --username: username to authenticate to Cohesity cluster
- -d, --domain: (optional) domain of username (default is local)
- -n, --numRuns: (optional) number of runs per job to inspect (default is 9999)
The helper module provides functions to simplify operations such as authentication, api calls, storing encrypted passwords, and converting date formats. The module requires the requests python module.
Please see here for more information: https://github.com/bseltz-cohesity/scripts/tree/master/python#cohesity-rest-api-python-examples