This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
# Remove data from Graylog. | |
This script makes it possible to selectively remove data from an index set. | |
### Usage | |
* Setup an SSH tunnel to Graylog and Elasticsearch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set min_dim_level = 20 %} | |
{% set max_dim_level = 100 %} | |
# Calculate sun_dim_level based on sun elevation. | |
{% set sun_dim_level = 100 - (states.sun.sun.attributes.elevation|abs * 3) %} | |
{% if sun_dim_level < min_dim_level %} | |
{% set sun_dim_level = min_dim_level %} | |
{% endif %} | |
# Calculate time_dim_level based on time and reset to max. |