Page 1 of 1

check_oracle issue

Posted: Wed Jun 22, 2016 12:43 am
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

Re: check_oracle issue

Posted: Wed Jun 22, 2016 9:41 am
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>

Re: check_oracle issue

Posted: Thu Jun 23, 2016 4:18 am
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

Re: check_oracle issue

Posted: Thu Jun 23, 2016 9:50 am
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)

Re: check_oracle issue

Posted: Fri Jun 24, 2016 7:14 am
by sysadmin9
Hello,

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

Regards,
Sysadmin9

Re: check_oracle issue

Posted: Fri Jun 24, 2016 9:35 am
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>

Re: check_oracle issue

Posted: Wed Jul 06, 2016 5:23 am
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

Re: check_oracle issue

Posted: Wed Jul 06, 2016 10:01 am
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?