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
}
Changing Threshold for Oracle Health Check invalid objects
-
eadarsh400
- Posts: 2
- Joined: Wed Mar 11, 2015 12:37 am
Re: Changing Threshold for Oracle Health Check invalid objec
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
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
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Changing Threshold for Oracle Health Check invalid objec
Can you post the command definition for check_oracle_health-server
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Changing Threshold for Oracle Health Check invalid objec
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.
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
I believe you will need to change your command from this:
to this:
and set whatever threshold you would like to use in the service config.
Code: Select all
define command{
command_name check_oracle_health
command_line $USER1$/check_oracle_health --connect=DESA01 --username=nagios --password=xxx --mode=$ARG1$
}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$
}Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changing Threshold for Oracle Health Check invalid objec
Thanks for your answers, Problem is solved using your recomendations
Re: Changing Threshold for Oracle Health Check invalid objec
I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee