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:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -3,7 +3,7 @@
|
|||
# Plugin to monitor Forefront Client Security status in MOM database
|
||||
#
|
||||
# Copyright (c) 2008 Rune Nordbøe Skillingstad - <rune.skillingstad@ntnu.no>
|
||||
#
|
||||
#
|
||||
# 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, 1991.
|
||||
|
@ -18,17 +18,17 @@
|
|||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# USA.
|
||||
#
|
||||
# Parameters:
|
||||
# Parameters:
|
||||
#
|
||||
# config
|
||||
# autoconf
|
||||
# suggest
|
||||
#
|
||||
# Config variables
|
||||
#
|
||||
#
|
||||
# dsn - If DSN name differs from hostname
|
||||
# dbuser - Valid MS SQL user (Windows authentication is possible using "DOMAIN\user")
|
||||
# dbpass - Password
|
||||
# dbpass - Password
|
||||
#
|
||||
# Install guide:
|
||||
# This plugin relies on correct configured ODBC for the MOM database
|
||||
|
@ -36,28 +36,28 @@
|
|||
# * Install and configure FreeTDS and DBD::Sybase (packages tdsodbc and libdbd-sybase-perl on Ubuntu)
|
||||
# - DBD::Sybase is preferred over ODBC because of strange TEXT field handling in DBD::ODBC
|
||||
#
|
||||
# Example
|
||||
# Example
|
||||
# /etc/freetds/freetds.conf:
|
||||
# [MyHost]
|
||||
# host = MyHost.domain.tld
|
||||
# port = 1433
|
||||
# tds version = 7.0
|
||||
#
|
||||
#
|
||||
# Copy this script to /usr/share/munin/plugins and run "munin-node-configure --shell"
|
||||
# If freetds.conf has one or more lines containing "host = <server>", the output will be something like this:
|
||||
# ln -s /usr/share/munin/plugins/forefront_ /etc/munin/plugins/forefront_MyHost.Domain.tld_computers
|
||||
# ln -s /usr/share/munin/plugins/forefront_ /etc/munin/plugins/forefront_MyHost.domain.tld_deployments
|
||||
# ln -s /usr/share/munin/plugins/forefront_ /etc/munin/plugins/forefront_MyHost.domain.tld_status
|
||||
#
|
||||
# To manually add, symlink forefront_ to forefront_MyHost.domain.tld_computers,
|
||||
# forefront_MyHost.domain.tld_deployments and forefront_MyHost.domain.tld_status
|
||||
# To manually add, symlink forefront_ to forefront_MyHost.domain.tld_computers,
|
||||
# forefront_MyHost.domain.tld_deployments and forefront_MyHost.domain.tld_status
|
||||
#
|
||||
# Add your DSN and user/password to /etc/munin/plugin-conf.d/munin-node:
|
||||
# [forefront_MyHost.domain.tld_*]
|
||||
# env.dsn MyHost
|
||||
# env.dbuser <user>
|
||||
# env.dbpass <password>
|
||||
#
|
||||
#
|
||||
# On your munin server, add this to /etc/munin/munin.conf
|
||||
#
|
||||
# [MyHost.domain.tld]
|
||||
|
@ -211,7 +211,7 @@ EOF
|
|||
my %profiles = &deployments_general();
|
||||
foreach my $policy (sort(keys(%profiles))) {
|
||||
my $field = encode_base64($policy);
|
||||
chomp($field);
|
||||
chomp($field);
|
||||
print $field . ".label " . $profiles{$policy}{'name'} . "\n";
|
||||
print $field . ".draw LINE2\n";
|
||||
print $field . ".info Numer of computers having the " .$profiles{$policy}{'name'} . " profile.\n";
|
||||
|
@ -268,7 +268,7 @@ sub status_fetch {
|
|||
while(my @row = $sth->fetchrow_array) {
|
||||
$alerts{$row[0]} = 0;
|
||||
}
|
||||
$sth = $dbh->prepare("SELECT al.Level, COUNT(a.AlertLevel) FROM Alert a, AlertLevel al WHERE a.AlertLevel = al.Level AND a.ResolutionState <> 255 GROUP BY al.Level",
|
||||
$sth = $dbh->prepare("SELECT al.Level, COUNT(a.AlertLevel) FROM Alert a, AlertLevel al WHERE a.AlertLevel = al.Level AND a.ResolutionState <> 255 GROUP BY al.Level",
|
||||
{odbc_exec_direct => 1});
|
||||
$sth->execute();
|
||||
while(my @row = $sth->fetchrow_array) {
|
||||
|
@ -300,7 +300,7 @@ sub deployments_general {
|
|||
$profiles{'d3b75be9-7125-4db1-8b24-93004bd9d88e'}{'instance'} = "";
|
||||
$profiles{'d3b75be9-7125-4db1-8b24-93004bd9d88e'}{'count'} = 0;
|
||||
my $dbh = DBI->connect("DBI:Sybase:$dsn", $dbuser, $dbpass, { PrintError => 1, AutoCommit => 1});
|
||||
|
||||
|
||||
my $sth = $dbh->prepare("SELECT Id, Name, LatestInstanceID From fcs_Profiles", {odbc_exec_direct => 1});
|
||||
$sth->execute();
|
||||
while(my @row = $sth->fetchrow_array) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue