check_oracle issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sysadmin9
Posts: 4
Joined: Wed Jun 22, 2016 12:31 am

check_oracle issue

Post by sysadmin9 »

Hello,

i am trying to do database level monitoring for which was working with check_oracle plugin, but facing issue while viewing the tablespace.

check below error for reference

check_oracle --tablespace sg_data --sid db11g --user sgiatdb --password sgiatdb --warning 70 --critical 80


./check_oracle: line 242: [: sgiatdb: integer expression expected
./check_oracle: line 269: [: : integer expression expected
./check_oracle: line 273: [: : integer expression expected
./check_oracle: line 277: [: : integer expression expected

Note: I was able to dummy login through check_oracle.

Please help.

Regards,
sysadmin
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_oracle issue

Post by rkennedy »

What is the output of check_oracle -V? Can you attach it for us to look at?

The reason I ask, is there are a few different ones that are around, and I believe one requires all of the fields entered like that, where as another one would be used like check_oracle --tablespace <ORACLE_SID> <USER> <PASS> <TABLESPACE> <CRITICAL> <WARNING>
Former Nagios Employee
sysadmin9
Posts: 4
Joined: Wed Jun 22, 2016 12:31 am

Re: check_oracle issue

Post by sysadmin9 »

rkennedy wrote:What is the output of check_oracle -V? Can you attach it for us to look at?

The reason I ask, is there are a few different ones that are around, and I believe one requires all of the fields entered like that, where as another one would be used like check_oracle --tablespace <ORACLE_SID> <USER> <PASS> <TABLESPACE> <CRITICAL> <WARNING>

Thanks for your reply.

Check below output of the command requested.

check_oracle v1.4.15 (nagios-plugins 1.4.15)
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Regards,
Sysadmin
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_oracle issue

Post by rkennedy »

Could you please post the plugin as well for us to look at? For the record, it's an older version so it may be worth upgrading and trying once again -

Code: Select all

[nagios@localhost libexec]$ ./check_oracle -V
check_oracle v2.0.3 (nagios-plugins 2.0.3)
Former Nagios Employee
sysadmin9
Posts: 4
Joined: Wed Jun 22, 2016 12:31 am

Re: check_oracle issue

Post by sysadmin9 »

Hello,

I have attached the plugin, would suggest you to open it up with wordpad.

Regards,
Sysadmin9
Attachments
check_oracle.txt
check oracle plugin
(8.13 KiB) Downloaded 228 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_oracle issue

Post by rkennedy »

It looks like you're following the wrong parameters for the plugin, it should be what I mentioned above -
The reason I ask, is there are a few different ones that are around, and I believe one requires all of the fields entered like that, where as another one would be used like check_oracle --tablespace <ORACLE_SID> <USER> <PASS> <TABLESPACE> <CRITICAL> <WARNING>
Former Nagios Employee
sysadmin9
Posts: 4
Joined: Wed Jun 22, 2016 12:31 am

Re: check_oracle issue

Post by sysadmin9 »

Hello,

I entered below command but getting error:

./check_oracle --tablespace DB11G SGIATDB SGIATDB SG_DATA 90 80

Here,
tablespace name - SG_DATA
username - SGIATDB
password - SGIATDB
oracle SID - DB11G
warning level - 90 and 80

Error:
CRITICAL - ORA-00942: table or view does not exist

Please check.

Regards,
Sysadmin9
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_oracle issue

Post by rkennedy »

Oracle mentions this about the 942 error -

Code: Select all

The cause or reason for Oracle error 942 message is because Oracle tries to execute an SQL statement that references a table or view that either does not exist, or because a synonym that is not allowed here was used, or because you do not have access rights to the particular object. Other possible cause is that the table or view belongs to another schema and you didn't reference the table by the schema name, or a view was referenced where a table is required.
Does the user have proper permissions for this tablespace?
Former Nagios Employee
Locked