> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/tenable/restart-tenable-agent.md).

# Restart Tenable Agent

Restarts the Tenable agents of the matched devices by sending a restart directive to Tenable in bulk requests of up to 5,000 agents.

### Before you begin

* An API key pair for Tenable Vulnerability Management: an **Access Key** and a **Secret Key**, generated in the Tenable console under Settings - My Account - API Keys. The default **Domain** is `https://cloud.tenable.com`.
* Connection defaults (Domain, Access Key, Secret Key, Timeout, Verify SSL) can be saved once under **Action Center** > **Settings**. See [Action Center Settings](broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2).
* Asset type: device only.
* The device must carry a Tenable agent id (column `Specifics.tenable-io.id`, collected by the Tenable adapter). Devices without it are dropped before the job runs.
* The user that owns the API keys needs at least the Scan Manager role \[40] for agent actions. Tenable answers 403 otherwise.

### Settings

The job node shows these fields.

| Setting             | Type           | Required | Default                     | Description                                                                                               |
| ------------------- | -------------- | -------- | --------------------------- | --------------------------------------------------------------------------------------------------------- |
| Domain              | URL            | No       | <https://cloud.tenable.com> | Base URL of Tenable. Example: `https://cloud.tenable.com`.                                                |
| Access Key          | Sensitive text | Yes      | None                        | Generated in the Tenable console under Settings - My Account - API Keys. Masked after saving.             |
| Secret Key          | Sensitive text | Yes      | None                        | The secret key of the same key pair. Masked after saving.                                                 |
| Timeout             | Number         | No       | 30                          | Request timeout in seconds.                                                                               |
| Verify SSL          | Boolean        | No       | On                          | Verify the TLS certificate of the Tenable host.                                                           |
| Retry on Rate Limit | Boolean        | No       | On                          | Retry a request once when Tenable answers 429, waiting for the `retry-after` header (at most 60 seconds). |
| Hard Restart        | Boolean        | No       | Off                         | Restart the agent immediately, regardless of what it is currently doing.                                  |
| Only When Idle      | Boolean        | No       | On                          | Restart only while the scanning engine is idle.                                                           |

### How it works

* Agent ids come from the matched devices. Repeated ids are removed.
* For each chunk of up to 5,000 ids the job sends `POST /scanners/null/agents/_bulk/directive` with a `restart` directive. Both options are always sent: **Hard Restart** as `hard` and **Only When Idle** as `idle`. The job logs the Tenable task id.
* No matched device has an agent id: the job logs a warning and sends nothing.
* A failed request fails the job. Chunks already queued before the failure stay queued in Tenable.
* This job has no **Maximum Assets** setting.
* The job passes the matched assets it received on to the next node unchanged.

### Example

Restart agents gently, only while they are idle.

| Setting        | Value                       |
| -------------- | --------------------------- |
| Domain         | `https://cloud.tenable.com` |
| Access Key     | `YOUR_ACCESS_KEY`           |
| Secret Key     | `YOUR_SECRET_KEY`           |
| Hard Restart   | Off                         |
| Only When Idle | On                          |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/ed78ac5bacec4909acb71c776dd17d62cfa78748">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save connection defaults for Tenable jobs.</td><td><a href="broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2">Broken link</a></td></tr><tr><td><strong>Unlink Tenable Agents</strong></td><td>Unlink the Tenable agents of the matched devices in a single call.</td><td><a href="broken://pages/802cbd1aafbf17cd98f77a001fc7ce33d49c8098">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 6.7.2.
{% endhint %}
