Search

Chapter 1. Overview of automated rules

download PDF

You can use automated rules to enable JFR to continuously monitor a running target application. You do not need to restart or redeploy the application.

Continuous monitoring event templates exist in Cryostat that you can use to create automated rules and templates. By using continuous monitoring event templates, you can reduce any downtime for specifying a JFR to continuously monitoring an application.

You can define automated rules regardless of whether you configure your target applications to use a Java Management Extensions (JMX) connection or an agent HTTP API connection. For more information about configuring your target applications, see Configuring Java applications.

Consider the following guidelines:

  • If your target JVMs use an agent HTTP API connection, ensure that you set the cryostat.agent.api.writes-enabled property to true in your target application’s configuration. Otherwise, the Cryostat agent cannot accept on-demand requests to start, stop, and delete JFR recordings based on automated rules.
  • If your target JVMs use a JMX connection, before you create an automated rule that applies to multiple target JVMs that each require JMX credentials, consider storing credentials for each JVM on the Cryostat web console. Storing credentials ensures that your automated rule starts, because Cryostat maintains a connection with each target JVM. For more information, see Storing and managing JMX credentials (Using Cryostat to manage a JFR recording).

    When your target JVMs use a JMX connection, Cryostat stores JMX credentials in a keyring database. In this database, JMX credentials are encrypted by a user-provided passphrase that Cryostat supplies with the PG_ENCRYPT_KEY environment variable.

    Note

    From Cryostat 3.0 onward, the passphrase is supplied through the PG_ENCRYPT_KEY environment variable in the Cryostat DB container. In previous releases, the passphrase was supplied through the CRYOSTAT_JMX_CREDENTIALS_DB_PASSWORD environment variable in the Cryostat container.

    When installing a Cryostat instance, you can specify an encryption key manually by using the spec.databaseOptions.secretName property in the Cryostat custom resource (CR). Otherwise, if you leave the spec.databaseOptions.secretName property blank, the Cryostat Operator generates a key automatically.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.