diff --git a/xCAT-server/lib/xcat/plugins/web.pm b/xCAT-server/lib/xcat/plugins/web.pm index c496f2495..ab00036d2 100644 --- a/xCAT-server/lib/xcat/plugins/web.pm +++ b/xCAT-server/lib/xcat/plugins/web.pm @@ -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