Menu

#117 oracle monitor ignore host alias

to_be_fixed_later
closed-fixed
nobody
5
2002-12-24
2002-09-23
No

I was triying to use oracle monitor module to monitor an
oracle database.

The test is always reported with localhost name ignoring
the hostname I put at the beginning of config line, or its
alias.

I digged a little bit into module source and saw that the
hostname is "hardcoded" as $uxmon:hostname.

I made the following changes and get a correct behavior:

I changed the uxmon/Config/oracle file
to send the host alias to the oracle check module
$oracle->add_check($args{"alias"}, $args
{ORACLE_CONNECT},$args{ORACLE_BASE},$args
{ORACLE_HOME},$args{ORACLE_NLS_LANG},$args
{ORACLE_N
LS33},$args{ORACLE_TNSADMIN},$args
{ORA_USER},$args{ORA_PASS});

In file ./bin/Monitor/oracle.pm
I get the hostname alias and use it to identify the check
item:
sub add_check {
####################
# Var definitions
####################
my ($server,$db_sid,$db_name,$item);
my( $self, $alias, $ORACLE_CONNECT,
$ORACLE_BASE,$ORACLE_HOME,$ORACLE_NLS_L
ANG,$ORACLE_NLS33,$TNS_ADMIN,$ORA_USER,$O
RA_PASS) = @
_;
my( $htable ) = $self->{"htable"};

#######################
($server,$db_sid,$db_name)=split
(/:/,$ORACLE_CONNECT);
$item = $alias.".$db_name";
($item = $alias.".oracle") unless( $item );
push( @$htable, join ("\x00" ,
$item,$ORACLE_CONNECT,
$ORACLE_BASE,$ORACLE_HOME,$ORACLE_NLS_L
ANG,$ORACLE_NLS33,$TNS_ADMIN,$ORA_U
SER,$ORA_PASS ) );
}

Discussion

  • Thomas Aeby

    Thomas Aeby - 2002-12-18
    • status: open --> open-fixed
     
  • Thomas Aeby

    Thomas Aeby - 2002-12-18

    Logged In: YES
    user_id=77961

    fixed in the CVS repository ... thank you very much for the
    patch!

     
  • Thomas Aeby

    Thomas Aeby - 2002-12-24

    Logged In: YES
    user_id=77961

    released ...

     
  • Thomas Aeby

    Thomas Aeby - 2002-12-24
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB