Hi, I have set this sensor to check get the status of a webserver…
- platform: command_line
name: Test_server
command: curl -LIk -m 3 http://192.168.1.90:8888 -o /dev/null -w "%{http_code}\n" -s
scan_interval: 300
value_template: '{{ value }}'
but it remains “Unknown”.
What is my mistake ? Thanks.
Troon
(Troon)
2
It works fine on my system with the curl
line slightly modified to point at my HA:
command: curl -LIk -m 3 http://192.168.1.7:8123 -o /dev/null -w "%{http_code}\n" -s
Have you tried it with a different server? Is there anything in the logs?
Thanks @Troon, tried wit another server and u’r right it works… will investigate what’s wrong…sorry.
1 Like