lunedì 5 marzo 2012

Eseguire procedure esterne con IBM Netcool Omnibus

Mi è capitato di recente di dover sincronizzare alla chiusura di un allarme su Omnibus l'esecuzione di uno script esterno.

Per fare questo ho creato una procedura:

create or replace procedure close_ttmars_ticket (in identifier character(255), in tt_id character(255))
executable '$OMNIHOME/utils/closeTTMARS.sh'
host 'localhost'
user 0
group 0
arguments '\'' + identifier + '\' \'' + tt_id + '\'';

e l'ho richiamata dall'interno di un trigger after reinsert.
Alla prima esecuzione della procedura all'interno del log del Process Agent deamon (PAD) viene intercettato il seguente errore:

Mar 2 15:46:16 2012: Error: Failed to find the specified group 0 for process launch.

La configurazione del PAD per l'Object Server (OS) in questione era la seguente:

nco_process 'ROS_Server'
{
Command '$OMNIHOME/bin/nco_objserv -name ROS -pa NCO_PA -listeningport 6970' run as 0
Host = 'hostname'
Managed = True
RestartMsg = '${NAME} running as ${EUID} has been restored on ${HOST}.'
AlertMsg = '${NAME} running as ${EUID} has died on ${HOST}.'
RetryCount = 0
ProcessType = PaPA_AWARE
}

Il PAD viene eseguito come utente root, così come l'OS.
Grazie al gruppo IBM Tivoli Netcool di linkedin ho scoperto che per superare l'errrore era sufficiente agganciare l'utente root al gruppo ncoadmin e restartare il PAD.
Alla successiva esecuzione della procedura lo script è stato richiamato correttamente.

Nessun commento:

Posta un commento