get_ranger_services_status

Use this command to view status of the ranger services, optionally on a specified cluster. It does not necessarily indicate that traffic is flowing.

This API is available in Guardium V10.1.4 and later.

REST API syntax

This API is available as a REST service with the GET method. Call this API as follows:
GET https://[Guardium hostname or IP address]:8443/restAPI/get_ranger_services_status

GuardAPI syntax

get_ranger_services_status parameter=value

Parameters

Parameter Value type Description
clusterName String Use this parameter to restrict the output to the status of this cluster only.
api_target_host String

Specifies the target hosts where the API executes. Valid values:
  • all_managed: execute on all managed units but not the central manager
  • all: execute on all managed units and the central manager
  • group:<group name>: execute on all managed units identified by <group name>
  • host name or IP address of a managed unit: specified from the central manager to execute on a managed unit.  For example, api_target_host=10.0.1.123.
  • host name or IP address of the central manager: specified from a managed unit to execute on the central manager. For example, api_target_host=10.0.1.123.

IP addresses must conform to the IP mode of your network. For dual IP mode, use the same IP protocol with which the managed unit is registered with the central manager. For example, if the registration uses IPv6, specify an IPv6 address. The hostname is independent of IP mode and can be used with any mode.

GrdAPI example

To view the status on the cluster named Cluster4:

grdapi get_ranger_services_status clusterName=Cluster4
Sample output:
admin@hw-cl4-05:8080 Cluster4

REST API example

To view the services that are set up to be monitored:
curl -k -i --header "Authorization:Bearer <access token>" https://<Guardium server name>:8443/restAPI/get_ranger_services_status?clusterName=Cluster4
Sample output, showing services that are not currently monitored ("id": 0 and "ambariConfigId": -1):
[
 { 
   "id": 0,
   "ambariConfigId": -1,
   "service": {
      "id": 2,
      "label": "HDFS",
      "value": "HDFS"
   },
   "isMonitored": false,
   "editMode": false
 },
 {
   "id": 0,
   "ambariConfigId": -1,
   "service": {
      "id": 3,
      "label": "Hive",
      "value": "HIVE"
   },
   "isMonitored": false,
   "editMode": false
 },
 {
   "id": 0,
   "ambariConfigId": -1,
   "service": {
      "id": 1,
      "label": "HBase",
      "value": "HBASE"
   },
   "isMonitored": false,
   "editMode": false  
  },
  {
   "id": 0,
   "ambariConfigId": -1,
   "service": {
      "id": 5,
      "label": "Storm",
      "value": "STORM"
   },
   "isMonitored": false,
   "editMode": false
  },
  {
   "id": 0,
   "ambariConfigId": -1,
   "service": {
      "id": 4,
      "label": "Kafka",
      "value": "KAFKA"
   },
   "isMonitored": false,
   "editMode": false
  }
]