Get the Health Data which will be sent to the server. Initially it is only one time data.
510047
function getHealthData() {
        var result = new $.Deferred(),
            oneTimeHealthData = {};

        oneTimeHealthData.snapshotTime = Date.now();
        oneTimeHealthData.os = brackets.platform;
        oneTimeHealthData.userAgent = window.navigator.userAgent;
        oneTimeHealthData.osLanguage = brackets.app.language;
        oneTimeHealthData.bracketsLanguage = brackets.getLocale();
        oneTimeHealthData.bracketsVersion = brackets.metadata.version;
        $.extend(oneTimeHealthData, HealthLogger.getAggregatedHealthData());
        HealthDataUtils.getUserInstalledExtensions()
            .done(function (userInstalledExtensions) {
                oneTimeHealthData.installedExtensions = userInstalledExtensions;
            })
            .always(function () {
                HealthDataUtils.getUserInstalledTheme()
                    .done(function (bracketsTheme) {
                        oneTimeHealthData.bracketsTheme = bracketsTheme;
                    })
                    .always(function () {
                        var userUuid  = PreferencesManager.getViewState("UUID");
                        var olderUuid = PreferencesManager.getViewState("OlderUUID");

                        if (userUuid && olderUuid) {
                            oneTimeHealthData.uuid      = userUuid;
                            oneTimeHealthData.olderuuid = olderUuid;
                            return result.resolve(oneTimeHealthData);
                        } else {

                            // So we are going to get the Machine hash in either of the cases.
                            if (appshell.app.getMachineHash) {
                                appshell.app.getMachineHash(function (err, macHash) {

                                    var generatedUuid;
                                    if (err) {
                                        generatedUuid = uuid.v4();
                                    } else {
                                        generatedUuid = macHash;
                                    }

                                    if (!userUuid) {
                                        // Could be a new user. In this case
                                        // both will remain the same.
                                        userUuid = olderUuid = generatedUuid;
                                    } else {
                                        // For existing user, we will still cache
                                        // the older uuid, so that we can improve
                                        // our reporting in terms of figuring out
                                        // the new users accurately.
                                        olderUuid = userUuid;
                                        userUuid  = generatedUuid;
                                    }

                                    PreferencesManager.setViewState("UUID", userUuid);
                                    PreferencesManager.setViewState("OlderUUID", olderUuid);

                                    oneTimeHealthData.uuid      = userUuid;
                                    oneTimeHealthData.olderuuid = olderUuid;
                                    return result.resolve(oneTimeHealthData);
                                });
                            } else {
                                // Probably running on older shell, in which case we will
                                // assign the same uuid to olderuuid.
                                if (!userUuid) {
                                    oneTimeHealthData.uuid = oneTimeHealthData.olderuuid = uuid.v4();
                                } else {
                                    oneTimeHealthData.olderuuid = userUuid;
                                }

                                PreferencesManager.setViewState("UUID",      oneTimeHealthData.uuid);
                                PreferencesManager.setViewState("OlderUUID", oneTimeHealthData.olderuuid);
                                return result.resolve(oneTimeHealthData);
                            }
                        }
                    });

            });
        return result.promise();
    }
1298063
def show_health_monitor(self, health_monitor, **_params):
        """"""
        return self.get(self.health_monitor_path % (health_monitor),
                        params=_params)
384785
def get_data(self, **kwargs):
        '''
        
        '''
        if self.queue:
            new = self.apply_queued()
            return new.get_data()
        else:
            return self._get_attr_from_file('data', **kwargs)
1095338
@GET
    @Path("/health")
    @Produces(MediaType.APPLICATION_JSON)
    public HealthStatus health() throws ExecutionException, InterruptedException {
        final HealthStatus status = new HealthStatus();

        final Future<HealthDetails> dbStatus = healthDBService.dbStatus();
        final Future<List<HealthDetails>> networkStatus = healthNetworkService.networkStatus();

        status.add(dbStatus.get());
        networkStatus.get().forEach(status::add);

        return status;
    }
93399
def health():
    """"""
    up_time = time.time() - START_TIME
    response = dict(service=__service_id__,
                    uptime='{:.2f}s'.format(up_time))
    return response, HTTPStatus.OK
929446
def check_health
      begin
        @http_client.check_health
        self.state = :connected
      rescue BalancedHttpClient::NotResponding => e
        ErrorTracker.log(self, "Failed #{@options[:server_name]} health check", e.nested_exception)
        self.state = :disconnected
      rescue StandardError => e
        ErrorTracker.log(self, "Failed #{@options[:server_name]} health check", e, nil, :caller)
        self.state = :disconnected
      end
    end
619655
def get_health_check(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    retries = 30

    while True:
        try:
            lb = conn.get_all_load_balancers(load_balancer_names=[name])
            lb = lb[0]
            ret = odict.OrderedDict()
            hc = lb.health_check
            ret['interval'] = hc.interval
            ret['target'] = hc.target
            ret['healthy_threshold'] = hc.healthy_threshold
            ret['timeout'] = hc.timeout
            ret['unhealthy_threshold'] = hc.unhealthy_threshold
            return ret
        except boto.exception.BotoServerError as e:
            if retries and e.code == 'Throttling':
                log.debug('Throttled by AWS API, will retry in 5 seconds.')
                time.sleep(5)
                retries -= 1
                continue
            log.error('ELB %s not found.', name,
                      exc_info_on_logleve=logging.DEBUG)
            return {}
886707
def get_services_health(self) -> dict:
        
        # Initialise
        services_health = {}

        # Get Service IDs
        services_ids = self._get_services()

        for service_id in services_ids:
            service_name = DC.get_service_name(service_id)

            # Check if the current and actual replica levels are the same
            if DC.get_replicas(service_id) != \
                    DC.get_actual_replica(service_id):
                services_health[service_name] = "Unhealthy"
            else:
                services_health[service_name] = "Healthy"

        return services_health
881522
def data(self):
        
        if self._data:
            return self._data

        retval = {}
        data = self.get_request_data()
        for subdata in data:
            for key, value in subdata.iteritems():
                if not key in retval:
                    retval[key] = value

        self._data = retval
        return retval
631310
def get(self):
        
        if self.call_queue:
            return self.apply(lambda df: df).data
        else:
            return self.data.copy()
89799
def create_healthcheck(self,
		service_id, 
		version_number,
		name,
		host,
		method="HEAD",
		path="/",
		http_version="1.1",
		timeout=1000,
		check_interval=5000,
		expected_response=200,
		window=5,
		threshold=3,
		initial=1):
		""""""
		body = self._formdata({
			"name": name,
			"method": method,
			"host": host,
			"path": path,
			"http_version": http_version,
			"timeout": timeout,
			"check_interval": check_interval,
			"expected_response": expected_response,
			"window": window,
			"threshold": threshold,
			"initial": initial,
		}, FastlyHealthCheck.FIELDS)
		content = self._fetch("/service/%s/version/%d/healthcheck" % (service_id, version_number), method="POST", body=body)
		return FastlyHealthCheck(self, content)
62416
protected function _retrieveHealthData(): array
    {
        $endpoint = new \Elasticsearch\Endpoints\Cluster\Health();
        $endpoint->setParams(['level' => 'shards']);

        $response = $this->_client->requestEndpoint($endpoint);

        return $response->getData();
    }
590466
public function health()
    {
        if (!isset($this->health)) {
            $this->health = $this->max_health();
        }
        return $this->health;
    }
659781
def get_health(self):
        
        summary = {'badreadings': [], 'health': const.Health.Ok}
        fallbackreadings = []
        try:
            self.oem_init()
            fallbackreadings = self._oem.get_health(summary)
            for reading in self.get_sensor_data():
                if reading.health != const.Health.Ok:
                    summary['health'] |= reading.health
                    summary['badreadings'].append(reading)
        except exc.BypassGenericBehavior:
            pass
        if not summary['badreadings']:
            summary['badreadings'] = fallbackreadings
        return summary
964504
async def get_data(self, path, headers=None, timeout=None):
        """"""
        url = self.base_url + path
        _LOGGER.debug('GET URL: %s', url)
        resp = None
        try:
            resp = await self._session.get(
                url, headers=headers,
                timeout=DEFAULT_TIMEOUT if timeout is None else timeout)
            if resp.content_length is not None:
                resp_data = await resp.read()
            else:
                resp_data = None
            return resp_data, resp.status
        except Exception as ex:
            if resp is not None:
                resp.close()
            raise ex
        finally:
            if resp is not None:
                await resp.release()
1183029
def get_data(self):
        
        return {key: "".join(chr(byte) for byte in data)
                for key, data in six.iteritems(self.data)}
1326137
def health_check(self):
        """"""
        logger.debug('Health Check on file for: {namespace}'.format(
            namespace=self.namespace
        ))

        return os.path.isfile(self.data_file)