I’m trying to create a sensor to let me know if a service is running on a remote linux machine.
I have the command sorted, I’ve tested it in Terminal and it returns the expected “running”
However when I put the command into a yaml file it doesn’t seem to do anything, I’m not even getting a blank sensor.
in configuration. yaml I have:
command_line: !include_dir_merge_list command_line/
Then in the command_line folder I have a Mythtv_backend.yaml file which contains
command_line:
- sensor:
name: "MythTV Backend Status"
command: "ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts [email protected] systemctl show mythtvbackend | awk -F= '/^SubState=/ {print $2}'"
scan_interval: 60
I’ve increased the loggin level to debug and I even tried appending >2 /config/command.log to the command. In both instances there were no errors.
So no sensor in Developer tools/States and nothing in the logs.