lordgamez commented on code in PR #1490:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1490#discussion_r1180212146
##########
METRICS.md:
##########
@@ -100,17 +100,19 @@ QueueMetrics is a system level metric that reports queue
metrics for every conne
### RepositoryMetrics
-RepositoryMetrics is a system level metric that reports metrics for the
registered repositories (by default flowfile and provenance repository)
+RepositoryMetrics is a system level metric that reports metrics for the
registered repositories (by default flowfile, content, and provenance
repositories)
-| Metric name | Labels | Description
|
-|----------------------|-----------------|---------------------------------------|
-| is_running | repository_name | Is the repository running (1 or 0)
|
-| is_full | repository_name | Is the repository full (1 or 0)
|
-| repository_size | repository_name | Current size of the repository
|
+| Metric name | Labels | Description
|
+|---------------------------|-----------------|-------------------------------------------------|
+| is_running | repository_name | Is the repository running (1
or 0) |
+| is_full | repository_name | Is the repository full (1 or
0) |
+| repository_size_bytes | repository_name | Current size of the repository
|
+| max_repository_size_bytes | repository_name | Maximum size of the repository
(0 if unlimited) |
+| repository_entry_count | repository_name | Current number of entries in
the repository |
-| Label | Description
|
-|--------------------------|-----------------------------------------------------------------|
-| repository_name | Name of the reported repository
|
+| Label | Description
|
+|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
+| repository_name | Name of the reported repository. There are three
repositories present with the following names: `flowile`, `content` and
`provenance` |
Review Comment:
Updated in 4c763c831909cd5dc9cfa8116e6a5599eb68193e
##########
libminifi/include/core/repository/FileSystemRepository.h:
##########
@@ -50,6 +52,18 @@ class FileSystemRepository : public core::ContentRepository {
void clearOrphans() override;
+ uint64_t getRepositorySize() const override {
+ return utils::file::FileUtils::path_size(directory_);
Review Comment:
Updated in 4c763c831909cd5dc9cfa8116e6a5599eb68193e
##########
libminifi/include/core/repository/FileSystemRepository.h:
##########
@@ -50,6 +52,18 @@ class FileSystemRepository : public core::ContentRepository {
void clearOrphans() override;
+ uint64_t getRepositorySize() const override {
+ return utils::file::FileUtils::path_size(directory_);
+ }
+
+ uint64_t getRepositoryEntryCount() const override {
+ auto dir_it = std::filesystem::directory_iterator(directory_);
Review Comment:
Updated in 4c763c831909cd5dc9cfa8116e6a5599eb68193e
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]