﻿---
title: stack kb apm-agent-configuration search-single-configuration cli command
description: Lookup single agent configuration Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4097/reference/elastic-cli/cli/stack/kb/apm-agent-configuration/search-single-configuration
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb apm-agent-configuration search-single-configuration cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb apm-agent-configuration search-single-configuration \
  --service <service> \
  [options]
```

Lookup single agent configuration
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--service string required">
  </definition>
  <definition term="--error string">
    If provided, the agent configuration will be marked as error and `applied_by_agent` will be set to `false`.
    This is useful for cases where the agent configuration was not applied successfully.
  </definition>
  <definition term="--etag string">
    If etags match then `applied_by_agent` field will be set to `true`
  </definition>
  <definition term="--mark-as-applied-by-agent">
    `markAsAppliedByAgent=true` means "force setting it to true regardless of etag".
    This is needed for Jaeger agent that doesn't have etags
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>