# MonArch - Groundwork Monitor Architect # MonarchCallOut.pm # ############################################################################ # Release 3.1 # September 2009 ############################################################################ # # Original author: Scott Parris # # Copyright 2007, 2008, 2009 GroundWork Open Source, Inc. (GroundWork) # All rights reserved. This program is free software; you can redistribute # it and/or modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program 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 this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # use strict; package CallOut; sub submit(@) { my $monarch_home = $_[1]; my $results = undef; # ============================ # Enter your custom code here. # ============================ $results = qx(/usr/local/groundwork/scripts/sg_autocreate -m); $results .= "ERROR: Servicegroup auto-creation failed.\n" if $?; if ($ENV{REQUEST_METHOD}) { $results =~ s/&/&/g; $results =~ s//>/g; $results =~ s/\n/
\n/g; } return $results; } 1;