mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 08:46:51 +00:00
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:
parent
a2eb3150d0
commit
26b74031e2
@ -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 %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user