Use this API to fetch the statistics of all clusterinstance_stats resources that are configured on netscaler.
192663
public static clusterinstance_stats[] get(nitro_service service) throws Exception{
		clusterinstance_stats obj = new clusterinstance_stats();
		clusterinstance_stats[] response = (clusterinstance_stats[])obj.stat_resources(service);
		return response;
	}
918834
@Override
    protected CacheStatistics[] getStatistics() {
        val statsList = new ArrayList<CacheStatistics>();
        try {
            val client = getClientFromPool();
            client.getStats()
                .forEach((key, statsMap) -> {
                    if (!statsMap.isEmpty()) {
                        val size = Long.parseLong(statsMap.get("bytes"));
                        val capacity = Long.parseLong(statsMap.get("limit_maxbytes"));
                        val evictions = Long.parseLong(statsMap.get("evictions"));

                        val name = key instanceof InetSocketAddress
                            ? ((InetSocketAddress) key).getHostName()
                            : key.toString();
                        statsList.add(new SimpleCacheStatistics(size, capacity, evictions, name));
                    }
                });
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
        }

        return statsList.toArray(CacheStatistics[]::new);
    }
1154502
public static protocolip_stats get(nitro_service service) throws Exception{
		protocolip_stats obj = new protocolip_stats();
		protocolip_stats[] response = (protocolip_stats[])obj.stat_resources(service);
		return response[0];
	}
168821
def get_nodes(cluster):
    
    gk = get_api_client()
    site = get_cluster_site(cluster)
    return gk.sites[site].clusters[cluster].nodes.list()
1100275
public static clusterinstance_binding get(nitro_service service, Long clid) throws Exception{
		clusterinstance_binding obj = new clusterinstance_binding();
		obj.set_clid(clid);
		clusterinstance_binding response = (clusterinstance_binding) obj.get_resource(service);
		return response;
	}
1226438
def stats(self, metrics, **kwargs):  # noqa
        
        return self.__class__.all_stats(self.account, [self.id], metrics, **kwargs)
1083780
public static cmppolicy_stats[] get(nitro_service service) throws Exception{
		cmppolicy_stats obj = new cmppolicy_stats();
		cmppolicy_stats[] response = (cmppolicy_stats[])obj.stat_resources(service);
		return response;
	}
912577
def read_stats(self):
        

        self.statistics = TgnObjectsDict()
        for port in self.session.ports.values():
            for tpld in port.tplds.values():
                self.statistics[tpld] = tpld.read_stats()
        return self.statistics
825330
public static ipseccounters_stats get(nitro_service service) throws Exception{
		ipseccounters_stats obj = new ipseccounters_stats();
		ipseccounters_stats[] response = (ipseccounters_stats[])obj.stat_resources(service);
		return response[0];
	}
809294
public java.util.List<Cluster> getClusters() {
        if (clusters == null) {
            clusters = new com.amazonaws.internal.SdkInternalList<Cluster>();
        }
        return clusters;
    }
113992
public static base_responses update(nitro_service client, clusterinstance resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			clusterinstance updateresources[] = new clusterinstance[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new clusterinstance();
				updateresources[i].clid = resources[i].clid;
				updateresources[i].deadinterval = resources[i].deadinterval;
				updateresources[i].hellointerval = resources[i].hellointerval;
				updateresources[i].preemption = resources[i].preemption;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
988936
def _find_usage_clusters(self):
        
        count = 0
        fargate_task_count = 0
        paginator = self.conn.get_paginator('list_clusters')
        for page in paginator.paginate():
            for cluster_arn in page['clusterArns']:
                count += 1
                resp = self.conn.describe_clusters(
                    clusters=[cluster_arn], include=['STATISTICS']
                )
                cluster = resp['clusters'][0]
                self.limits[
                    'Container Instances per Cluster'
                ]._add_current_usage(
                    cluster['registeredContainerInstancesCount'],
                    aws_type='AWS::ECS::ContainerInstance',
                    resource_id=cluster['clusterName']
                )
                self.limits['Services per Cluster']._add_current_usage(
                    cluster['activeServicesCount'],
                    aws_type='AWS::ECS::Service',
                    resource_id=cluster['clusterName']
                )
                # Note: 'statistics' is not always present in API responses,
                # even if requested. As far as I can tell, it's omitted if
                # a cluster has no Fargate tasks.
                for stat in cluster.get('statistics', []):
                    if stat['name'] != 'runningFargateTasksCount':
                        continue
                    logger.debug(
                        'Found %s Fargate tasks in cluster %s',
                        stat['value'], cluster_arn
                    )
                    fargate_task_count += int(stat['value'])
                self._find_usage_one_cluster(cluster['clusterName'])
        self.limits['Fargate Tasks']._add_current_usage(
            fargate_task_count, aws_type='AWS::ECS::Task'
        )
        self.limits['Clusters']._add_current_usage(
            count, aws_type='AWS::ECS::Cluster'
        )
530473
def stats(self):
        
        # TODO - this would be nicer if we formatted the stats
        return self._client.get('{}/stats'.format(Instance.api_endpoint), model=self)
1370548
def get_resources_nodes(call=None, resFilter=None):
    '''
    
    '''
    log.debug('Getting resource: nodes.. (filter: %s)', resFilter)
    resources = query('get', 'cluster/resources')

    ret = {}
    for resource in resources:
        if 'type' in resource and resource['type'] == 'node':
            name = resource['node']
            ret[name] = resource

    if resFilter is not None:
        log.debug('Filter given: %s, returning requested '
                  'resource: nodes', resFilter)
        return ret[resFilter]

    log.debug('Filter not given: %s, returning all resource: nodes', ret)
    return ret
807113
def clusters(self):
        """"""
        if self._resources is None:
            self.__init()
        if "clusters" in self._resources:
            url = self._url + "/clusters"
            return _clusters.Cluster(url=url,
                                     securityHandler=self._securityHandler,
                                     proxy_url=self._proxy_url,
                                     proxy_port=self._proxy_port,
                                     initialize=True)
        else:
            return None
350495
public java.util.List<InstanceSummary> getInstancesSummary() {
        if (instancesSummary == null) {
            instancesSummary = new com.amazonaws.internal.SdkInternalList<InstanceSummary>();
        }
        return instancesSummary;
    }
919038
public static gslbservice_stats[] get(nitro_service service) throws Exception{
		gslbservice_stats obj = new gslbservice_stats();
		gslbservice_stats[] response = (gslbservice_stats[])obj.stat_resources(service);
		return response;
	}