to use livestatus command, you need to access the linux shell and login via ssh: now you have the command "lc:

########################
#sample to query hosts
########################
lq "GET hosts\nColumns: host_name description address state"
lq "GET hosts\nColumns: host_name description address state host_hard_state"
my-first-ap1;;10.199.0.247;1;1

########################
#sample to query services
########################

#sample when service ping / is ok
lq "GET services\nColumns: host_name description state host_hard_state service_hard_state"
my-first-ap1;PING;0;0;0

#sample when host + service ping is in hard_state
lq "GET services\nColumns: host_name description state host_hard_state service_hard_state"
my-first-ap1;PING;2;1;2


further documentation:
https://docs.checkmk.com/latest/en/livestatus.html

computer2know :: thank you for your visit :: have a nice day :: © 2024