Defined Type: cassandra::java::agent

Defined in:
manifests/java/agent.pp

Summary

Add an agent to the JVM running Cassandra.

Overview

Each instance of this type adds an agent to the JVM running Cassandra.

The config class contains a factory for this type which will create instances for each key of cassandra::java::agents.

Examples:

directly created

cassandra::java::agent { 'jmx_prometheus_javaagent.jar':
  value => '8080:config.yaml',
}

factory created

cassandra::java:
  agents:
    jmx_prometheus_javaagent.jar: 8080:config.yaml

Parameters:

  • value (Optional[String]) (defaults to: undef)

    options to be added to the agent



22
23
24
25
26
27
28
29
30
31
32
# File 'manifests/java/agent.pp', line 22

define cassandra::java::agent (
  Optional[String] $value = undef,
) {
  $_opt = inline_epp('javaagent:<%= $prop -%><% if $value { -%>=<%= $value -%><% } -%>',
    {
      'prop'  => $name,
      'value' => $value,
    }
  )
  cassandra::environment::jvm_option { $_opt: }
}