Notified user if ganglia RPMs are not installed when "Monitor on" is clicked.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8217 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2010-11-19 20:31:00 +00:00
parent c98beba6af
commit 34a8a6f357

View File

@ -52,6 +52,7 @@ sub process_request {
'gangliastart' => \&web_gangliastart,
'gangliastop' => \&web_gangliastop,
'gangliastatus' => \&web_gangliastatus,
'gangliacheck' => \&web_gangliacheck,
#'xdsh' => \&web_xdsh,
#THIS list needs to be updated
@ -550,6 +551,33 @@ sub web_gangliastop() {
#-------------------------------------------------------
=head3 web_gangliacheck
Description : Check if ganglia RPMs are installed
Arguments : Node range
Returns : Nothing
=cut
#-------------------------------------------------------
sub web_gangliacheck() {
my ( $request, $callback, $sub_req ) = @_;
# Get node range
my $nr = $request->{arg}->[1];
if ( !$nr ) {
$nr = '';
}
# Check if ganglia RPMs are installed
my $info;
my $info = `xdsh $nr "rpm -q ganglia-gmond libganglia libconfuse"`;
$callback->( { info => $info } );
return;
}
#-------------------------------------------------------
=head3 web_chtab
Description : Add, delete or update rows in the database tables