Page 1 of 1

Changing Threshold for Oracle Health Check invalid objects

Posted: Fri May 29, 2015 2:47 pm
by Jos3D
Hi, I need to change the Threshold for one specific server that have too much invalids objects (Oracle database). Service example definition:

define service{
use local-service
host_name server
service_description Objetos invalidos
check_command check_oracle_health-server!invalid-objects!0!0
}

Re: Changing Threshold for Oracle Health Check invalid objec

Posted: Sat May 30, 2015 3:34 pm
by eadarsh400
Hi Jos3D,

You should probably use Custom object variables

Host definition:

define host{
use generic-host
host_name server
address 127.0.0.1
hostgroups oracle-servers
_WARNING 10
_CRITICAL 20
}

Service definition:

define service{
use local-service
host_name server
service_description Objetos invalidos
check_command check_oracle_health-server!invalid-objects!$_HOSTWARNING$!$_HOSTCRITICAL$
}

In case of hostgroup definition

Host definition:

define host{
use generic-host
host_name server
address 127.0.0.1
hostgroups oracle-servers
_WARNING 10
_CRITICAL 20
}

Service definition:

define service{
use local-service
hostgroups oracle-servers
service_description Objetos invalidos
check_command check_oracle_health-server!invalid-objects!$_HOSTWARNING$!$_HOSTCRITICAL$
}

Now you can define custom thresholds for each server with one service definition (I understand that you have many oracle servers)

Hope it helps

Thanks,
Addy

Re: Changing Threshold for Oracle Health Check invalid objec

Posted: Sun May 31, 2015 8:25 pm
by Box293
Can you post the command definition for check_oracle_health-server

Re: Changing Threshold for Oracle Health Check invalid objec

Posted: Sun May 31, 2015 11:34 pm
by Jos3D
Thanks for your answer, the command definition is:

define command{
command_name check_oracle_health
command_line $USER1$/check_oracle_health --connect=DESA01 --username=nagios --password=xxx --mode=$ARG1$
}

As you can see "desa01" is the oracle instance.

Re: Changing Threshold for Oracle Health Check invalid objec

Posted: Mon Jun 01, 2015 12:49 pm
by lmiltchev
I believe you will need to change your command from this:

Code: Select all

define command{
command_name check_oracle_health
command_line $USER1$/check_oracle_health --connect=DESA01 --username=nagios --password=xxx --mode=$ARG1$
}
to this:

Code: Select all

define command{
command_name check_oracle_health
command_line $USER1$/check_oracle_health --connect=DESA01 --username=nagios --password=xxx --mode=$ARG1$ --warning=$ARG2$ --critical=$ARG3$
}
and set whatever threshold you would like to use in the service config.

Re: Changing Threshold for Oracle Health Check invalid objec

Posted: Mon Jun 01, 2015 4:47 pm
by Jos3D
Thanks for your answers, Problem is solved using your recomendations

Re: Changing Threshold for Oracle Health Check invalid objec

Posted: Mon Jun 01, 2015 4:53 pm
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!