---
title: "Configure Exchange Opspack"
description: "Configuring the Exchange Opspack involves setting up Kerberos authentication for agentless checks using WinRM on the Exchange Server. The FAQ provides step-by-step instructions for script execution, Kerberos configuration, and verifying connectivity to ensure successful monitoring."
url: "https://docs.itrsgroup.com/docs/faq/opsview/7846587261341-opsview-configure-exchange-opspack/index.html"
---
This opspack guide [Exchange-Client-Connectivity-Monitoring](https://www.opsview.com/product/system-monitoring/containers/exchange-client-connectivity-monitoring) explains how to configure **Kerberos** as an authentication method to get started with making checks, this is an agentless method of making checks

 using WinRM on the Exchange Server that you wish to monitor:-

Syntax Example as below (to be ran as an opsview user):-

```
./check_by_winrm.py -H 10.x.x.x --transport 'kerberos' --username 'USERNAME' --password 'PASSWORD' --scheme 'http' -D -i check_microsoft_exchange.ps1 -m MSExConnectivity.ActiveSync.Requests -n '10.x.x.x' -Transport 'kerberos' -Username 'USERNAME' -Password 'PASSWORD' -Scheme 'http' -w '' -c ''
```

The -i is used here to ignore certificate verification but bear in mind it will not ignore certificates therefore the OpenSSL command in step 6 will help verify this,

1. Download the script for WinRM configuration

Refer article - [Powershell-agentless-monitoring](https://docs.itrsgroup.com/docs/opsview/current/configuration/windows-agentless-monitoring/powershell-agentless-monitoring/index.html)

Run the script on the server

<https://downloads.opsview.com/ConfigureRemoting.ps1>.

2. Run below on Powershell CMD

```
winrm quickconfig
```

```
For HTTP:
netstat -an | findstr 5985
```

```
For HTTPS:
netstat -an | findstr 5986
```

3. Execute below in Powershell CMD

```
winrm set winrm/config/service/auth '@{Basic="true"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/client/auth '@{Basic="true"}'
```

4. Run below in Powershell CMD

```
Add-WindowsFeature winrm-IIS-Ext
```

5. Verify the below output from Powershell CMD

```
WinRM e winrm/config/listener
```

6. From the monitored by the collector/orchestrator to the host (exchange server)

```
openssl s_client -connect exchangeserver.com:5986 -showcerts
```

7. check connectivity to endpoint from collector/orchestrator, response should be 0 for ok

```
[root@collector01 ~]# nc -z -w1 10.x.x.x 5986;echo $?
0
[root@collector01~]# nc -z -w1 10.x.x.x 5985;echo $?
0
```

8. Log into the collector **assuming** checks are performed from a collector to the Exchange Server, also **note** the user used to monitor the exchange should be a domain admin
---

Configure the /opt/opsview/krb5/etc/krb5.conf with your domain as below respective to your environment
(Make **sure** you execute commands as opsview rather than root)

```
[opsview@collector01 etc]$ cat /opt/opsview/krb5/etc/krb5.conf
## /opt/opsview/krb5/etc/krb5.conf
[libdefaults]
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
default_realm = localdomain.com

[login]
krb4_convert = true
krb4_get_tickets = false

---------------------------------------------------------------------------------
permissions -rw-r----- 1 root opsview 234 Oct 31 12:09 /opt/opsview/krb5/etc/krb5.conf
-rw-r----- <-> 640
```

check files in **/opt/opsview/krb5/etc/krb5.conf.d/local.cfg**

Add DC name in the below file:-

```
[root@collector01 krb5.conf.d]# ls -la
total 8
drwxrwx--- 2 root opsview 52 Oct 13 08:55 .
drwxr-x--- 3 root opsview 62 Oct 31 11:25 ..
-rwxrwxrwx 1 opsview opsview 239 Oct 13 08:49 local.cfg
-rwxrwxrwx 1 opsview opsview 380 Oct 31 11:24 opsview_realms.cfg
```

**remove** file **opsview\_realms.cfg** for credentials

- if the **domain.cfg** file is not present create it

```
[root@collector01 krb5.conf.d]$ cat local.cfg
## Managed by User
[realms]
LOCALDOMAIN.COM = {
kdc = dc1.localdomain.com
kdc = dc2.localdomain.com
admin_server = dc1.localdomain.com
master_kdc = dc1.localdomain.com
}

[domain_realm]
localdomain.com = localdomain.com

-----------------------------------------------------------------------------------
permissions -rwxrwxrwx 1 opsview opsview 239 Oct 31 12:10 local.cfg
-rwxrwxrwx <-> 777
```

9. change directory to apply credentials - /opt/opsview/krb5/bin

```
./kinit USER@LOCALDOMAIN.COM
```

(If user successfully attains a ticket it will exit without any output)

**NOTE**:

You **must** execute commands as opsview rather than root, if you make the mistake to run a command as root use the below to be run from the **orchestrator** to delete cached information:

```
ansible all -m shell -a 'rm -rf /tmp/*krb5*'
```

Make sure WinRM is configured correctly, rerun the steps and make sure the HTTPS listener has been initialized. Failure to use HTTPS will result in connections being refused, also Kerberos will need HTTPS auth.

Example Variables as below:

![8273662406301 image014](https://docscdn.itrsgroup.com/faq/images/opsview/7846587261341-8273662406301-image014.png)


