---
title: Run on-host integrations manually (dry-run)
source: https://docs.newrelic.com/docs/infrastructure/host-integrations/troubleshooting/run-integrations-manually
---

## Problem

You want to know if an on-host integration is configured as expected and gathering metrics. To diagnose it, use the dry-run flag with the infrastructure agent or run the integration manually.

## Solution

### Integrations dry-run

Starting with infastructure agent version 1.27.0, it can run integrations in dry-run mode for troubleshooting. In this mode, the agent will run integrations from provided configuration and it will print the integrations output in the standard
output.

This mode supports a single configuration file or a folder with multiple configuration files.

Dry-run flag:

```
/usr/bin/newrelic-infra -dry_run -integration_config_path PATH_TO_FILE_OR_DIR
```

Example: Testing a single integration file:

```
/usr/bin/newrelic-infra -dry_run -integration_config_path /any/absolute/path/mysql-config.yml 
```

Example: Testing a single integration file with debug logs:

```
NRIA_LOG_LEVEL=trace /usr/bin/newrelic-infra -dry_run -integration_config_path /any/absolute/path/mysql-config.yml 
```

Example: Testing all files inside a folder:

```
/usr/bin/newrelic-infra -dry_run -integration_config_path /any/absolute/path 
```

Example: Dry run on Windows - Microsoft SQL Server (from an Administrator powershell)

```
cd "C:\Program Files\New Relic\newrelic-infra"; .\newrelic-infra.exe -dry_run -integration_config_path "C:\Program Files\New Relic\newrelic-infra\integrations.d\mssql-config.yml"
```

Example: Dry run on Windows with debug logs - Microsoft SQL Server (from an Administrator powershell)

```
cd "C:\Program Files\New Relic\newrelic-infra"; powershell -Command {  $env:NRIA_LOG_LEVEL="trace";  .\newrelic-infra.exe -dry_run -integration_config_path "C:\Program Files\New Relic\newrelic-infra\integrations.d\mssql-config.yml" }
```

For each integration execution, the command will print the name of the integration and its output.

```
----------
Integration Name: nri-mysql
Integration Output: {"name":"com.newrelic.mysql","protocol_version":"3","integration_version":"1.8.0","data":[{"entity":{"name":"localhost:3309","type":"node","id_attributes":[]},"metrics":[{"cluster.nodeType":"master","db.handlerRollbackPerSecond":0,"db.innodb.bufferPoolPagesData":1139,"db.innodb.bufferPoolPagesFree":7049,"db.innodb.bufferPoolPagesTotal":8192,"db.innodb.dataReadBytesPerSecond":0,"db.innodb.dataWrittenBytesPerSecond":0,"db.innodb.logWaitsPerSecond":0,"db.innodb.rowLockCurrentWaits"...
```

When running multiple files, the different integration outputs will be separated with `----------`

```
----------
Integration Name: nri-mysql
Integration Output: {"name":"com.newrelic.mysql","protocol_version":"3","integration_version":"1.8.0","data":...

----------
Integration Name: nri-ibmmq
Integration Output: {"protocol_version":"4","integration":{"name":"nri-ibmmq","version":"0.0.2"},"data":....
```

### Manual execution [#manual]

Use the following commands to run your integrations manually:

**Kafka**

````
echo 'kafka.network:type=RequestMetrics,name=*,request=*’ | nrjmx -host host -port port
```

````

**RabbitMQ**

-   Basic connect test:

    ```
    ./bin/nri-rabbitmq -hostname rabbitmqhost -username user -password password
    ```

-   Non-default port connect test:

    ```
    ./bin/nri-rabbitmq -hostname rabbitmqhost -username user -password password -port port_number
    ```

**MSSQL**

-   Basic connect test:

    ```
    .\bin\nri-mssql -hostname sqlhost -username user -password password
    ```

-   Instance connect test:

    ```
    .\bin\nri-mssql -hostname sqlhost -username user -password password -instance instance_name
    ```

-   Non-default port connect test:

    ```
    .\bin\nri-mssql -hostname sqlhost -username user -password password -port port_number
    ```

**Oracle**

````
ORACLE_HOME=/path/to/oracle/home /var/db/newrelic-infra/newrelic-integrations/bin/nri-oracledb -username user -password password -hostname host -port port -service_name name -verbose
```

````

**JMX**

````
echo 'java.lang:type=GarbageCollector,name=*' | nrjmx -d -hostname localipv4 -port port_number -username user -password password --verbose true
```

For more, see [troubleshooting via jmxterm](https://github.com/newrelic/nrjmx/blob/master/TROUBLESHOOT.md).

````

All integrations allow the following options:

`-help`: Display the list of allowed parameters

`-pretty`: Outputs pretty formatted JSON
