Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 3. Additional automated rule functions

download PDF

From the Cryostat web console, you access additional automated rule capabilities, such as deleting an automated rule or copying JFR.

If you created Cryostat 2.3, and then upgraded from Cryostat 2.3 to Cryostat 2.4, Cryostat 2.4 automatically detects these automated rules.

3.1. Automated rule migration

Cryostat 2.4 automatically scans for any automated rules that show in the Automated Rules table. If you created an automated rule with Cryostat 2.3, and then upgraded to Cryostat 2.4, Cryostat 2.4 can apply this rule to any selected applicable JVM applications.

No differences exist on how Cryostat tests the JVM application against older automated rules. If Cryostat detects a match between the rule definition and a selected JVM application, Cryostat automatically starts a JFR recording of the application. Cryostat 2.4 bases the JFR recording’s settings only on what you defined in the automated rule. This means that you do not need to reconfigure your automated rule to facilitate its migration to Cryostat 2.4.

3.2. Copying JFR data

You can copy information from a JVM application’s memory to Cryostat’s archive storage location on the OpenShift Container Platform (OCP).

During the creation of an automated rule through the Cryostat web console, you can set a value in the Archival Period field. You can specify a numerical value in seconds, minutes, or hours. After you create the automated rule with a specified archival period, Cryostat re-connects with any targeted JVM applications that match the rule. Cryostat then copies any generated JFR recording data from the application’s memory to Cryostat’s archive storage location.

Additionally, you can populate the Preserved Archives field with a value. This field sets a limit to the amount of copies of a JFR recording that Cryostat can move from an application’s memory to Cryostat’s archive storage location. For example, if you set a value of 10 in the Preserved Archives field, Cryostat will not store more than 10 copies of the file in the archive storage location. When Cryostat generates a new copy of the file that exceeds the limit, Cryostat replaces the oldest version with the newest version of the file.

You can also set a size limit for a JFR recording file and specify a time limit for how long a file is stored in the target JVM application’s memory by specifying values for the Maximum Size and Maximum Age parameters.

Prerequisites

  • Created a Cryostat instance in your Red Hat OpenShift project.
  • Created a Java application.
  • Logged in to your Cryostat web console.

Procedure

  1. In the navigation menu on the Cryostat web console, click Automated Rules. The Automated Rules window opens.
  2. Click Create. The Create window opens.
  3. Enter values in any mandatory fields, such as the Match Expression field.
  4. In the Archival Period field, specify a value in seconds, minutes, or hours.
  5. In the Preserved Archives field, enter the number of archived recording copies to preserve.
  6. To create the automated rule, click Create. The Automated Rules window opens and displays your automated rule in a table.

3.3. Deleting an automated rule

The Cryostat web console that runs on the OpenShift Container Platform (OCP) provides a simplified method for deleting a rule definition.

You can also use the curl tool to delete an automated rule. The curl tool communicates with your Cryostat instance by using the DELETE endpoint. In the request, you can specify the clean=true parameter, which stops all active Java Flight Recordings (JFRs) started by the selected rule.

Prerequisites

  • Logged in to the Cryostat web console.
  • Created an automated rule.

Procedure

  1. In the navigation menu on the Cryostat web console, click Automated Rules. The Automated Rules window opens and displays all existing automated rules in a table.

    Note

    If you have not created an automated rule, only a Create button appears on the Automated Rules window.

  2. In the table, select the automated rule that you want to delete.
  3. Click the more options icon (⋮), then click Delete.

    Figure 3.1. Delete option from the Automated Rules table

    *Delete* option from the *Automated Rules* table

The Permanently delete your Automated Rule window opens.

  1. To delete the selected automated rule, click Delete. If you want to also stop any active recordings that were created by the selected rule, select Clean then click Delete.

Cryostat deletes your automated rule permanently.

Revised on 2023-12-12 18:12:02 UTC

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.