cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Michael.Perlstein
AppDynamics Team (Retired)

When planning an Events Service backup using the built-in snapshots functionality, you may have to calculate how much space is needed for the allocation of storage space. The most accurate and easiest way I have found to check the expected size of an Events Service backup is by running through the following steps:

1. On one of the nodes in the cluster, please run the following command to determine the master node and the size of its primary store according to Elastic Search. Note: Please update the host variable if the host is not listening on localhost.

host="localhost"
master=$(curl -s -XGET http://${host}:9200/_cat/master | awk $'{print $2}')
sizeMaster=$(curl -s -XGET http://${host}:9200/_cat/allocation | grep "${master}" | awk $'{print $2}')
echo "Master Node:  ${master}   |    Store Size:  ${sizeMaster}"

 

2. To validate the size found in step 1, please SSH into the master node so we can verify that the store size is consistent with what we are seeing in the physical data directory. Please execute the following commands:

cd [EVENTS_SERVICE_HOME]/processor/conf
dataDir=$(cat events-service-api-store.properties | grep "dataDirectory" | cut -d"=" -f2 | rev | cut -d"/" -f2- | rev)
sizeDataDir=$(du -sh "${dataDir}" | awk $'{print $1}')
echo "Data Directory:   ${dataDir}  |   Directory Size:   ${sizeDataDir}"


For example, in my demo 3-node clustered Events Service, I found the following results:

1. From one of the nodes in my cluster, I executed step 1 and the following results were returned:

Master Node:  192.168.254.128   |    Store Size:  315.7mb

 

2. I then started a terminal session into my master node 192.168.254.128 to calculate the physical size of the data directory as defined in the events-service-api-store.properties file.

Data Directory:   /opt/AppDynamics/Data  |   Directory Size:   319M

 

3. Post-Backup Validation - To make sure the values found in 1 and 2 are consistent with the actual size of a full snapshot backup, I took a full backup and verified the size of the backup. 

cd [EVENTS_SERVICE_HOME]/processor
snapshotBytes=$(bin/events-service.sh snapshot-status -p conf/events-service-api-store.properties | cut -d',' -f7 | cut -d'=' -f2)
echo "Snapshot Size: $(( snapshotBytes / (1024 * 1024) ))M"

 

The command above returns several properties related to the snapshot, one of them being size in bytes. After a quick conversion, the calculation above shows the size in MB.

Snapshot state is SUCCESS. Details: SnapshotStatus(startTime=2018-10-22T20:25:10.166Z, endTime=2018-10-22T20:25:40.503Z, durationInMillis=30337, numberOfFiles=868, processedFiles=868, totalSizeInBytes=330175594, processedSizeInBytes=330175594).
Snapshot Size: 314M


From the three different checks I confirmed that the known store size values are 315.7MB, 319MB, and 314MB. As a safe bet, I will go with the largest of the three values (319MB) as the size of my Events Service's full data backup. 
 

Version history
Last update:
‎10-25-2018 03:05 PM
Updated by:
On-Demand Webinar
Discover new Splunk integrations and AI innovations for Cisco AppDynamics.


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here