Info |
---|
This article provides information on Livestatus queries. |
Status |
---|
colour | Green |
---|
title | LAST TESTED ON CHECKMK 2.0.0P1 |
---|
|
Livestatus queries over network
For SSH connection
Code Block |
---|
|
OMD[mysite]~# ssh -t root@host ''su -site' "lq 'GET hosts\nColumns: name'" |
For TLS connection
Code Block |
---|
|
OMD[mysite]~# echo -e "GET hosts\nColumns: name\n"| openssl s_client -connect localhost:6999 -ign_eof -quiet |
For TLS connection with certificate verification
Code Block |
---|
|
OMD[mysite]~# echo -e "GET hosts\nColumns: name\n\n" | openssl s_client -CAfile /tmp/s1.pem -verify 3 -quiet -verify_hostname s1 -verify_return_error -connect localhost:6560 2>/dev/null |
please replace /tmp/s1.pem with the site name and s1 with the name of the site
For Plain text
Code Block |
---|
|
OMD[mysite]~# echo -e "GET hosts\nColumns: name\n" | nc -q1 127.0.0.1 6999
OMD[mysite]~# telnet 127.0.0.1 6999 |
Related articles
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | KB |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label in ("lql","lql_queries","livestatus") and type = "page" and space = "KB" |
---|
labels | livestatus lql lql_queries |
---|
|