mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 18:07:20 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -13,7 +13,7 @@
|
|||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
|
@ -22,19 +22,19 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------------------------------
|
||||
# 20100310 v1.01 ls
|
||||
# as threatened, shows now "temperatures" of active hosts.deny lines. Recent additions are
|
||||
# as threatened, shows now "temperatures" of active hosts.deny lines. Recent additions are
|
||||
# displayed in bright red, turning to blue as older the addition rules are.
|
||||
# This requires denyhosts to add line to hosts.deny in a specific format. Also, times are currently
|
||||
# hardcoded, and not a lot of flexibility adjusting them through parameters.
|
||||
# A line in hosts.deny should come with a comment, looking like:
|
||||
# # DenyHosts: Sat Mar 6 01:11:57 2010 | sshd: 87.101.51.198
|
||||
# 8 graphs are drawn from that depicting number of rules in 24 h increments. Different colours are
|
||||
# assigned to graphs which are <24h, 24-48h, 48-72h ... old. The last (coldest) graph shows rules
|
||||
# assigned to graphs which are <24h, 24-48h, 48-72h ... old. The last (coldest) graph shows rules
|
||||
# which have been added > 168h ago.
|
||||
# I'm considerering to change age granularity to hours, rather than days, and plot many graphs (64 or 128,
|
||||
# which are nice for colour calculations), showing more of a colour cloud than discernible areas.
|
||||
# which are nice for colour calculations), showing more of a colour cloud than discernible areas.
|
||||
# The plugin must have permission to read /etc/hosts.deny, of course.
|
||||
# 20100308, v1.0, ls
|
||||
# 20100308, v1.0, ls
|
||||
# Will probably add multiple stacked graphs, indicative for addition/removal date of denies,
|
||||
# instead of a boring single area graph.
|
||||
# ------------------------------------------------------------------------------------------------------
|
||||
|
@ -80,7 +80,7 @@ run_fetch() {
|
|||
TOTAL=0
|
||||
NOW=$(date +%s)
|
||||
sed -n 's/^\# DenyHosts: //;s/ | .*//gp' $DENY | # strip all but date
|
||||
while read DATE; do
|
||||
while read DATE; do
|
||||
echo $(((NOW - $(date -d "$DATE" +%s))/86400)) # calculate rule age
|
||||
done > $STATEFILE # rather than going through temp file, the age could be
|
||||
for AGE in {0..6} ; do # used to increment an array element with that index.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue