mani.vajrala
(srimanikantareddy vajrala)
1
HI Team,
As per the documentation i have noticed the custom attributes for linux systems for disk partitions…
I would like to understand how to do this for windows systems… while defining the disk_partiions…
Can someone help an advise how to define for C drive, D drive etc?
import "generic-host"
address = "127.0.0.1"
address6 = "::1"
vars.local_disks["basic-partitions"] = {
disk_partitions = [ "/", "/tmp", "/var", "/home" ]
}
}
apply Service for (disk => config in host.vars.local_disks) {
import "generic-service"
check_command = "disk"
vars += config
vars.disk_wfree = "10%"
vars.disk_cfree = "5%"
}
fluxX
(Alex)
2
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
mani.vajrala
(srimanikantareddy vajrala)
3
HI Alex,
This is very good example & its working… Sorry for starting another tread… quick examples like the way how you post would be really helpful…
thanks again
mani