wiki:request

Version 13 (modified by krit, 2 years ago) (diff)

--

Naemond query

Ref check_mk
Ref naemon

OMD[monitor@0e]:~$ lq "GET services\nColumns: host_name description state \nFilter: host_name = RUTest0001 \nFilter: acknowledged = 1 \nFilter: state != 0 "
OMD[monitor@cd203ce131df]:~$ lq "GET services\nColumns: host_name host_state description state \nFilter: host_name = localhost \nFilter: host_state = 2 \nFilter: state != 0" localhost;2;ssh;1
OMD[monitor@cd]:~$ printf "GET hosts\nColumns: services_with_state notifications_enabled num_services \n" | unixcat ~/tmp/run/live
lq "GET services\nColumns: host_name host_state description state host_last_notification notifications_enabled\nFilter: host_name = localhost \nFilter: host_state != 0 \nFilter: state != 0"
printf "[%lu] SEND_CUSTOM_SVC_NOTIFICATION;localhost;ssh;0;omdadmin;SSH notify by KT.\n"  > /opt/omd/sites/monitor/tmp/run/naemon.cmd 
lq "GET services\nColumns: host_name host_state description state host_last_notification notifications_enabled  last_hard_state_change  last_hard_state last_state\nFilter: host_name = localhost " 

run as root

root@0e3f9eda2de0:~# printf "GET hosts\nColumns: services_with_state notifications_enabled num_services \n" | /omd/sites/monitor/bin/unixcat /omd/sites/monitor/tmp/run/live 

root@0e3f9eda2de0:~# printf "GET services\nColumns: host_name host_state description state host_last_notification notifications_enabled  last_hard_state_change  last_hard_state last_state\nFilter: host_name = BU_ANA7953 \n" | /omd/sites/monitor/bin/unixcat /omd/sites/monitor/tmp/run/live

Attachments (2)

Download all attachments as: .zip