> For the complete documentation index, see [llms.txt](https://docs.arkannis.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkannis.net/monitoring/new-relic/new-relic-flex-integration.md).

# New Relic Flex Integration

### Location of Flex integrations

```bash
/etc/newrelic-infra/integrations.d
```

### Run Flex integrations manually

```bash
var/db/newrelic-infra/newrelic-integrations/bin/nri-flex -config_path /etc/newrelic-infra/integrations.d/chrony-leap-status.yml -pretty
```

### Chrony Leap status integration

```yaml
integrations:
  - name: nri-flex
    interval: 30s
    config:
      name: ChronyLeapStatusIntegration
      apis:
        - event_type: LeapStatusSample
          commands:
            - run: chronyc tracking | grep Leap | awk '{print $4}'
              split: horizontal
              split_by: \s+
              row_start: 1
              set_header: [LeapStatus]
```

### Resources:

* [New Relic Flex Integration](https://www.youtube.com/watch?v=LmCzbe5sU5U)
