Chapter 3. Additional automated rule functions 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.4, and then upgraded from Cryostat 2.4 to Cryostat 3.0, Cryostat 3.0 automatically detects these automated rules. 3.1. 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 In the navigation menu on the Cryostat web console, click Automated Rules . The Automated Rules window opens. Click Create . The Create window opens. Enter values in any mandatory fields, such as the Match Expression field. In the Archival Period field, specify a value in seconds, minutes, or hours. In the Preserved Archives field, enter the number of archived recording copies to preserve. To create the automated rule, click Create . The Automated Rules window opens and displays your automated rule in a table. 3.2. 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 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. In the table, select the automated rule that you want to delete. Click the more options icon (...) , then click Delete . Figure 3.1. Delete option from the Automated Rules table The Permanently delete your Automated Rule window opens. 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 2024-07-02 13:35:50 UTC

Commands: