Hello all,
I have just update check_oracle_health plug in to 3.0.1
Every works fine eccept with "asm-diskgroup-usage" I got the following error:
Illegal division by zero at /usr/local/nagios/libexec/check_oracle_health line 4094
Also trying to execute it in a linux shell i got:
check_oracle_health --connect=xxx.xxx.xxx.xxx:1521/+ASM --username=sys as sysasm --password=rrrrrrrrr --mode=asm-diskgroup-usage --method=sqlplus --warning=80 --critical=90
Illegal division by zero at /usr/local/nagios/libexec/check_oracle_health line 4094.
any ideas?
Any help will be appreciated
Regards
Adriano
illegal division by zero after upgrading check_oracle_healt
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: illegal division by zero after upgrading check_oracle_he
Given the version #, I assume you are using https://exchange.nagios.com/directory/R ... &Itemid=74, but I'd like to clarify that. Strictly speaking, that's not our plugin, but we will do what we can to help you get it running.
Nagios and NRPE do not generally provide the full environment variables to executed plugins. You may need to include a --environment flag with your command. I would suggest trying it via cli first to make sure its right then adding to nrpe.cfg as you have! Try something like:
It's generally a good idea to run your test commands as nagios rather than root, but you seem to be getting the same error either way. I'm just making the assumption you ran it as root, since you didn't show that part of the shell. Could you clarify how you ran your check?
Lastly, what version of Nagios Core are you running? Did you compile from source or use distribution repos? What distribution/version of GNU/Linux are you running? That will help us determine version #s of dependencies and things of that nature.
Nagios and NRPE do not generally provide the full environment variables to executed plugins. You may need to include a --environment flag with your command. I would suggest trying it via cli first to make sure its right then adding to nrpe.cfg as you have! Try something like:
Code: Select all
/usr/local/nagios/libexec/check_oracle_health --connect TESTDB --user system --password oracle11 --environment ORACLE_HOME=/usr/app/oracle/oracle/product/10.2.0/db_1 --mode tnsping
Lastly, what version of Nagios Core are you running? Did you compile from source or use distribution repos? What distribution/version of GNU/Linux are you running? That will help us determine version #s of dependencies and things of that nature.