Pivotal Knowledge Base

Follow

All GemFire 6.x CacheServer Services are not autodiscovered and need to be manually configured using the Hyperic Console UI or by using HQAPI

All GemFire 6.x CacheServer Services are not autodiscovered and need to be manually configured using the Hyperic Console UI or by using HQAPI.

Symptoms

You have installed vFabric GemFire 6.x and have compared the services shown in jconsole to those shown in Hyperic and services shown in jconsole do not appear in Hyperic.
 
You have installed the latest available plugin from the the VMware Plugin Exchange.
You wish to enable metrics collection for additional CacheServer services.
 
Additional cacheserver services are visible using jconsole.
You have added the directive "vfgf.autodiscovery.include=all" to conf/agent.properties.
The vFabric GemFire Distributed System 6.x has been added to inventory.
 
The platform's Configuration Properties have been edited to reflect the jmx settings of the jmx agent.

Purpose

This is to explain that for GemFire 6.x all CacheServer services are not autodiscovered 
 
In this article we present workarounds to add monitoring of additional GemFire CacheServer Services that the vFabric Hyperic GemFire plugin does not auto-discover.

Cause

For Gemfire 6. by default some services(Stats) are not auto discovered.
 
All cacheserver services are not auto-discovered by the plugin.
 
This can often be corrected by adding "vfgf.autodiscovery.include=all" in conf/agent.properties.
 
Note that auto discovery will only work once the vFabric GemFire Distributed System 6.x has been added to inventory.
 
The platform's Configuration Properties will need to be edited to reflect the jmx settings of the jmx agent.
 
The plugin relies on JMX communication with GemFire and the additional services may not be discovered.

Resolution

Process to manually add the additional services with the Hyperic UI or also by using the HQAPI.

Prerequisites:

  • In gemfire.properties "statistic-sampling-enabled=true" needs to be set
  • Cache Servers should be started with a name
  • The Gemfire JMX Agent needs to be running (GF 6.x)
  • The GemFire JMX Manager must be running and as well as at least one locator (GF 7.x)

The following Services may be available in the dropdown list to add a new service using the UI:

Cache Client Notifier
Cache Performance
Cache Server
Disk Directory
Disk Region
Disk Store
Distributed Lock
Distribution Statistics
Function
Function Service
Partitioned Region
Region -
Resource Manager - ResourceManagerStats
Statistics Sampler - statSampler
VM Stats - vmStats

The following five services may be auto-discovered consistently:

Region
Cache Server
VM Stats
Cache Performance - "cachePerfStats"
Resource manager - "ResourceManagerStats"

Additional services in the list may be added as appropriate in your environment,  using the appropriate statname as seen in jConsole:

Distribution Statistics - "distributionStats"

Cache Client Notifier - "cacheClientNotifierStats"
Disk Directory
Disk Region
Disk Store
Distributed Lock - "dlockStats"
Function
Function Service
Partitioned Region -
Statistics Sampler - "statSampler"

Process to manually add the Distribution Statistics - "distributionStats" service using the Hyperic UI:

Step 1.) In the Hyperic UI, select the Cache Server resource.

Step 2.) Click the "Tools Menu" button, Select "New Service" > "vFabric GemFire Cache Server 6.6 Distribution Statistics" > "OK"

Step 3.) Edit the Configuration Properties - Shared > Enter the statistics name (statname) that appears in jconsole: "distributionStats"

Step 4.) Click OK.

Navigate to the new CacheServer Service and you will be able to access view the metrics.

Process to manually add an additional service using the Hyperic HQAPI:
 
Step 1.) Get the resource id for the Fabric GemFire Cache Server 6.6 resources:

 ./hqapi.sh resource list --prototype="vFabric GemFire Cache Server 6.6" | grep "<Resource id=" | awk '{print $2}' | awk -F= '{print $2}'

"12081"

Step 2.) Get the name assigned to the resource

]# ./hqapi.sh resource list --id=12081 | grep "name=" | awk -F= '{print $3}'
"vFabric GemFire Cache Server 6.6 myserver cacheserver1" description
"10196" id

"vFabric GemFire Cache Server 6.6 myserver cacheserver1"

Step 3.) Substitute the "&lt" to "<" and the "&gt" to ">" using inline sed

 | sed s/\&lt\;/\</g |  sed s/\&gt\;/\>/g

"vFabric GemFire Cache Server 6.6 myserver(16995)<v1>:44645/45781"

Step 4.) Using the resource id and the resource name, build the HQAPI command line to add the new service to the Cache Server:

./hqapi.sh resource createService --prototype="vFabric GemFire Cache Server 6.6 Distribution Statistics" --resourceId="12081" --name="vFabric GemFire Cache Server 6.6 cacheserver1 Distribution Statistics" -- statname="distributionStats"

Resource id="12081" name="vFabric GemFire Cache Server 6.6 myserver

Step 5.) (optional) List the resource as xml using HQAPI.

# ./hqapi.sh resource list --id=12081 -verbose
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResourcesResponse>
    <Status>Success</Status>
    <Resource id="12081" name="myserver cacheserver1 Distribution Statistics" description="" location="" instanceId="10848" typeId="3">
        <ResourceConfig key="statname" value="distributionStats"/>
        <ResourcePrototype resourceTypeId="3" instanceId="10892" id="11959" name="vFabric GemFire Cache Server 6.6 Distribution Statistics"/>
        <ResourceInfo key="autoIdentifier" value="myserver cacheserver1 Distribution Statistics"/>
    </Resource>
</ResourcesResponse>

Impact/Risks

Monitoring of the additional services and metrics may increase the load on the Hyperic Server and Agent.
 
Add additional monitoring only as required and limit metrics and collection intervals to reduce impact.
 
If additional services are to be monitored they must be manually added in the Hyperic UI or by using HQAPI.

 
It is possible to create multiple resource instances, redundant resources may be removed.

 

Comments

Powered by Zendesk