Re: [PATCH/PULL] New plugin: check_dbi

Sebastian Harl <[email protected]>
Newsgroups gmane.network.nagios.plugins.devel
Message-ID <[email protected]>
Hi hassan,

On Mon, Jun 11, 2012 at 01:27:17PM +0500, hassan nashrah wrote:
> I have a test case, that you may like to test. as well as if your plugin could do this it wud be grt. i have been looking  for a while to do the following:
> 
> My Oracle DB server details
> 
> operating System: Solaris
> 
> database: oracle
> IP: 192.168.1.2 (not real ip)
> 
> My Nagios Server details
> OS : Ubuntu
> i have configured nagios 3.x
> 
> i connect to my db server from my nagios  as follow:
> 
>  ssh -Y [email protected]
> Password: xxxxxxxxx
> [root@vboxdb /]# su - oracle
> 
> Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
> [oracle@vboxdb ~]$ sqlplus / as sysdba
> 
> SQL*Plus: Release 11.2.0.1.0 Production on Wed May 30 04:53:48 2012
> 
> Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Well, this is not how check_dbi would connect to an Oracle database.
Rather, you will need an 'oracle' driver for libdbi. According to the
website somebody is working on such a thing but it seems to be
incomplete and I don't know anything about the current status or whether
it's usable at all, I'm afraid.

> what i want to do i will list below ;
> 
> SQL> select current_utilization, max_utilization, limit_value from v$resource_limit where resource_name =’sessions’;
> 
> CURRENT_UTILIZATION   MAX_UTILIZATION     LIMIT_VALUE
> 
> ——————- —————          ————————-                     ————— 
> 
> 386                 404                                                1528
> 
> if the current utilization reaches 1500 alert critical, 1450 warning state.
> else normal.
> 
> can you tell me how i can use your plugin to do this. 

This is exactly what check_dbi is meant for. Please note though, that
you can (currently) only check a single value only. The plugin uses the
first (CURRENT_UTILIZATION) and simply ignores all other values.

> by the way i've tried to compile your plugin. but i am getting errors
> saying common.h not found.

Could you please provide more information about that error, like the
full compiler output? common.h is shipped with nagios-plugins, so I
suppose there is some other error.

HTH,
Sebastian

-- 
Sebastian Harl
Consultant, Trainer

teamix GmbH
Südwestpark 35
90449 Nürnberg

fon:   +49 911 30999-0
fax:   +49 911 30999-99
mail:  [email protected]
web:   http://www.teamix.de

Amtsgericht Nürnberg, HRB 18320
Geschäftsführer: Oliver Kügow, Richard Müller

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJP9VxpAAoJENhL2qQCcg3AzFoP/183BnqNYPcojft565JbZams
7EdPUgaObPxGSlX0+pnUiiS6seqlv8RfqzL/7FGzgq4Y5iDgTA1iOkMxnEwAwpRG
tg3M8qeDoaZPw0uYtkumW3OFP/cfmhaNxjr0Ne95yIgssSJ8DsNyTV7/DhSdn8E/
xNVz/CnwJZg5VInJATnXNq8vnGcBpNuc0HEJHTLIWyIw90EFsOIKt21NqMsAoFEv
fwGbwfzVU26zWZVfnFu48UXt2lTZdUuwPFjR/NL+esSR+/ZtPp/wburht0rWb2vB
tDXUuFQw69mM9UPIp/IeDAML5IWWUdk+PA2Mv6W7vv3rTIhgtnmxvmYkRw8qaJrq
4DQQs5OqRXckgmpRAxfDRZwE1FNNgUe51j5Dgn36r2TDF61AAyNGPuUByu25p2Dp
R6n+zEjdl9IpPbRUcccd5owmAuyS14n89rfNDjxQyW7mCDQoo2+/sWx+3iBxnYYb
ZcMftlHZefe84Xd+RAG44UcMRleqCn7R4aFO68w7MYOHru0bq/AJ1BiLD3Id/slM
OX35b7GHUv+vR2fMhII/WvIiDyAbqcLxenoQx47JYj5RYarLDWbv+/8ahDEjr/7x
0pc7JGgMEZSSJ/FzxQKXsi84AaqfNG9WupJCLqx3mmsazJiss9zvrDwUG8QQ0ixh
kD4Bh7HEtIP2PN6wREki
=eBCI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.