1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -1,5 +1,5 @@
#!/bin/bash
#
#
# A Munin Plugin to show auth stuff
# Created by Dominik Schulz <lkml@ds.gauner.org>
# http://developer.gauner.org/munin/

View file

@ -2,7 +2,7 @@
# Plugin to monitor the number of hosts denied by BlockHosts
#
# $Log$
# based on:
# based on:
# denyhosts plugin
# Revision 1.0 2009/06/05 16:00:00 tjansson
#
@ -11,7 +11,7 @@
# Parameters:
# config (required)
# autoconf (optional - used by munin-config)
LOG=/etc/hosts.allow
if [ "$1" = "autoconf" ]; then
@ -23,9 +23,9 @@ if [ "$1" = "autoconf" ]; then
exit 1
fi
fi
if [ "$1" = "config" ]; then
echo 'graph_title Hosts denied by BlockHosts'
echo 'graph_args -l 0'
echo 'graph_vlabel denied hosts '
@ -34,6 +34,6 @@ if [ "$1" = "config" ]; then
echo 'HostsWatched.label Hosts watched by BlockHosts'
exit 0
fi
echo HostsDenied.value `egrep -c " : deny" $LOG`
echo HostsWatched.value `egrep -c "#bh: ip:" $LOG`

View file

@ -2,18 +2,18 @@
########################################################################
# Copyright (c) 2012, Adrien Urban
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
#
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

View file

@ -24,7 +24,7 @@ daily archives.
env.lifetime 2
env.archive_pattern *.tar.bz2
env.backup_number 4
This will also set the warning and critical values for this plugin to 2*4 and
4, respectively, meaning that if the number of fresh files goes below those
limits, the relevant notifications will be triggerred.

View file

@ -9,7 +9,7 @@
# transparent_hugepages kernel command line parameter). All values are
# shown in (KiBi/MeBi/GiBi)Bytes.
#
# This plugin is used like many other munin plugins: put it in
# This plugin is used like many other munin plugins: put it in
# /usr/share/munin/plugins (or another appropriate location)
# and create a symlink in /etc/munin/plugins:
# > ln -s /usr/share/munin/plugins/hugepages /etc/munin/plugins

View file

@ -114,7 +114,7 @@ my $irq_types =
'sirq' => 'Software interrupts'
};
my $irq_descriptions =
my $irq_descriptions =
{
'HI' => 'High priority tasklets',
'TIMER' => 'Timer bottom half',
@ -127,7 +127,7 @@ my $irq_descriptions =
# ----------------- main ----------------
need_multigraph();
# -- autoconf --
if (defined($ARGV[0]) and ($ARGV[0] eq 'autoconf'))
if (defined($ARGV[0]) and ($ARGV[0] eq 'autoconf'))
{
printf("%s\n", (-e "/proc/interrupts" and -e "/proc/softirqs") ? "yes" : "no (stats not exists)");
exit (0);
@ -309,15 +309,15 @@ sub prepare_graphs
$gr->{'irq'}{'fields'}{$down_field_name}{'type'} = $fields->{'irq_sirq'}{'type'};
$gr->{'irq'}{'fields'}{$up_field_name}{'draw'} = $fields->{'irq_sirq'}{'draw'};
$gr->{'irq'}{'fields'}{$down_field_name}{'draw'} = $fields->{'irq_sirq'}{'draw'};
$gr->{'irq'}{'fields'}{$up_field_name}{'label'} = replace($fields->{'irq_sirq'}{'label'}, ':cpu:', $i);
$gr->{'irq'}{'fields'}{$up_field_name}{'info'} = replace($fields->{'irq_sirq'}{'info'} , ':cpu:', $i);
$gr->{'irq'}{'fields'}{$down_field_name}{'label'} = 'NaN';
$gr->{'irq'}{'fields'}{$down_field_name}{'info'} = 'NaN';
$gr->{'irq'}{'fields'}{$up_field_name}{'negative'} = $down_field_name;
$gr->{'irq'}{'fields'}{$down_field_name}{'graph'} = 'no';
# --- child graphs ---
for my $irq_type (qw(irq sirq))
{
@ -335,7 +335,7 @@ sub prepare_graphs
my @irq_names = keys %{$IRQi->{'stat'}{$irq_type}{$i}};
# names split for better sorting
for my $irq_name ((
(sort {int $a <=> int $b} grep{/^\d/} @irq_names),
(sort {int $a <=> int $b} grep{/^\d/} @irq_names),
(sort grep{!/(^\d|ERR|MIS)/} @irq_names),
(sort grep{/(ERR|MIS)/ } @irq_names)
))
@ -347,7 +347,7 @@ sub prepare_graphs
{
$gr->{$graph_name}{'fields'}{$field_name}{$fo} = replace($fields->{'irq'}{$fo}, ':irq:', $irq_name);
$gr->{$graph_name}{'fields'}{$field_name}{$fo} = replace($gr->{$graph_name}{'fields'}{$field_name}{$fo},
':irqinfo:',
':irqinfo:',
exists($IRQi->{'description'}{$irq_type}{$irq_name}) ?
$IRQi->{'description'}{$irq_type}{$irq_name} :
'');

View file

@ -18,7 +18,7 @@
# that die may not appear on the graph, and anyway their last chunk of
# CPU usage before they died is lost. You could modify this plugin to
# read SAR/psacct records if you care about that.
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2 dated June,

View file

@ -7,7 +7,7 @@
# RAM Used Anon, Exec + Libs, Page cache
# RAM Avail Free memory that can be immediately used
#
# Core logic developed by Brendan Gregg.
# Core logic developed by Brendan Gregg.
# REFERENCE: http://www.brendangregg.com/k9toolkit.html - the swap diagram.
#
# COPYRIGHT: Copyright (c) 2004 Brendan Gregg.
@ -39,7 +39,7 @@ raminfo - Plugin for monitoring memory usage
=head1 AUTHOR
Christian Braum, chrisi_braum@web.de
Core logic developed by Brendan Gregg. See K9Toolkit:
http://www.brendangregg.com/K9Toolkit/swapinfo
@ -103,7 +103,7 @@ sub value # get value for variables
my %VMinfo;
my %VMold;
foreach my $count (0..12)
foreach my $count (0..12)
{
#
# The values are counters that increment each second, here we
@ -111,7 +111,7 @@ sub value # get value for variables
# (reading them once then again a second later was not reliable).
#
foreach my $var ( "freemem" )
foreach my $var ( "freemem" )
{
$VMnow{$var} = $Kstat->{unix}->{0}->{vminfo}->{$var};
unless ($count) {
@ -148,18 +148,18 @@ sub value # get value for variables
my $ram_used = $pagestotal - $freemem - $ram_kernel - $ram_locked;
### format values
my $freemem_B = sprintf( "%d ", $freemem * $PAGETOBYTE );
my $pp_kernel_B = sprintf( "%d ", $pp_kernel * $PAGETOBYTE );
my $pageslocked_B = sprintf( "%d ", $pageslocked * $PAGETOBYTE );
my $pagestotal_B = sprintf( "%d ", $pagestotal * $PAGETOBYTE );
my $ram_unusable_B = sprintf( "%d ", $ram_unusable * $PAGETOBYTE );
my $ram_kernel_B = sprintf( "%d ", $ram_kernel * $PAGETOBYTE );
my $ram_kernel_B = sprintf( "%d ", $ram_kernel * $PAGETOBYTE );
my $ram_locked_B = sprintf( "%d ", $ram_locked * $PAGETOBYTE );
my $ram_used_B = sprintf( "%d ", $ram_used * $PAGETOBYTE );
my $ram_total_B = sprintf( "%d ", $ram_total * $PAGETOBYTE );
# --- assign the variables ---
# --- assign the variables ---
$h_ramvalues{"Unusable.value"} = "$ram_unusable_B";
$h_ramvalues{"Kernel.value"} = "$ram_kernel_B";
$h_ramvalues{"Locked.value"} = "$ram_locked_B";
@ -201,7 +201,7 @@ sub config # print config message and exit.
"Used ",
"Avail ",
"\n";
print "Unusable.label Unusable \n";
print "Unusable.draw AREA \n";
print "Unusable.info RAM consumed by the OBP and TSBs.\n";

View file

@ -2,7 +2,7 @@
"""
Paul Wiegmans (p.wiegmans@bonhoeffer.nl)
2009 dec 18
This munin-node plugin reads a temperature value from a serial port,
This munin-node plugin reads a temperature value from a serial port,
provided by a Arduino with temperature sensor.
For details see: http://amber.bonhoeffer.nl/temperatuur/
@ -29,7 +29,7 @@ def gettemperature():
t += 1
ser.close()
# shamelessly copied from weather_temp_
# shamelessly copied from weather_temp_
if len(sys.argv) == 2 and sys.argv[1] == "autoconf":
@ -50,4 +50,4 @@ else:
print 'temperature.value %s' % gettemperature()

View file

@ -18,7 +18,7 @@
# that die may not appear on the graph, and anyway their last chunk of
# CPU usage before they died is lost. You could modify this plugin to
# read SAR/psacct records if you care about that.
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2 dated June,