Closed Ssreelsadm closed 1 year ago
Hello @Ssreelsadm This repository is for code that monitors the Operating System, not a database. New Relic does indeed have an Oracle database integration, you can find it here, which is fully supported by NR Support and does not need to be on the AIX server where the DB server is so you can locate it on a supported O/S. You can find related solutions by searching https://discuss.newrelic.com
Hi All,
We are working on the Oracle Database monitoring in AIX machine . Data is not reporting for Oracle database even though the AIX machine is reporting to new relic. Please find below the logs for reference. (vix01)(oracle)(CASPROD)/tech/newrelic> /tech/newrelic/newrelic_ora_mon.sh New Relic Oracle Plug-in Instance 1 is NOT running Attempt to start Oracle Plug-in Instance 1
Change Record:
!/bin/sh
usage() { echo "Usage: $0 start | all "
echo " $0 stop | all "
echo " $0 status | all "
}
datestr=
date
javaexe='/usr/java8_64/jre/bin/java'
Check if java 8 is installed
if [ ! -f "$javaexe" ] ; then javaexe='/usr/java8/jre/bin/java' if [ ! -f "$javaexe" ] ; then echo "$javaexe does not exist" echo "Exiting with error code 1" exit 1 fi PATH=/usr/java8/jre/bin:/usr/java8/bin:$PATH else PATH=/usr/java8_64/jre/bin:/usr/java8_64/bin:$PATH fi
This is to avoid using /opt/freeware on some server
PATH=/usr/bin:$PATH
action=$1
find ../newrelic \( ! -name 'newrelic' -prune \) -name 'nri-db-2.1.0_[1-9]' -type d -print |rev | cut -d '_' -f1
;; *) usage exit 1 ;; esacfor nrinst in $nrinstlist do nrcfgdir="$nrhome/${nrapp}${nrinst}/config" nrlibdir="$nrhome/${nrapp}${nrinst}/lib"
done
nrcfgdir=/tech/newrelic/nri-db-2.1.0_1/config
nrlibdir=/tech/newrelic/nri-db-2.1.0_1/lib
[ ! -d /tech/newrelic/nri-db-2.1.0_1/config ]
[ ! -d /tech/newrelic/nri-db-2.1.0_1/lib ]
grep com.newrelic.infra.db.Main
awk {printf("%s\n",$1)}
grep nri-db-2.1.0_1
grep -v grep nrpid=
[ -z ]
echo Starting New Relic Oracle Plug-in at Mon May 8 16:11:03 +08 2023 for Instance 1 Starting New Relic Oracle Plug-in at Mon May 8 16:11:03 +08 2023 for Instance 1
echo
CLASSPATH=/tech/newrelic/nri-db-2.1.0_1/lib/nri-db-2.1.0.jar:/tech/newrelic/nri-db-2.1.0_1/lib/slf4j-jdk14-1.7.30.jar:/tech/newrelic/nri-db-2.1.0_1/lib/infra_publish-2.3.1.jar:/tech/newrelic/nri-db-2.1.0_1/lib/insights_client-1.0.9.jar:/tech/newrelic/nri-db-2.1.0_1/lib/slf4j-api-1.7.30.jar:/tech/newrelic/nri-db-2.1.0_1/lib/gson-2.8.6.jar:/tech/newrelic/nri-db-2.1.0_1/lib/jasypt-1.9.3.jar:/tech/newrelic/nri-db-2.1.0_1/lib/commons-lang3-3.12.0.jar:/tech/newrelic/nri-db-2.1.0_1/lib/postgresql-42.2.19.jar:/tech/newrelic/nri-db-2.1.0_1/lib/hsqldb-2.5.1.jar:/tech/newrelic/nri-db-2.1.0_1/lib/jackson-databind-2.6.7.1.jar:/tech/newrelic/nri-db-2.1.0_1/lib/checker-qual-3.5.0.jar:/tech/newrelic/nri-db-2.1.0_1/lib/jackson-annotations-2.6.0.jar:/tech/newrelic/nri-db-2.1.0_1/lib/jackson-core-2.6.7.jar:/tech/newrelic/nri-db-2.1.0_1/lib/httpclient-4.5.6.jar:/tech/newrelic/nri-db-2.1.0_1/lib/httpcore-4.4.10.jar:/tech/newrelic/nri-db-2.1.0_1/lib/commons-logging-1.2.jar:/tech/newrelic/nri-db-2.1.0_1/lib/commons-codec-1.10.jar:/tech/newrelic/ojdbc8.jar
export CLASSPATH
DEFAULT_JVM_OPTS=-Djava.util.logging.config.file=/tech/newrelic/nri-db-2.1.0_1/config/logging.properties
cd /tech/newrelic/nri-db-2.1.0_1
nrpid=6423250
echo New Relic Oracle Plug-in started with pid 6423250 for Instance 1 New Relic Oracle Plug-in started with pid 6423250 for Instance 1
exit 0
Change Record:
21-AUG-2021 Startup and ShutDown New Relic DB Plug-in infradbplugin_java-0.11.1.tar
25-APR-2022 Startup and ShutDown New Relic Plug-in nri-db-2.1.0.tar
#
!/bin/sh
usage() { echo "Usage: $0 start | all "
echo " $0 stop | all "
echo " $0 status | all "
}
datestr=
date
javaexe='/usr/java8_64/jre/bin/java'
Check if java 8 is installed
if [ ! -f "$javaexe" ] ; then javaexe='/usr/java8/jre/bin/java' if [ ! -f "$javaexe" ] ; then echo "$javaexe does not exist" echo "Exiting with error code 1" exit 1 fi PATH=/usr/java8/jre/bin:/usr/java8/bin:$PATH else PATH=/usr/java8_64/jre/bin:/usr/java8_64/bin:$PATH fi
This is to avoid using /opt/freeware on some server
PATH=/usr/bin:$PATH
action=$1
find ../newrelic \( ! -name 'newrelic' -prune \) -name 'nri-db-2.1.0_[1-9]' -type d -print |rev | cut -d '_' -f1
;; *) usage exit 1 ;; esacfor nrinst in $nrinstlist do nrcfgdir="$nrhome/${nrapp}${nrinst}/config" nrlibdir="$nrhome/${nrapp}${nrinst}/lib"
done
nrcfgdir=/tech/newrelic/nri-db-2.1.0_2/config
nrlibdir=/tech/newrelic/nri-db-2.1.0_2/lib
[ ! -d /tech/newrelic/nri-db-2.1.0_2/config ]
[ ! -d /tech/newrelic/nri-db-2.1.0_2/lib ]
grep com.newrelic.infra.db.Main
grep nri-db-2.1.0_2
grep -v grep
awk {printf("%s\n",$1)} nrpid=
[ -z ]
echo Starting New Relic Oracle Plug-in at Mon May 8 16:11:03 +08 2023 for Instance 2 Starting New Relic Oracle Plug-in at Mon May 8 16:11:03 +08 2023 for Instance 2
echo
CLASSPATH=/tech/newrelic/nri-db-2.1.0_2/lib/nri-db-2.1.0.jar:/tech/newrelic/nri-db-2.1.0_2/lib/slf4j-jdk14-1.7.30.jar:/tech/newrelic/nri-db-2.1.0_2/lib/infra_publish-2.3.1.jar:/tech/newrelic/nri-db-2.1.0_2/lib/insights_client-1.0.9.jar:/tech/newrelic/nri-db-2.1.0_2/lib/slf4j-api-1.7.30.jar:/tech/newrelic/nri-db-2.1.0_2/lib/gson-2.8.6.jar:/tech/newrelic/nri-db-2.1.0_2/lib/jasypt-1.9.3.jar:/tech/newrelic/nri-db-2.1.0_2/lib/commons-lang3-3.12.0.jar:/tech/newrelic/nri-db-2.1.0_2/lib/postgresql-42.2.19.jar:/tech/newrelic/nri-db-2.1.0_2/lib/hsqldb-2.5.1.jar:/tech/newrelic/nri-db-2.1.0_2/lib/jackson-databind-2.6.7.1.jar:/tech/newrelic/nri-db-2.1.0_2/lib/checker-qual-3.5.0.jar:/tech/newrelic/nri-db-2.1.0_2/lib/jackson-annotations-2.6.0.jar:/tech/newrelic/nri-db-2.1.0_2/lib/jackson-core-2.6.7.jar:/tech/newrelic/nri-db-2.1.0_2/lib/httpclient-4.5.6.jar:/tech/newrelic/nri-db-2.1.0_2/lib/httpcore-4.4.10.jar:/tech/newrelic/nri-db-2.1.0_2/lib/commons-logging-1.2.jar:/tech/newrelic/nri-db-2.1.0_2/lib/commons-codec-1.10.jar:/tech/newrelic/ojdbc8.jar
export CLASSPATH
DEFAULT_JVM_OPTS=-Djava.util.logging.config.file=/tech/newrelic/nri-db-2.1.0_2/config/logging.properties
cd /tech/newrelic/nri-db-2.1.0_2
nohup /usr/java8_64/jre/bin/java -Xms16m -Xmx128m -classpath /tech/newrelic/nri-db-2.1.0_2/lib/nri-db-2.1.0.jar:/tech/newrelic/nri-db-2.1.0_2/lib/slf4j-jdk14-1.7.30.jar:/tech/newrelic/nri-db-2.1.0_2/lib/infra_publish-2.3.1.jar:/tech/newrelic/nri-db-2.1.0_2/lib/insights_client-1.0.9.jar:/tech/newrelic/nri-db-2.1.0_2/lib/slf4j-api-1.7.30.jar:/tech/newrelic/nri-db-2.1.0_2/lib/gson-2.8.6.jar:/tech/newrelic/nri-db-2.1.0_2/lib/jasypt-1.9.3.jar:/tech/newrelic/nri-db-2.1.0_2/lib/commons-lang3-3.12.0.jar:/tech/newrelic/nri-db-2.1.0_2/lib/postgresql-42.2.19.jar:/tech/newrelic/nri-db-2.1.0_2/lib/hsqldb-2.5.1.jar:/tech/newrelic/nri-db-2.1.0_2/lib/jackson-databind-2.6.7.1.jar:/tech/newrelic/nri-db-2.1.0_2/lib/checker-qual-3.5.0.jar:/tech/newrelic/nri-db-2.1.0_2/lib/jackson-annotations-2.6.0.jar:/tech/newrelic/nri-db-2.1.0_2/lib/jackson-core-2.6.7.jar:/tech/newrelic/nri-db-2.1.0_2/lib/httpclient-4.5.6.jar:/tech/newrelic/nri-db-2.1.0_2/lib/httpcore-4.4.10.jar:/tech/newrelic/nri-db-2.1.0_2/lib/commons-logging-1.2.jar:/tech/newrelic/nri-db-2.1.0_2/lib/commons-codec-1.10.jar:/tech/newrelic/ojdbc8.jar -Djava.util.logging.config.file=/tech/newrelic/nri-db-2.1.0_2/config/logging.properties com.newrelic.infra.db.Main
1> /dev/null 2>& 1
nrpid=6357558
echo New Relic Oracle Plug-in started with pid 6357558 for Instance 2 New Relic Oracle Plug-in started with pid 6357558 for Instance 2
exit 0
Regards, Sreelekshmi