Skip to content

Conversation

@gwbrown
Copy link
Contributor

@gwbrown gwbrown 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.
@gwbrown gwbrown added >non-issue :Data Management/ILM+SLM Index and Snapshot lifecycle management labels Sep 24, 2019
@gwbrown gwbrown requested a review from dakrone September 24, 2019 00:13
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@gwbrown
Copy link
Contributor Author

gwbrown 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
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!

@gwbrown gwbrown merged commit 3035cd3 into elastic:master Sep 24, 2019
gwbrown added a commit to gwbrown/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.
gwbrown 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants