Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Vous pouvez utiliser Datastream pour surveiller les données et les événements traités par un flux. Ces informations figurent dans les graphiques suivants :
Débit : débit auquel Datastream traite les données ou les événements. Ce débit peut être :
La quantité de données (en Mo) que Datastream transfère de la source vers la destination.
Nombre d'événements associés aux données transférées. Un événement est une modification unique apportée à la source, comme l'ajout d'une ligne à une table dans une base de données.
Événements non compatibles : nombre d'événements ne pouvant pas être traités de la source à la destination.
Fraîcheur des données : différence de temps entre les données résidant dans la source et celles qui sont transférées vers la destination par le flux. Il est calculé comme le temps écoulé entre le code temporel source et le code temporel de lecture pour l'événement le plus ancien en cours de traitement. Si aucune nouvel événement n'est à lire à partir de la source, la fraîcheur est définie sur 0.
Si des événements en file d'attente n'ont pas encore été traités par Datastream, ils ne sont pas pris en compte lorsque Datastream calcule la métrique de fraîcheur des données. Par exemple, si le débit augmente de manière soudaine, cela ne se reflète dans la métrique de fraîcheur qu'une fois que Datastream a traité les événements à l'origine de cette augmentation.
Latence du système : temps nécessaire à Datastream pour traiter un événement. Cet intervalle correspond au temps écoulé entre la lecture de l'événement par Datastream et son écriture dans la destination.
Latence totale : différence de temps entre le moment où les données sont écrites dans la source et celui où les événements correspondants sont écrits dans la destination.
Surveiller les données ou les événements traités
Accédez à la page Flux dans la console Google Cloud .
Cliquez sur le flux que vous souhaitez surveiller.
Facultatif. Faites défiler la page jusqu'à ce que le graphique Fraîcheur des données s'affiche. Pour ce graphique, cliquez sur le lien Créer une règle d'alerte afin de créer une règle d'alerte. Une règle d'alerte décrit un ensemble de conditions que vous souhaitez surveiller pour le graphique.
Après avoir cliqué sur le lien, la page Créer une règle d'alerte s'affiche dans Cloud Monitoring. Sur cette page, vous pouvez définir la règle d'alerte pour le graphique. Cela inclut la spécification des critères qui déclencheront la règle, des personnes qui seront averties si les critères sont remplis et de la manière dont elles seront averties.
Faites défiler la page jusqu'à ce que le graphique représentant les données ou les événements que Datastream surveille s'affiche.
Si vous le souhaitez, lorsque vous consultez le graphique Débit, sélectionnez (octets/s) pour afficher la quantité de données transférées par Datastream de la source à la destination, ou (événements/sec) pour voir le nombre d'événements associés aux données en cours de transfert.
Pour afficher la quantité de données ou le nombre d'événements traités par Datastream sur une période de plusieurs heures ou de plusieurs jours, cliquez sur 1 heure, 6 heures, 12 heures, 1 jour, 2 jours, 4 jours, 7 jours, 14 jours ou 30 days.
Pour définir une plage personnalisée, vous pouvez également sélectionner le menu Personnalisé, puis utiliser l'outil de sélection Agenda pour spécifier une date et heure de début et une date et heure de fin pour la quantité de données ou le nombre d'événements que vous souhaitez afficher.
Datastream met à jour le graphique dans le volet pour refléter votre sélection et affiche l'intervalle que vous avez spécifié.
Par exemple, si la date du jour est le 31 octobre 2021 et que vous cliquez sur 30 jours, le graphique affiche la quantité de données ou le nombre d'événements traités par DataStream depuis le 1er octobre 2021.
Placez le pointeur sur la ligne du graphique pour afficher la quantité de données ou le nombre d'événements traités par Datastream pour une date et une heure spécifiques.
Pour savoir comment afficher des informations sur votre flux, consultez Afficher un flux.
Pour savoir comment modifier un flux, consultez Modifier un flux.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eDatastream allows monitoring of data and events through various graphs, including Throughput, Unsupported events, Data freshness, System latency, and Total latency.\u003c/p\u003e\n"],["\u003cp\u003eThroughput measures the rate of data or event processing, displayed in either the amount of data transferred (MB) or the number of events associated with the transfer.\u003c/p\u003e\n"],["\u003cp\u003eData freshness indicates the time difference between data residing in the source and the data being transferred to the destination, calculated based on the oldest event.\u003c/p\u003e\n"],["\u003cp\u003eSystem latency represents the time Datastream takes to process an event, from the time it's read to when it's written to the destination.\u003c/p\u003e\n"],["\u003cp\u003eMonitoring can be done on the Google Cloud Console by navigating to the 'Streams' page and selecting a specific stream to view the relevant graphs, which can also have alerting policies configured for data freshness.\u003c/p\u003e\n"]]],[],null,["# Monitor a stream\n\nYou can use Datastream to monitor data and events that are processed by a stream. This information appears in the following graphs:\n\n- Throughput: The rate at which Datastream processes data or events. This rate can be:\n\n - The amount of data (in MB) that Datastream transfers from the source to the destination.\n - The number of events that are associated with the data being transferred. An **event** is a single change in the source, such as a new row added to a table\n in a database.\n\n | You can also monitor any errors associated with a stream. See [Troubleshoot a stream](/datastream/docs/troubleshoot-a-stream).\n- Unsupported events: The number of events that can't be processed from the source to the destination.\n\n- Data freshness: The time difference between the data residing in the source and the data being transferred into the destination by the stream. It is\n calculated as the time elapsed between the source timestamp and the read timestamp for the *oldest* event being processed. If there are no new events to read from the source, the freshness is set to 0.\n\n If there are enqueued events that Datastream hasn't processed yet, they aren't taken into account when Datastream calculates the data freshness metric. For example, if there is a spike in throughput, it is reflected in the freshness metric only after Datastream processes the events causing the spike.\n- System latency: The time that Datastream takes to process an event. This interval is calculated as the time between when Datastream reads\n the event and when the event is written to the destination.\n\n- Total latency: The time difference between when data is written to the source and the corresponding events are written to the destination.\n\nMonitor data or events processed\n--------------------------------\n\n1. Go to the **Streams** page in the Google Cloud Console.\n\n [Go to the Streams page](https://console.cloud.google.com/datastream/streams)\n2. Click the stream that you want to monitor.\n\n3. Optional. Scroll until the **Data freshness** graph appears. For this graph,\n click the **Create alerting policy** link to create an alerting policy for\n it. An alerting policy describes a set of conditions that you want to\n monitor for the graph.\n\n After clicking the link, the **Create alerting policy** page appears in\n Cloud Monitoring. On this page, you can define the alerting policy for\n the graph. This includes specifying which criteria will trigger the policy,\n who'll be notified if the criteria are met, and how they'll be notified.\n\n For more information about alerting policies, including how to create them,\n see [Managing metric-based alerting\n policies](/monitoring/alerts/using-alerting-ui).\n4. Click the **MONITORING** tab.\n\n5. Scroll until the graph appears that represents the data or events that Datastream is monitoring.\n\n6. Optionally, if you're looking at the **Throughput** graph, then select **(bytes/sec)** to see the amount of data that Datastream transfers from the source to the destination, or **(event/sec)** to see how many events are associated with the data being transferred.\n\n7. To view how much data or how many events Datastream processed over a period of hours or days, click **1 hour** , **6 hours** , **12 hours** , **1 day** , **2 days** , **4 days** , **7 days** , **14 days** , or **30 days**.\n\n Or, to set a custom range, select the **Custom** menu, and then use the **Calendar** picker to specify a start date and time and end date and time for the amount of data or the number of events that you want to view.\n\n Datastream updates the graph in the pane to reflect your selection and displays the interval that you specified.\n\n For example, if today is October 31, 2021, and you click **30 days**, the graph will show the amount of data or the number of events Datastream processed since October 01, 2021.\n8. Hold the pointer over the line in the graph to display how much data or how many events Datastream processed for a particular date and time.\n\n | **Tip:** Drag your mouse to connect two points on the line in the graph to see how much data or how many events Datastream processed over a more-granular time interval. \n |\n | For example, if today is October 31, 2021, and you click 30 days, then the graph shows how much data Datastream transferred or the number of events associated with the data being transferred since October 01, 2021. \n |\n | If you click where the line begins at October 01, and drag your mouse until it touches where the line crosses October 05, then the line in the graph will be updated to reflect the interval that you specified (for this example, how much data or how many events Datastream processed from October 01 to October 05).\n\nWhat's next\n-----------\n\n- To learn more about streams, see [Stream lifecycle](/datastream/docs/stream-states-and-actions).\n- To learn how to view information about your stream, see [View a stream](/datastream/docs/view-a-stream).\n- To learn how to modify a stream, see [Modify a stream](/datastream/docs/modify-a-stream)."]]