Java TroubleshootingΒΆ

Robusta includes built-in actions to troubleshoot and profile Java applications on Kubernetes.

These actions can be triggered automatically on Prometheus alerts, or manually using the robusta cli.

For a tutorial, refer to Java jmap and stack.

Java process inspectorΒΆ

Playbook Action: java_process_inspector

Displays all java-toolkit debugging options for every java process

Manually trigger with:

robusta playbooks trigger java_process_inspector name=podname namespace=default

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - java_process_inspector: {}
  triggers:
  - on_pod_oom_killed: {}

The above is an example. Try customizing the trigger and parameters.

optional:
custom_annotations (str dict)

custom annotations to be used for the running pod/job

process_substring (str)

process name (or substring).

pid (int)

pid

interactive (bool) = True

if more than one process matches, interactively ask which process to choose.

jtk_image (str)

the java-toolkit image to use for debugging

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger java_process_inspector name=POD_NAME namespace=POD_NAMESPACE 

Pod jmap pidΒΆ

Playbook Action: pod_jmap_pid

Runs jmap on a specific pid in your pod

Manually trigger with:

robusta playbooks trigger pod_jmap_pid name=podname namespace=default pid=pid_to_inspect

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - pod_jmap_pid: {}
  triggers:
  - on_pod_oom_killed: {}

The above is an example. Try customizing the trigger and parameters.

optional:
custom_annotations (str dict)

custom annotations to be used for the running pod/job

process_substring (str)

process name (or substring).

pid (int)

pid

interactive (bool) = True

if more than one process matches, interactively ask which process to choose.

jtk_image (str)

the java-toolkit image to use for debugging

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger pod_jmap_pid name=POD_NAME namespace=POD_NAMESPACE 

Pod jstack pidΒΆ

Playbook Action: pod_jstack_pid

Runs jstack on a specific pid in your pod

Manually trigger with:

robusta playbooks trigger pod_jstack_pid name=podname namespace=default pid=pid_to_inspect

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - pod_jstack_pid: {}
  triggers:
  - on_pod_oom_killed: {}

The above is an example. Try customizing the trigger and parameters.

optional:
custom_annotations (str dict)

custom annotations to be used for the running pod/job

process_substring (str)

process name (or substring).

pid (int)

pid

interactive (bool) = True

if more than one process matches, interactively ask which process to choose.

jtk_image (str)

the java-toolkit image to use for debugging

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger pod_jstack_pid name=POD_NAME namespace=POD_NAMESPACE