Skip to content

Change SLM stats format#46991

Merged
AthenaEryma merged 1 commit intoelastic:masterfrom
AthenaEryma:slm/stats-format
Sep 24, 2019
Merged

Change SLM stats format#46991
AthenaEryma merged 1 commit intoelastic:masterfrom
AthenaEryma:slm/stats-format

Conversation

@AthenaEryma
Copy link
Copy Markdown
Contributor

@AthenaEryma AthenaEryma commented Sep 24, 2019

Using arrays of objects with embedded IDs is preferred for new APIs over
using entity IDs as JSON keys. This commit changes the SLM stats API to
use the preferred format.

Example of new GET _slm/stats response:

{
    "retention_runs": 0,
    "retention_failed": 0,
    "retention_timed_out": 0,
    "retention_deletion_time": "0s",
    "retention_deletion_time_millis": 0,
    "total_snapshots_taken": 1,
    "total_snapshots_failed": 0,
    "total_snapshots_deleted": 0,
    "total_snapshot_deletion_failures": 0,
    "policy_stats": [
        {
            "policy": "daily-snapshots",
            "snapshots_taken": 1,
            "snapshots_failed": 0,
            "snapshots_deleted": 0,
            "snapshot_deletion_failures": 0
        }
    ]
}
vs. old format (collapsed)
{
    "retention_runs": 0,
    "retention_failed": 0,
    "retention_timed_out": 0,
    "retention_deletion_time": "0s",
    "retention_deletion_time_millis": 0,
    "total_snapshots_taken": 1,
    "total_snapshots_failed": 0,
    "total_snapshots_deleted": 0,
    "total_snapshot_deletion_failures": 0,
    "policy_stats": {
        "daily-snapshots": {
            "snapshots_taken": 1,
            "snapshots_failed": 0,
            "snapshots_deleted": 0,
            "snapshot_deletion_failures": 0
        }
    }
}

Relates #43663

Using arrays of objects with embedded IDs is preferred for new APIs over
using entity IDs as JSON keys.  This commit changes the SLM stats API to
use the preferred format.
@AthenaEryma AthenaEryma added >non-issue :Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. labels Sep 24, 2019
@AthenaEryma AthenaEryma requested a review from dakrone September 24, 2019 00:13
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-features

@AthenaEryma
Copy link
Copy Markdown
Contributor Author

AthenaEryma commented Sep 24, 2019

[7.5.0] Failed to apply plugin [class 'org.gradle.api.plugins.BasePlugin']
--
[7.5.0] > Could not create service of type BuildCacheController using BuildCacheServices.createBuildCacheController().

Gradle broke I guess? 🤷‍♂

@elasticmachine run elasticsearch-ci/bwc

Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Gordon!

@AthenaEryma AthenaEryma merged commit 3035cd3 into elastic:master Sep 24, 2019
AthenaEryma added a commit to AthenaEryma/elasticsearch that referenced this pull request Sep 24, 2019
Using arrays of objects with embedded IDs is preferred for new APIs over
using entity IDs as JSON keys.  This commit changes the SLM stats API to
use the preferred format.
AthenaEryma added a commit that referenced this pull request Sep 25, 2019
Using arrays of objects with embedded IDs is preferred for new APIs over
using entity IDs as JSON keys.  This commit changes the SLM stats API to
use the preferred format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. >non-issue v7.5.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants