My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Invocation  
This page provides some script samples for handling monitoring requests
Updated Feb 25, 2012 by yann.lambret@gmail.com

Bash sample script

#!/bin/bash

CURRENT_PATH=$(dirname "$0")

if [ "$#" -ne 1 ] ; then
    echo "Usage: wlsagent.sh 'param1=value<;w;c>&param2=value2<;w;c>&...&parmamN=value<;w;c>'"
fi

if [ -f "$CURRENT_PATH/wlsagent.conf" ]; then
    . ${CURRENT_PATH}/wlsagent.conf
fi

wget -q -O - http://${WLSAGENT_HOST}:${WLSAGENT_PORT}/${WLSAGENT_URI}?"$@" | awk -F\| '{ print $2"|"$3  ; exit $1 }'

exit $?

Assuming the file wlsagent.conf contains the following:

export WLSAGENT_HOST="localhost"
export WLSAGENT_PORT="9090"
export WLSAGENT_URI="wlsagent/WlsAgent"


Sign in to add a comment
Powered by Google Project Hosting