vRops

vRops undocumented API calls

Over time I have had the please of using different API calls to vRops. To begin with a lot around the official vRops API, as can be seen here. Some of it was documented in the internal API some were not which can be seen here. In this blog post I explorer some more API calls. The calls here is of a different nature. Were as the prior was around doing precis calls to get a specific result. These call are of a more generic nature. These have to do with the vRops environment. These calls can be used to get the status of the environment and check that every thing looks on par with expectations.

I find a few of the vRops undocumented API calls to very useful. I will go over them quickly and just write a few words on use case. I guess it should be obvious from the output what it can be used for, but anyway here it is. With comments and all.

 

This lists the status and capabilities of a given vRops cluster node.

https://vRops.MichaelRyom.dk/casa/deployment/slice/role/status
{“enabled”:{“DATA”:true,
“ADMIN”:true,
“REPLICA”:false,
“UI”:true,
“REMOTE_COLLECTOR”:false,
“ONE_WAY_REMOTE_COLLECTOR”:false},
“configurationRunning”:false,
“last_modified”:”2016-05-16 00:23:01″,
“is_ha_enabled”:false,
“is_configuration_running”:false,
“slice_uuid”:”894fdd33-c145-44bb-adbd-a52ad73a9569″,
“admin_and_replica_slices”:[“10.10.10.10”]}

Here is a quick over look of some metrics, like response times, failed counter etc.

https://vRops.MichaelRyom.dk/casa/sysadmin/slice/metrics/casa
{“total_request_count”:15,
“average_response_time_ms”:26,
“minimum_response_time_ms”:0,
“maximum_response_time_ms”:185,
“server_error_count”:0,
“failed_authentication_count”:0,
“failed_authorization_count”:0,
“metrics_start_time”:1471807724715,
“metrics_elapsed_time_ms”:303457}

Need to know of a vRops node is online or offline, check the state with this API call.

https://vRops.MichaelRyom.dk/casa/sysadmin/slice/status
{“slice_state”:”ONLINE”,
“slice_sub_state”:”NOT_APPLICABLE”}

We can also check to see if the time of a node is correct.

https://vRops.MichaelRyom.dk/casa/sysadmin/slice/ntp/current_time
{“currentTime”:1471808167563}

Get an overview of which roles a vRops node holds.

https://vRops.MichaelRyom.dk/casa/view/slice
{“slice_uuid”:null,
“slice_name”:null,
“slice_address”:null,
“slice_online_state”:”ONLINE”,
“role_status”:{“DATA”:true,
“ADMIN”:true,
“REPLICA”:false,
“UI”:true,
“REMOTE_COLLECTOR”:false,
“ONE_WAY_REMOTE_COLLECTOR”:false},
“slice_status”:null}

Get the status of a specific management pack.

https://vRops.MichaelRyom.dk/casa/upgrade/slice/pak/managementpackforstoragedevices-6043668305/status
{“pak_id”:”managementpackforstoragedevices-6043668305″,
“pak_state”:”NOT_DISTRIBUTED”,
“pak_install_status”:”INITIAL”,
“current_action”:null,
“node_unchanged”:true,
“failed_details”:null,
“log_links”:[]}

Get the release numbers, platform and also installed modules and their versions.

https://vRops.MichaelRyom.dk/casa/sysadmin/slice/vmware/buildinfo
{“numericReleaseNumber”:true,
“build_number”:”3774215″,
“release_number”:”6.2.1.3774215″,
“second_build_number”:”3774215″,
“second_release_number”:”6.2.1.3774215″,
“os_name”:”Linux”,
“is_va”:true,”suite_base_dir”:”/usr/lib”,
“suite_platform”:”VA_LINUX”,
“installed_modules”:[
“vmware-vcops-6.0-MPforvSphere-6.0-3774214.pak”,
“epops-os-and-availability-1.0.3057863.pak”,
“VMware-Log-Insight-Agent-3.0.0-2985111.noarch.rpm”,
“vmware-jre-1.8.0_71-1server.x86_64.rpm”,
“vmware-vcops-6.2.1-3774210.x86_64.rpm”,
“vmware-vcops-web-admin-6.2.1-3774210.x86_64.rpm”,
“VMware-Postgres-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-client-jdbc-9.3.9.0-2921310.noarch.rpm”,
“VMware-Postgres-contrib-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-extras-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-libs-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-osslibs-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-osslibs-server-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-pg_rewind-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-pg_top-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-pgbouncer-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-pgpool-II-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-plperl-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-plpython-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-plv8-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-server-9.3.9.0-2921310.x86_64.rpm”,
“vmware-casa-1.0.0-3774213.x86_64.rpm”,
“pivotal-tc-server-standard-3.1.2-RELEASE.noarch.rpm”,
“vmware-vcopssuite-utilities-1.0.0-3774208.x86_64.rpm”]}

Again get the state of a vRops slice.

https://vRops.MichaelRyom.dk/casa/sysadmin/slice/online_state
{“slice_online_state”:”ONLINE”,
“slice_online_state_comment”:””,
“local_last_modified_time”:1463350981000,
“local_online”:true}

Check if there is enough disk space available. Useful as a pre check before doing any thing in vRops. Though it will do a check by it self.

https://vRops.MichaelRyom.dk/casa/status/slice/environment
{“env_requirements”:{“DISKSPACE”:true}}

Get the total space and space left on disk.

https://vRops.MichaelRyom.dk/casa/status/slice/environment/info
{“disk_space”:{“STORAGE_DB”:{“total_space”:221943689216,
“usable_space”:148225499136},
“/data/log”:{“total_space”:21137846272,
“usable_space”:11972939776}}}

This is a nice one. Get the cluster settings including cluster members, their name and ip. A good starting point for querying for other information.

https://vRops.MichaelRyom.dk/casa/sysadmin/cluster/membership
{“onlineState”:”ONLINE”,
“cluster_name”:”vRops.MichaelRyom.dk”,
“is_ha_enabled”:false,
“ha_transition_state”:”NONE”,
“initialization_state”:”NONE”,
“remove_node_state”:”NONE”,
“document_time”:1469179027595,
“online_state”:”ONLINE”,
“online_state_time”:1469179026729,
“online_state_reason”:””,
“cluster_members”:[],
“admin_slices”:[],
“installation_state”:”DONE”,
“slices”:{“91fbe385-b60c-46e1-8ebf-403662b08fc1”:{“slice_uuid”:”91fbe385-b60c-46e1-8ebf-403662b08fc1″,
“is_admin_node”:true,
“ip_address”:”vRops1.MichaelRyom.dk”,
“preferred_addresses”:{},
“slice_name”:”vRops1.MichaelRyom.dk”,
“membership_state”:null},
“ed7a5187-dba7-42fe-b367-8fcc08522838”:{“slice_uuid”:”ed7a5187-dba7-42fe-b367-8fcc08522838″,
“is_admin_node”:false,
“ip_address”:”vRops2.MichaelRyom.dk”,
“preferred_addresses”:{},
“slice_name”:”vRops2.MichaelRyom.dk”,
“membership_state”:null},
“384ab10c-0f6b-4717-9975-8ba5eba568e4”:{“slice_uuid”:”384ab10c-0f6b-4717-9975-8ba5eba568e4″,
“is_admin_node”:false,
“ip_address”:”vRops3.MichaelRyom.dk”,
“preferred_addresses”:{},
“slice_name”:”vRops3.MichaelRyom.dk”,
“membership_state”:null}}}

This gives information on a slice/node, very useful with the above API call.

https://vRops.MichaelRyom.dk/casa/view/slice/detail
{“slice_uuid”:null,
“slice_name”:null,
“slice_address”:null,
“slice_online_state”:”ONLINE”,
“role_status”:{“DATA”:true,
“ADMIN”:true,
“REPLICA”:false,
“UI”:true,
“REMOTE_COLLECTOR”:false,
“ONE_WAY_REMOTE_COLLECTOR”:false},
“slice_status”:null,
“stat_counts”:[{“count_type”:”METRICS”,
“count”:308188.0},
{“count_type”:”RESOURCES”,
“count”:966.0}],
“build_info”:{“numericReleaseNumber”:true,
“build_number”:”3774215″,
“release_number”:”6.2.1.3774215″,
“second_build_number”:”3774215″,
“second_release_number”:”6.2.1.3774215″,
“os_name”:”Linux”,
“is_va”:true,
“suite_base_dir”:”/usr/lib”,
“suite_platform”:”VA_LINUX”,
“installed_modules”:[“vmware-vcops-6.0-MPforvSphere-6.0-3774214.pak”,
“epops-os-and-availability-1.0.3057863.pak”,
“VMware-Log-Insight-Agent-3.0.0-2985111.noarch.rpm”,
“vmware-jre-1.8.0_71-1server.x86_64.rpm”,
“vmware-vcops-6.2.1-3774210.x86_64.rpm”,
“vmware-vcops-web-admin-6.2.1-3774210.x86_64.rpm”,
“VMware-Postgres-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-client-jdbc-9.3.9.0-2921310.noarch.rpm”,
“VMware-Postgres-contrib-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-extras-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-libs-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-osslibs-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-osslibs-server-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-pg_rewind-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-pg_top-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-pgbouncer-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-pgpool-II-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-plperl-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-plpython-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-plv8-9.3.9.0-2921310.x86_64.rpm”,
“VMware-Postgres-server-9.3.9.0-2921310.x86_64.rpm”,
“vmware-casa-1.0.0-3774213.x86_64.rpm”,
“pivotal-tc-server-standard-3.1.2-RELEASE.noarch.rpm”,
“vmware-vcopssuite-utilities-1.0.0-3774208.x86_64.rpm”]},
“sync_status”:null}

Not sure of there’s an use case here.

https://vRops.MichaelRyom.dk/casa/config/slice/gemfire
{“serversCount”:1}

https://vRops.MichaelRyom.dk/casa/security/ping
{“is_admin_slice”:true}

https://vRops.MichaelRyom.dk/casa/private/security/passwordsync
{“os_user_data”:{“username”:”admin”,
“password”:null,
“hashed_password”:”ihfo9)(/)(oijoicdo982ndl””#£$@$@£@fdok098902¤&¤%ewi3334iof”#””””FDFdfj8mxzlpaæ-zø%&/(,do3293ld”},
“admin_user_data”:{“hashed_password”:”#Dfmd83%&¤%@@$fkmdf83″,
“hashed_password_history”:null,
“num_failed_attempts”:0,
“time_of_last_failure”:1471807543021}}

https://vRops.MichaelRyom.dk/casa/sysadmin/slice/metrics/java-lang
{“system_cpu_usage”:0.05551891095361729,
“thread_count”:63,
“current_heap_size”:281,
“max_heap_size”:505,
“committed_memory”:505,
“used_memory”:31970,
“free_physical_memory”:270}

https://vRops.MichaelRyom.dk/casa/upgrade/slice/pak/ep-ops-os-and-availability-103057863/validation/status
{“slice_address”:”vRops.MichaelRyom.dk”,
“http_code”:200,
“validation_results_available”:false,
“links”:[]}

And then there are the unknown API calls

https://vRops.MichaelRyom.dk/casa/private/upgrade/slice/pak/reserved/platform_compatibility?vcops_platform=va_linux
{“error_message_key”:”general.failure”,
“error_arguments”:[“org.springframework.beans.TypeMismatchException: Failed to convert value of type ‘java.lang.String’ to required type ‘com.vmware.vcops.casa.sysadmin.buildinfo.SuitePlatform’; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type @org.springframework.web.bind.annotation.RequestParam com.vmware.vcops.casa.sysadmin.buildinfo.SuitePlatform for value ‘va_linux’; nested exception is java.lang.IllegalArgumentException: No enum constant com.vmware.vcops.casa.sysadmin.buildinfo.SuitePlatform.va_linux”]}

https://vRops.MichaelRyom.dk/casa/private/upgrade/cluster/pak/core
UNKNOWN!

https://vRops.MichaelRyom.dk/casa/config/slice/webroot
UNKNOWN!

https://vRops.MichaelRyom.dk/casa/sysadmin/cluster/ntp/local_slice
UNKNOWN!

https://vRops.MichaelRyom.dk/casa/private/upgrade/slice/pak/core/vrealizeoperationsmanagerenterprise-6213774217/true
UNKNOWN!

https://vRops.MichaelRyom.dk/casa/private/upgrade/slice/pak/vmwarevsphere-603528901/operation/cleanup
UNKNOWN!

https://vRops.MichaelRyom.dk/casm/stats
Full authentication is required to access this resource

One thought on “vRops undocumented API calls

Leave a Reply

Your email address will not be published. Required fields are marked *