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
This commit is contained in:
godloth 2016-11-13 06:26:07 -05:00 committed by Fabian Affolter
parent a2eb3150d0
commit 26b74031e2

View File

@ -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 %}