# Automated Diagnostics - Kubernetes Logs

# Solution Summary

This solution will walk through an example of enriching PagerDuty incidents by retrieving diagnostic data from a single data-source using a Rundeck Job. At the end of building this solution, when an incident is created in PagerDuty, users will be presented with a button to retrieve recent logs from Kubernetes pods and view those logs from within the PagerDuty user-interface.

The design principles outlined in this solution are applicable to most other use-cases for retrieving diagnostic-data or invoking remediation.

Solution Prerequisites

For this guide, Rundeck Enterprise or Rundeck Community must be installed and running. Instructions for both products are provided below.

A PagerDuty account with the Automation Actions add-on enabled is also required. Automation Actions is available as an add-on for Business and Digital Operations pricing plans. Please contact us (opens new window) if you would like to upgrade your plan or to trial Automation Actions.

This solution is meant to demonstrate design principles, and therefore the steps outlined in this Rundeck Job may not be applicable to your specific environment.

# Configure Rundeck Job

# Configure PagerDuty Automation Actions

PagerDuty Automation Actions Architecture

The PagerDuty Automation Actions Runner is installed in your environment and requires outbound-only access to the PagerDuty SaaS platform as well as bi-directional communication with your Rundeck instance. You do not need to allow for any inbound protocols from PagerDuty to your infrastructure.

# Run the Auto-Diagnostics Action from PagerDuty Incidents

When incidents are created on the Service associated with the Rundeck Action, there will now be an option in the Run Actions dropdown that will trigger the automation configured in the prior sections to retrieve Kubernetes Logs: