From 26b74031e246f0052fcd23a61cd1ab11e2e2c397 Mon Sep 17 00:00:00 2001 From: godloth Date: Sun, 13 Nov 2016 06:26:07 -0500 Subject: [PATCH] added example for command_line sensor (#1429) Added working example for this sensor that i've seen a lot on the community where a lot of those examples were obsolete and even experienced user were confused . The issue came from the update in the logger messages in the home-assistant.log file --- .../_components/sensor.command_line.markdown | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/_components/sensor.command_line.markdown b/source/_components/sensor.command_line.markdown index 6c7f6a42b48..ad54969e519 100644 --- a/source/_components/sensor.command_line.markdown +++ b/source/_components/sensor.command_line.markdown @@ -70,6 +70,27 @@ Thanks to the [`proc`](https://en.wikipedia.org/wiki/Procfs) file system, variou The `correction_factor` will make sure that the value is shown in a useful format in the frontend. +### {% Monitoring the failed login attempt on HA %} + +If you want to get the fillowing in case you want to know if someone is hammering your server is open on the net + + +```yaml +# Example configuration.yaml entry +sensor 6: + platform: command_line + name: badlogin + command: grep -c 'Login attempt' /home/hass/.homeassistant/home-assistant.log +``` +*Make sure to configure the logger to monitor the proper component at the proper level* + +```yaml +# Example working logger settings that works +logger: + default: critical + logs: + homeassistant.components.http: warning +``` ### {% linkable_title Details about the upstream Home Assistant release %}