This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
anish
Posts: 161 Joined: Tue Jul 19, 2016 5:29 am
Post
by anish » Fri Jul 14, 2017 11:15 am
Hello,
I am trying to monitor DB instances running on HP-UNIX server using check_oracle.sh plugin.
User nagios is part of dba group.
plugin is working perfectly when i execute it directly, but it doesn't run when called using check_nrpe.
Code: Select all
# ./check_nrpe -H localhost -c check_oracle_db
opspb10p Database is DOWN
usplops1:<root>[/usr/local/nagios/libexec]
# ./check_ora.sh --db 'opspb10p'
opspb10p OK - 1 PMON process(es) running
I have tried running check_nrpe - from
Nagios user/root user/ DB user but everytime i get same output.
NRPE.CFG
Code: Select all
TRIED:
command[check_oracle_db]=/usr/bin/env LD_LIBRARY_PATH=/app4p/oracle/product/10.2/lib /usr/local/nagios/libexec/check_ora.sh --db 'opspb10p'
command[check_oracle_db]=/usr/local/nagios/libexec/check_ora.sh --db 'opspb10p'
Output:
opspb10p Database is DOWN
command[check_oracle_db]=/usr/local/nagios/libexec/check_ora.sh --db 'opspb10p'
Output:Unable to read output
Kindly help!
lmiltchev
Bugs find me
Posts: 13589 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Fri Jul 14, 2017 12:11 pm
It seems like that the plugin is working as expected, when you run it as root:
# ./check_ora.sh --db 'opspb10p'
opspb10p OK - 1 PMON process(es) running
Before troubleshooting NRPE, can you verify that you can run the same plugin as nagios user?
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_ora.sh --db 'opspb10p'
Be sure to check out our
Knowledgebase for helpful articles and solutions!
anish
Posts: 161 Joined: Tue Jul 19, 2016 5:29 am
Post
by anish » Sat Jul 15, 2017 11:56 am
Yes...with nagios user, plugins returns the same output.
But only when i run using nrpe irrespective of any user, it fails.
I would also like to highlight here that there are other common plugins such as CPU/DISK/MEMORY which are running as usual under check_nrpe.
SteveBeauchemin
Posts: 524 Joined: Mon Oct 14, 2013 7:19 pm
Post
by SteveBeauchemin » Sun Jul 16, 2017 4:42 pm
If I remember correctly the default NRPE Install on HPUX runs as the NRPE user. Is that still true? What user does NRPE run as?
Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
anish
Posts: 161 Joined: Tue Jul 19, 2016 5:29 am
Post
by anish » Mon Jul 17, 2017 12:15 pm
There is no NRPE user on this host HPUX (11.11)
Kindly suggest the possible solution to this issue.
tgriep
Madmin
Posts: 9190 Joined: Thu Oct 30, 2014 9:02 am
Post
by tgriep » Mon Jul 17, 2017 12:35 pm
Can you post the plugin from your HPUX system so we can view it?
Code: Select all
/usr/local/nagios/libexec/check_ora.sh
Then run the following commands and post the output.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
SteveBeauchemin
Posts: 524 Joined: Mon Oct 14, 2013 7:19 pm
Post
by SteveBeauchemin » Mon Jul 17, 2017 12:54 pm
On my HPUX, I run nrpe via the inetd.
Code: Select all
tail -3 /etc/inetd.conf
# Nagios NRPE agent
nrpe stream tcp nowait nrpe /opt/nrpe/bin/nrpe nrpe -i -c /opt/nrpe/etc/nrpe.cfg
and from the nrpe.cfg file I see
Code: Select all
cat /opt/nrpe/etc/nrpe.cfg
# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
nrpe_user=nagios
So, even though one cfg file says nagios, that is ignored if using inetd.
That is why I asked about the user that runs. Just to cover all the turf.
Good Luck...
Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Mon Jul 17, 2017 4:08 pm
Please attach your /usr/local/nagios/libexec/check_ora.sh so that we can review it, the majority of the time it's because of path issues.
Thank you