-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
agents: split checks into separate files
- Loading branch information
Showing
14 changed files
with
679 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
plugins/plugins-available/agents/lib/Thruk/Agents/SNClient/Checks/CPU.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package Thruk::Agents::SNClient::Checks::CPU; | ||
|
||
use warnings; | ||
use strict; | ||
|
||
=head1 NAME | ||
Thruk::Agents::SNClient::Checks::CPU - returns cpu checks for snclient | ||
=head1 METHODS | ||
=cut | ||
|
||
########################################################## | ||
|
||
=head2 get_checks | ||
get_checks() | ||
returns snclient checks | ||
=cut | ||
sub get_checks { | ||
my($self, $c, $inventory, $hostname, $password, $section) = @_; | ||
my $checks = []; | ||
|
||
if($inventory->{'cpu'}) { | ||
push @{$checks}, { | ||
'id' => 'cpu', | ||
'name' => 'cpu', | ||
'check' => 'check_cpu', | ||
'parent' => 'agent version', | ||
}; | ||
push @{$checks}, { | ||
'id' => 'cpuutilization', | ||
'name' => 'cpu utilization', | ||
'check' => 'check_cpu_utilization', | ||
'parent' => 'agent version', | ||
}; | ||
} | ||
|
||
return $checks; | ||
} | ||
|
||
########################################################## | ||
|
||
1; |
Oops, something went wrong.