The Reliability recommender supports the following recommendation subtypes:
which are a part of Disaster Recovery Plan to protect your data against data disasters such as accidental deletion or modification of data.
This document describes how to enable and view your recommendations and insights to improve the reliability of your databases.
Before you begin
Before you can view Firestore reliability recommendations and insights, do the following:
Enable the Recommender API as described in Enable the API.
Ensure that you have sufficient permissions. You must have one of the following roles, which provide the necessary permissions:
Task description Role View recommendations/insights roles/recommender.firestoredatabasereliabilityViewer
View and update (dismiss) recommendations/insights roles/recommender.firestoredatabasereliabilityAdmin
Opt out of recommendations/insights in Transparency and Control Center. For more information, see Opting out. roles/dataprocessing.admin
These Recommender roles provide the following API permissions:
Role Included permissions roles/recommender.firestoredatabasereliabilityViewer
recommender.firestoreDatabaseReliabilityRecommendations.get
recommender.firestoreDatabaseReliabilityRecommendations.list
recommender.firestoreDatabaseReliabilityInsights.get
recommender.firestoreDatabaseReliabilityInsights.list
roles/recommender.firestoredatabasereliabilityAdmin
roles/recommender.firestoredatabasereliabilityViewer
permissions, plus
recommender.firestoreDatabaseReliabilityRecommendations.update
recommender.firestoreDatabaseReliabilityInsights.update
For more information about roles and about granting access, see the following:
View recommendations
You can list Reliability recommendations in different ways.
You can view reliability recommendations only if you have non-empty, in-use databases that don't have scheduled backups or PITR enabled.
Google Cloud console
You can view your recommendations by doing following:
Go to the Google Cloud console, or use the following button:
Select the Recommendations tab.
gcloud CLI
To list reliability recommendations by using gcloud
, run the
gcloud recommender recommendations list
command as follows:
gcloud recommender recommendations list \
--project=PROJECT_ID \
--location=LOCATION \
--recommender=google.firestore.database.<var>RECOMMENDER</var>
Replace the following:
PROJECT_ID
: Your project IDLOCATION
: A region, such asus-central1
RECOMMENDER
: The ID of the recommender asReliabilityRecommender
.
Recommender API
To list your reliability recommendations by using the
Recommendations API, call the
recommendations.list
method as follows:
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: PROJECT_ID" \
"https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.firestore.database.RECOMMENDER/recommendations"
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.RECOMMENDER
: The ID of the recommender asReliabilityRecommender
.
For more information, see Using the API - Recommendations.
View insights
You can view insights and detailed recommendations about disaster recovery plan in different ways.
Console
To view insights and detailed recommendations by using the Google Cloud console, click the recommendation button in the list of databases.
gcloud CLI
To view insights by using gcloud
, run the
gcloud recommender insights list
command as follows:
gcloud recommender insights list \
--project=PROJECT_ID \
--location=LOCATION \
--insight-type=google.firestore.database.INSIGHT_TYPE
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.INSIGHT_TYPE
: The ID of the insight type asReliabilityInsight
.
Recommender API
To list your insights by using the Recommender API, run the following command:
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.firestore.database.INSIGHT_TYPE/insights"
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.INSIGHT_TYPE
: The ID of the insight type asReliabilityInsight
.
For more information, see Using the API - Insights.
Apply recommendations
For more information about how to improve your disaster recovery plan, see Plan disaster recovery.
Pricing
Reliability recommendations and insights are available free of charge. For information about other pricing tiers, see Recommender pricing.