---
title: "Multiple Service Check"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/6.11.7/configuration/variables/multiple-service-check/index.html"
---
Another use for Variables is within the context of 'Multiple Service Checks'. For example, if there is a Service Check that monitors the capacity of a hard drive it may take the following format:
`check_disk -a %DISK%`.

By having the `%DISK%` variable, this Service Check requires the Variable `%DISK%` to be added to the Host and populated with the value field of `%DISK%` containing the hard disk to be monitored. If the value was set to 'C', the Service Check, when executed, would read:

```
check_disk -a C
```

This is great if we just have one disk, but what if we have multiple? A 'D:/' drive? An 'F:/' drive? That would require administrators to create three separate Service Checks:

```
check_disk -a C
check_disk -a D
check_disk -a F
```

This defeats the purpose of Variables. Therefore, Opsview Monitor created the concept of 'Multiple Service Checks'. This allows an administrator to create the Service Check below:

```
check_disk -a %DISK%
```

But unlike before, there is an option called 'Multiple Service Checks:'. Within this dropdown box, an administrator can select a Variable, i.e. `%DISK%`. By selecting `%DISK%`, this tells Opsview Monitor to create a new Service Check for **every** `%DISK%` variable added.

This means, that for every `%DISK%` variable added to the Host, Opsview Monitor will create a new Service Check. This means the administrator needs to only create and add one Service Check, `check_disk -a %DISK%`. The administrator then simply adds three variables of the DISK type, with the values C, D and F respectively.

On **Submit Changes**, the one Service Check will create three copies - one per variable. You will need to go to **Configuration > [Apply Changes](https://docs.itrsgroup.com/docs/opsview/6.11.7/configuration/apply-changes/index.html)** to put this setup into production.

In Opsview Monitor, this looks like the screen below:

![Create Multiple Service Checks](https://docscdn.itrsgroup.com/opsview/images/config-variables-multi-checks.png)

This next step assumes the Service Check is already added to the Host; either via the Hosts' 'Service Check' tab or via a Host Template. Add the 3 variables and enter the values:

![Variables tab](https://docscdn.itrsgroup.com/opsview/images/config-variables-multi-variables-tab.png)

Once you have performed an [Apply Changes](https://docs.itrsgroup.com/docs/opsview/6.11.7/configuration/apply-changes/index.html) from the Configuration menu, the one Service Check will be cloned three times, one per variable, as shown below:

![Service Checks](https://docscdn.itrsgroup.com/opsview/images/config-variables-multi-service-checks.png)


