2014-05-21 Vanessa Gil <vanessa.gil@artica.es>

* pc/plugins/pandora_df
	  shellscript/linux/plugins/pandora_df
	  unix/plugins/pandora_df: Applied patch 
	'pandora_fs.excludefs.patch'.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9972 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2014-05-21 07:53:15 +00:00
parent b0962cfdf8
commit bb7a394f39
4 changed files with 58 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2014-05-21 Vanessa Gil <vanessa.gil@artica.es>
* pc/plugins/pandora_df
shellscript/linux/plugins/pandora_df
unix/plugins/pandora_df: Applied patch
'pandora_fs.excludefs.patch'.
2014-05-20 Vanessa Gil <vanessa.gil@artica.es> 2014-05-20 Vanessa Gil <vanessa.gil@artica.es>
* win32/bin/pandora_agent.conf: Fixed typographic error. * win32/bin/pandora_agent.conf: Fixed typographic error.

View File

@ -6,7 +6,8 @@
# #
# pandora_df Retrieve filesystem disk usage. By default information for all # pandora_df Retrieve filesystem disk usage. By default information for all
# filesystems is returned, but one or more filesystems may be # filesystems is returned, but one or more filesystems may be
# specified as command line parameters. # specified as command line parameters. If parameter start with
# a '-', the filesystem is excluded from results.
# #
# Sample usage: ./pandora_df tmpfs /dev/sda1 # Sample usage: ./pandora_df tmpfs /dev/sda1
# #
@ -33,8 +34,19 @@ if ($#ARGV < 0) {
# Parse command line parameters # Parse command line parameters
my %filesystems; my %filesystems;
my %excluded_filesystems;
my $onlyexclude = 1;
foreach my $fs (@ARGV) { foreach my $fs (@ARGV) {
$filesystems{$fs} = '-1%'; if (substr($fs,0,1) eq '-') {
$excluded_filesystems{substr($fs,1,)} = '-1%';
} else {
$filesystems{$fs} = '-1%';
$onlyexclude = 0;
}
}
if ($onlyexclude) {
$all_filesystems = 1;
} }
# Retrieve filesystem information # Retrieve filesystem information
@ -51,7 +63,9 @@ if ($#df < 0) {
foreach my $row (@df) { foreach my $row (@df) {
my @columns = split (' ', $row); my @columns = split (' ', $row);
exit 1 if ($#columns < 4); exit 1 if ($#columns < 4);
$filesystems{$columns[0]} = $columns[4] if (defined ($filesystems{$columns[0]}) || $all_filesystems == 1); if (defined ($filesystems{$columns[0]}) || ($all_filesystems == 1 && !defined ($excluded_filesystems{$columns[0]}))) {
$filesystems{$columns[0]} = $columns[4] ;
}
} }
while (my ($filesystem, $use) = each (%filesystems)) { while (my ($filesystem, $use) = each (%filesystems)) {

View File

@ -6,7 +6,8 @@
# #
# pandora_df Retrieve filesystem disk usage. By default information for all # pandora_df Retrieve filesystem disk usage. By default information for all
# filesystems is returned, but one or more filesystems may be # filesystems is returned, but one or more filesystems may be
# specified as command line parameters. # specified as command line parameters. If parameter start with
# a '-', the filesystem is excluded from results.
# #
# Sample usage: ./pandora_df tmpfs /dev/sda1 # Sample usage: ./pandora_df tmpfs /dev/sda1
# #
@ -33,8 +34,19 @@ if ($#ARGV < 0) {
# Parse command line parameters # Parse command line parameters
my %filesystems; my %filesystems;
my %excluded_filesystems;
my $onlyexclude = 1;
foreach my $fs (@ARGV) { foreach my $fs (@ARGV) {
$filesystems{$fs} = '-1%'; if (substr($fs,0,1) eq '-') {
$excluded_filesystems{substr($fs,1,)} = '-1%';
} else {
$filesystems{$fs} = '-1%';
$onlyexclude = 0;
}
}
if ($onlyexclude) {
$all_filesystems = 1;
} }
# Retrieve filesystem information # Retrieve filesystem information
@ -51,7 +63,9 @@ if ($#df < 0) {
foreach my $row (@df) { foreach my $row (@df) {
my @columns = split (' ', $row); my @columns = split (' ', $row);
exit 1 if ($#columns < 4); exit 1 if ($#columns < 4);
$filesystems{$columns[0]} = $columns[4] if (defined ($filesystems{$columns[0]}) || $all_filesystems == 1); if (defined ($filesystems{$columns[0]}) || ($all_filesystems == 1 && !defined ($excluded_filesystems{$columns[0]}))) {
$filesystems{$columns[0]} = $columns[4] ;
}
} }
while (my ($filesystem, $use) = each (%filesystems)) { while (my ($filesystem, $use) = each (%filesystems)) {

View File

@ -6,7 +6,8 @@
# #
# pandora_df Retrieve filesystem disk usage. By default information for all # pandora_df Retrieve filesystem disk usage. By default information for all
# filesystems is returned, but one or more filesystems may be # filesystems is returned, but one or more filesystems may be
# specified as command line parameters. # specified as command line parameters. If parameter start with
# a '-', the filesystem is excluded from results.
# #
# Sample usage: ./pandora_df tmpfs /dev/sda1 # Sample usage: ./pandora_df tmpfs /dev/sda1
# #
@ -33,8 +34,19 @@ if ($#ARGV < 0) {
# Parse command line parameters # Parse command line parameters
my %filesystems; my %filesystems;
my %excluded_filesystems;
my $onlyexclude = 1;
foreach my $fs (@ARGV) { foreach my $fs (@ARGV) {
$filesystems{$fs} = '-1%'; if (substr($fs,0,1) eq '-') {
$excluded_filesystems{substr($fs,1,)} = '-1%';
} else {
$filesystems{$fs} = '-1%';
$onlyexclude = 0;
}
}
if ($onlyexclude) {
$all_filesystems = 1;
} }
# Retrieve filesystem information # Retrieve filesystem information
@ -51,7 +63,9 @@ if ($#df < 0) {
foreach my $row (@df) { foreach my $row (@df) {
my @columns = split (' ', $row); my @columns = split (' ', $row);
exit 1 if ($#columns < 4); exit 1 if ($#columns < 4);
$filesystems{$columns[0]} = $columns[4] if (defined ($filesystems{$columns[0]}) || $all_filesystems == 1); if (defined ($filesystems{$columns[0]}) || ($all_filesystems == 1 && !defined ($excluded_filesystems{$columns[0]}))) {
$filesystems{$columns[0]} = $columns[4] ;
}
} }
while (my ($filesystem, $use) = each (%filesystems)) { while (my ($filesystem, $use) = each (%filesystems)) {