View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Alceu Rodrigues de Freitas Junior > Siebel-Srvrmgr > Siebel::Srvrmgr::Daemon::Action::CheckComps



Annotate this POD


View/Report Bugs
Module Version: 0.29   Source  


Siebel::Srvrmgr::Daemon::Action::CheckComps - subclass of Siebel::Srvrmgr::Daemon::Action to verify components status


    use Siebel::Srvrmgr::Daemon::Action::CheckComps;
    my $return_data = Siebel::Srvrmgr::Daemon::ActionStash->instance();
    my $comps = [ {name => 'SynchMgr', ok_status => 'Running'}, { name => 'WfProcMgr', ok_status => 'Running'} ];
    my $action = Siebel::Srvrmgr::Daemon::Action::CheckComps->new(
                                                                         parser => Siebel::Srvrmgr::ListParser->new(), 
                                                                         params => [ $server1, $server2 ]
    # do something with $return_data


This subclass of Siebel::Srvrmgr::Daemon::Action will try to find a Siebel::Srvrmgr::ListParser::Output::Tabular::ListComp object in the given array reference given as parameter to the do method and compares the status of the components (CP_DISP_RUN_STATE) with the array reference given as parameter.

The do method of Siebel::Srvrmgr::Daemon::Action::CheckComps uses Siebel::Srvrmgr::Daemon::ActionStash to enable the program that created the object instance to be able to fetch the information returned.

This module was created to work close with Nagios concepts, especially regarding threshold levels (see new method for more details).



The new method returns a instance of Siebel::Srvrmgr::Daemon::Action::CheckComps. The parameter expected are the same ones of any subclass of Siebel::Srvrmgr::Daemon::Action, but the params attribute has a important difference: it expects an array reference with instances of classes that have the role Siebel::Srvrmgr::Daemon::Action::CheckComps::Server.

The server instance itself will expect to have multiple instances of objects representing a Siebel Component and those instances must be of a class that has the Moose role Siebel::Srvrmgr::Daemon::Action::CheckComps::Component applied.

See the examples directory of this distribution, uh, examples of implementation.


Validates if the params array reference have objects with the Siebel::Srvrmgr::Daemon::Action::Check::Server role applied.


Expects a array reference as the buffer output from srvrmgr program as a parameter.

This method will check the output from srvrmgr program parsed by Siebel::Srvrmgr::ListParser::Output::Tabular::ListComp object and compare each component recovered status with the status defined in the array reference given to params method during object creation.

It will return 1 if this operation was executed successfuly and request a instance of Siebel::Srvrmgr::Daemon::ActionStash, calling it's method instance and then set_stash with a hash reference as it's content. Otherwise, the method will return 0 and no data will be set to the ActionStash object.

The hash reference stored in the ActionStash object will have the following structure:

    $VAR1 = {
              'foobar_server' => {
                                   'CompAlias1' => 0,
                                   'CompAlias2' => 1
              'foobar2_server' => {
                                    'CompAlias1' => 1,
                                    'CompAlias2' => 1

If the servername passed during the object creation (as params attribute of new method) cannot be found in the buffer parameter, the object will raise an exception.

Beware that this Action subclass can deal with multiple servers, as long as the buffer output is from a list comp, list all server/components that are part of the Siebel Enterprise.



Alceu Rodrigues de Freitas Junior, <>


This software is copyright (c) 2012 of Alceu Rodrigues de Freitas Junior, <>

This file is part of Siebel Monitoring Tools.

Siebel Monitoring Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Siebel Monitoring Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Siebel Monitoring Tools. If not, see

syntax highlighting: