Rechercher

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

Chapter 2. New features

download PDF

Cryostat 2.1 introduces new features that enhance your use of the Cryostat product.

Automated rules user console (UI)

Cryostat 2.1 includes a user console (UI) for the automated rules API. The UI includes the following key features:

  • A form view that simplifies user interaction with the API by supporting typed inputs.
  • A match expression wizard, where you can create custom match expressions that target specific applications.
  • A JSON format view for the selected target application, so that you can view high-level application information. This information forms an integral part of the creation of match expressions.
  • A color-coded response system that indicates whether your expression matches the selected target application.
Note

The match expression wizard includes an example of a custom match expression that you can reference if you need to familiarize yourself with the custom match expression syntax.

Attachment of metadata and labels to JFR recordings

When you create a JFR recording on Cryostat 2.1, you can add metadata with key-value label pairs to the recording. Additionally, you can attach custom labels to JFR recordings that are inside a target JVM, so that you can easily identify and better manage your JFR recordings.

Use cases for metadata and labels include running queries or batch operations on recordings. You can navigate to the Recordings menu on the Cryostat web console and edit the label and its metadata of your JFR recording. You can also edit the label and metadata for a JFR recording that you uploaded to archives.

Control of client-side notifications

Cryostat 2.1 broadcasts notifications for all actions and state changes that can occur, resulting in a greater number of notifications appearing in the Cryostat web client. As a result, the Settings page has a control for client-side notifications.

Cryostat 2.1 users can enable or disable notifications by category and bulk enable or disable all graphical notifications.

The Cryostat backend still sends the notification messages, and the web client receives them. Disabling notifications prevents the messages from appearing on the console. Enabling the notifications again allows you to read any previous notifications.

Custom target resource definition

You can now create a custom target resource definition for your Cryostat instance. This allows the Cryostat Operator to connect to target applications by using a JMX protocol other than the Cryostat default protocol. The default protocol is typically JMX-RMI.

The custom target resource definition consists of a YAML file, where you can specify any of the following attributes for the definition:

  • alias, which sets an optional name for the resource definition.
  • annotation.cryostat, which defines optional annotations for the definition. An automated rule can use these annotations to apply a rule to a target JVM.
  • connectUrl, which specifies a target URL, such as a JMX service URL or a host:port pair, that Cryostat must use when it opens a JMX connection to a target JVM application. This attribute is mandatory.

When you create a custom target object, the Cryostat Operator uses a RESTful API endpoint, POST /api/v2/targets, for the object. After the object is created, the object’s connectUrl can be used as a targetId URL parameter in the REST HTTP API.

You can use TargetDeleteHandler to remove a custom target resource definition from the Cryostat Operator. This handler reads a DELETE /api/v2/targets/:connectUrl endpoint request and attempts to remove the definition from the Cryostat Operator.

Both TargetsPostHandler and TargetDeleteHandler include coded error messages that provide detailed error messages if a handler cannot handle a request.

Environment variables for the Cryostat Operator

Cryostat 2.1 includes the following environment variables that you can set to change the behavior of the Cryostat Operator:

  • CRYOSTAT_REPORT_GENERATION_MAX_HEAP: Defaults to 200 MiB. Sets the maximum heap size that is used by the container subprocess to generate an automated rules analysis report.
  • CRYOSTAT_MAX_WS_CONNECTIONS: Defaults to unlimited. Sets the maximum number of WebSocket client connections that your Cryostat application can support.
  • CRYOSTAT_TARGET_CACHE_SIZE: Default to -1, which indicates an unlimited caching. Sets the maximum number of JMX connections that the OpenShift Operator can cache to your Cryostat application.
  • CRYOSTAT_TARGET_CACHE_TTL: Defaults to 10, which indicates the amount of time in seconds that a JMX connection remains cached in your Cryostat instance’s memory.

JMC Agent plug-in support

Cryostat 2.1 supports the JMC Agent Plugin by using a set of API handlers for managing probe templates.

After you have installed a JMC Agent application and then built it to produce a JAR file, you can access the agent functionality for your Cryostat application by using the JMC Agent Plugin. This plug-in provides JMC Agent functionality to your Cryostat instance, such as adding JDK Flight Recorder (JFR) functionality to a running application.

Red Hat OpenShift authentication for Cryostat 2.1

Cryostat 2.1 integrates the Red Hat OpenShift built-in OAuth server into its framework. When enabled, users can log in to Cryostat by using their Red Hat OpenShift username and password. This integrated capability provides a better mechanism than that offered in Cryostat 2.0, where you had to manually copy your Red Hat OpenShift authorization token from the Red Hat OpenShift web console and then paste the token’s details in the Cryostat Application URL section on the console.

Additionally, you can limit access to Cryostat features by using role-based access control (RBAC) roles that were assigned in Red Hat OpenShift.

The Cryostat 2.1 release includes the following keys for the GET /health response object:

  • DATASOURCE_CONFIGURED
  • DASHBOARD_CONFIGURED
  • REPORTS_CONFIGURED
  • REPORTS_AVAILABLE

Red Hat OpenShift credentials

After you log in to the Cryostat 2.1 web console from the Red Hat OpenShift web console, the Cryostat Operator temporarily stores your username and password credentials on your Red Hat OpenShift account for the duration of the session. This prevents your Cryostat web console session from ending before you log out of the Cryostat web console.

Manage Java Management Extensions credentials in Cryostat 2.1

You can store and manage the Java Management Extension (JMX) credentials that are used to authenticate to containerized Java Virtual Machines (JVM). This feature is useful when you want Cryostat to remember and reuse your credentials for multiple JVMs.

When you add JMX credentials to Cryostat, you cannot view the credentials anymore. This keeps your credentials secure, because your credentials do not remain visible after you enter them on the Cryostat web console. If you want to replace the credentials, you must delete the credentials and add them again.

New automated rules environment variables

Before Cryostat 2.1, JMX connections for automated rules would close if these JMX connections were previously cached to your Cryostat instance’s memory. This issue occurred because of the behavior of the CRYOSTAT_TARGET_CACHE_MAX_CONNECTIONS environment variable.

The JMX cache component for Cryostat 2.1 now uses the CRYOSTAT_TARGET_CACHE_SIZE environment variable instead of the CRYOSTAT_TARGET_CACHE_MAX_CONNECTIONS environment variable. This means that any JMX connections that you open do not get automatically cached by automated rules to your Cryostat instance’s memory. This prevents automated rules from overfilling the cache storage space and causing in-use JMX connections to close, which can lead to degradation of performance with increased latency and response times.

The CRYOSTAT_TARGET_CACHE_SIZE environment variable specifies the maximum number of JMX connections to cache in your Cryostat instance’s memory. You can specify the following values for this environment variable:

  • < 0: default value is -1. Values less than 0 indicate an unlimited cache size. This means that JMX connections only get removed from memory when they reach an inactivity limit.
  • 0: A value of zero indicates JMX connections are immediately removed from memory when these connections are closed.
  • > 0: Values greater than 0 indicates that a Cryostat instance can cache a set number of JMX connections in its memory. If a new connection is created when the cache amount has reached its level, the oldest JMX connection is closed and removed from memory to facilitate storage of the new connection.

Automated rules can re-use any previously cached JMX connections. If no JMX connection exists then the Cryostat Operator creates a new JMX connection for the automated rule. This connection does not get cached to memory.

Resource requirements

By default, the Cryostat Operator deploys your Cryostat application without specifying any resource requests or limits for each of the three containers that operate in your Cryostat instance’s main pod on Red Hat OpenShift. Cryostat 2.1 includes a capability where you can use a Cryostat custom resource (CR) to specify resource requests or limits for each of the following three containers:

  • core, which runs the Cryostat backend service and the web application.
  • datasource, which runs the JFR data source that converts your JFR recordings into a file format that is supported by Grafana.
  • grafana, which runs the Grafana instance that is associated with your Cryostat application.

Sidecar report container

With Cryostat 2.1, you can use the sidecar report container to generate automated analysis reports for JDK flight recordings (JFR).

Before Cryostat 2.1, you had to rely on the main Cryostat container to generate analysis reports. This approach is resource intensive and could impact the performance of running your Cryostat application because you might need to provision additional resources for the main Cryostat container.

By generating analysis reports in the sidecar report container, you can efficiently use the Cryostat Operator to provision resources for your Cryostat application. This provides your Cryostat container with a lower resource footprint, because the Cryostat Operator that interacts with the container can focus on running low-overhead operations over HTTP and JMC connections.

Additionally, you can duplicate a sidecar report container and then configure this duplicate to meet your needs.

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.