Hi,
why you are not replying to your current thread, which is almost the same topic?
Anyway here is a little example (not tested)
object Host "host1" {
....
vars.os = "Windows"
vars.client_endpoint = name
// disk checks
vars.disks["disk C:"] = {
disk_win_path = "C:"
disk_win_warn = "20%"
disk_win_crit = "10%"
}
vars.disks["disk D:"] = {
disk_win_path = "D:"
disk_win_warn = "30%"
disk_win_crit = "15%"
}
vars.disks["disk N:"] = {
disk_win_path = "D:"
disk_win_warn = "10%"
disk_win_crit = "5%"
}
}
object Host "host2" {
....
vars.os = "Windows"
vars.client_endpoint = name
// disk checks
vars.disks["disk C:"] = {
disk_win_path = "C:"
disk_win_warn = "20%"
disk_win_crit = "10%"
}
}
And the service:
apply Service for (disk => config in host.vars.disks) {
import "generic-service"
check_command = "disk-windows"
vars += config
command_endpoint = host.vars.client_endpoint
assign where host.vars.client_endpoint && host.vars.os == "Windows"
}
Also check the disk-windows docs vor available parameters.
Greetz