Hello. In the json that is returned by a RESTful API call to system
diagnostics, I can access the free space for the flowFile repo something
like this:

status
 $.systemDiagnostics.aggregateSnapshot.flowFileRepositoryStorageUsage.freeSpace

But the content repo stats seem to be buried deeper in the structure, and
are also enclosed by a [,] that is not found in the flow file repo stats.
Using a syntax like that I've shown above does not return the value to me.
What is the syntax to use in an UpdateAttribute processor to grab that
content repo free space value, so that I can save it to an attribute?

Here is the structure returned by the API call:

{"systemDiagnostics":{"aggregateSnapshot":

                      {"totalNonHeap":"338.38 MB",

                       "totalNonHeapBytes":354816000,

                       "usedNonHeap":"326.16 MB",

                       "usedNonHeapBytes":342000064,

                       "freeNonHeap":"12.22 MB",

                       "freeNonHeapBytes":12815936,

                       "maxNonHeap":"-1 bytes",

                       "maxNonHeapBytes":-1,

                       "totalHeap":"6 GB",

                       "totalHeapBytes":6442450944,

                       "usedHeap":"3.17 GB",

                       "usedHeapBytes":3407422960,

                       "freeHeap":"2.83 GB",

                       "freeHeapBytes":3035027984,

                       "maxHeap":"6 GB",

                       "maxHeapBytes":6442450944,

                       "heapUtilization":"53.0%",

                       "availableProcessors":8,

                       "processorLoadAverage":0.36,

                       "totalThreads":99,

                       "daemonThreads":53,

                       "flowFileRepositoryStorageUsage":

                       {"freeSpace":"44.39 GB",

                        "totalSpace":"79.99 GB",

                        "usedSpace":"35.59 GB",

                        "freeSpaceBytes":47666999296,

                        "totalSpaceBytes":85885063168,

                        "usedSpaceBytes":38218063872,

                        "utilization":"44.0%"},

                        "*contentRepositoryStorageUsage"*:[

                          {"identifier":"default","*freeSpace"*:"44.39 GB",

                           "totalSpace":"79.99 GB","usedSpace":"35.59 GB",

                           "freeSpaceBytes":47666999296,

                           "totalSpaceBytes":85885063168,

                           "usedSpaceBytes":38218063872,

                           "utilization":"44.0%"}],

                          "garbageCollection":[

                            {"name":"G1 Young Generation",

                             "collectionCount":2172338,

                             "collectionTime":"132:38:54.540",

                             "collectionMillis":477534540},

                            {"name":"G1 Old Generation","collectionCount":0,

                             "collectionTime":"00:00:00.000",

                             "collectionMillis":0}],

                            "statsLastRefreshed":"03:05:01 UTC"}

                     }

                    }


Thanks in advance for your help. -Jim

Reply via email to