Skip to content

Commit

Permalink
snmp__df - fallback to filesystems only if no disks/partitions found
Browse files Browse the repository at this point in the history
helps graphing a Check Point SecurePlatform (SPLAT)
  • Loading branch information
knan-linpro committed Jan 11, 2011
1 parent 0c62cb7 commit d5485e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/node.d/snmp__df.in
Expand Up @@ -145,7 +145,9 @@ foreach my $kept (@keep) # For each disk...

my $stor_id;

if (defined $partitions{""})
my $foundpartitions = keys %partitions;

if ($foundpartitions == 0 or defined $partitions{""})
{ # Oh bugger. Some (or all) mountpoints were undeterminable. The backup
# solution is to just graph everything that claims to be a FixedDisk,
# without checking if it's removable etc
Expand Down

3 comments on commit d5485e7

@cycloon
Copy link
Contributor

@cycloon cycloon commented on d5485e7 Feb 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this check is overkill. The original if (defined()) was wrong and should have been if (! defined()). I will submit a fix.

@knan-linpro
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not convinced, cycloon. What about a partition with a blank mountpoint?

@cycloon
Copy link
Contributor

@cycloon cycloon commented on d5485e7 Apr 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok good point.

Please sign in to comment.