Wednesday, May 22nd 2013, 10:01pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to Monitoring-Portal.
Although this is a german monitoring forum, please don't hesitate to post in English. Nearly everybody here understands you and will answer in English as well.
If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form to register here or read more information about the registration process. If you are already registered, please login here.

Posts: 6

Number of monitoring servers: 1

Nagios Version: 3.0.6

Distributed monitoring: Ja

Redundant monitoring: Ja

Number of hosts: 3

Number of services: N

OS: linux REDHAT ENTERPRISE 5

Plugin Version: 1.4

NDO Version: 1

1

Monday, July 6th 2009, 10:54am

questions about check_oracle_health

respected :

hi,I am a user of check_oracle_health from China, but I was sufferd a diffcult question about how use of check_oracle_health. ALL went fine until I define it a service in nagios. And at commanline I used it very well ,like :

[root@localhost libexec]# ./check_oracle_health --connect=orcl --user=nagios --password=nagios --mode=connection-time
OK - 0.15 seconds to connect as NAGIOS | connection_time=0.1491;1;5

but when I go to http://localhost/nagios,somethings are wrong like

[img]http://mail2-227.sinamail.sina.com.cn/classic/base_download_att.php?file_name=embedded0&mid=1246869293.74.10025.sinamail.sina.com.cn&fid=out&content_type=image/jpeg&attinfo=4-9568-98804-base64&get_cmd=show5[/img]
I don't konw how to solve it ,please help me and I beg the solution is very detailed as possible as you can give to me .

I think I should give you more detailed informations about how I define the services in nagios:

at the command.cfg ,I add commands below(I just use two command to have a try)

# 'check_oracle_health ' command definition
define command{
command_name oracle-connected-users
command_line $USER1$/check_oracle_health --connect=orcl --user=nagios --password=nagios --mode=connected-users
}

define command{
command_name oracle-connection-time
command_line $USER1$/check_oracle_health --connect=orcl --user=nagios --password=nagios --mode=connection-time
}

and under the filefolder /usr/local/nagios/etc/Server the host oracleServer.cfg was created,and the content of it are ::
# define host

define host{

use linux-server ; Name of host template to use

; This host definition will inherit all variables that are defined

; in (or inherited by) the linux-server host template definition.

host_name oracleServer
alias oracle

address 127.0.0.1

}

define service{


use generic-service ; Name of service template to use

host_name oracleServer

service_description connected-users

check_command oracle-connected-users

}
define service{


use generic-service ; Name of service template to use

host_name oracleServer

service_description connection-time

check_command oracle-connection-time

}

the nagios and oracle are installed in a same machine ,then I enter http://localhost/nagios ,the result was returned as figure shows.

please help me and tell me how I could solver it ;
Thanks very much!

My english is poor, I hope you can understand what problem I have meet! ?( ?( ?( ?( ?(


?( ?( ?( ?( ?( ?( ?( ?( ?(

hazet

Intermediate

Posts: 275

Birthday: Sep 8th

Gender: male

Location: Augsburg

Number of monitoring servers: 2

Nagios Version: 3.0.5

Distributed monitoring: Nein

Redundant monitoring: Ja

Number of hosts: 160

Number of services: >2000

OS: Ubuntu 8.04

Plugin Version: 1.4.12

NagVis Version: 1.3

NDO Version: 1.4.7b

Other Addons: PNP 0.6.1,NagTrap 0.1.2

2

Monday, July 6th 2009, 11:25am

As written in the Nagios-Doku:
First problem is: Never check a plugin as root (use your Nagios-User instead)
Second problem: To check a plugin you must call it with the whole path, e.g. /usr/local/nagios/libexec/check_oracle_health ...
Please do so and show us the output
Complex problems have simple, easy to understand, wrong answers.
(H. L. Mencken)

Posts: 96

Gender: male

Number of monitoring servers: 2

Nagios Version: 2.x / 3.x

Distributed monitoring: Nein

Redundant monitoring: Ja

Number of hosts: 300

Number of services: 1000

OS: Debian Stable

Plugin Version: 1.4.11

NagVis Version: 1.2.2

NDO Version: 1.4x

Other Addons: PNP 0.4.9

3

Monday, July 6th 2009, 11:26am

Hello,

i can't see your picture with the error . What error you get from Nagios ?

You tried to excecute the command as user nagios ? Looks like you tried it with root.
The definitions look good for me.

Source code

1
2
[root@localhost libexec]# ./check_oracle_health --connect=orcl --user=nagios --password=nagios --mode=connection-time
 OK - 0.15 seconds to connect as NAGIOS | connection_time=0.1491;1;5  

tumtliw

Intermediate

Posts: 377

Gender: male

Location: Leer

Occupation: Inschenör

Number of monitoring servers: 2

Hobbies: Amateurfunk

Nagios Version: 3.2.0

Icinga Version: 1.8.4

Distributed monitoring: Nein

Redundant monitoring: Ja

Number of hosts: ~ 350

Number of services: ~ 4500

OS: SLES 11 SP2

Plugin Version: 1.4.15

NagVis Version: 1.7.b2

IDO-Version: 1.8.4

Other Addons: snmptt, NagTrap, PNP4Nagios,check_mk

4

Monday, July 6th 2009, 11:41am

Hello,


did you aktivate embedded Perl?

Disable it in your nagios.cfg file with

enable_embedded_perl=0


greeting willi

Posts: 6

Number of monitoring servers: 1

Nagios Version: 3.0.6

Distributed monitoring: Ja

Redundant monitoring: Ja

Number of hosts: 3

Number of services: N

OS: linux REDHAT ENTERPRISE 5

Plugin Version: 1.4

NDO Version: 1

5

Tuesday, July 7th 2009, 3:27am

thanks,guys,but it does't work

Thanks guys for yours replies.

To hazet , I did what you told me .Firstly ,I use user nagios to excute command in command line ,the result is ok. Like this:

[nagios@localhost libexec]$ ./check_oracle_health -c orcl -u nagios -p nagios --mode=connection-time
OK - 0.17 seconds to connect as NAGIOS | connection_time=0.1736;1;5
[nagios@localhost libexec]$ ./check_oracle_health -c orcl -u nagios -p nagios --mode=connected-users
OK - 1 connected users | connected_users=1;50;100
[nagios@localhost libexec]$ ./check_oracle_health -c orcl -u nagios -p nagios --mode=sga-shared-pool-free
CRITICAL - SGA shared pool free 2.93% | sga_shared_pool_free=2.93%;10:;5:
[nagios@localhost libexec]$


secondly, I change the command.cfg to use full command path like this:

define command{

command_name oracle-connetion-time

command_line /usr/local/nagios/libexec/check_oracle_health -c orcl -u nagios -p nagios --mode=connection-time
}

define command{

command_name oracle-sga

command_line /usr/local/nagios/libexec/check_oracle_health -c orcl -u nagios -p nagios --mode=sga-shared-pool-free

}

In command line ,all seems ok ,but I log in http://localhost/nagios,the result is the same ,still unsuccessful,like this : I could't insert pictures)
In the "Status Information" in nagios web interface it shows: CRITICAL - connection could not be established within 60 seconds

TO broesel0815 and tumtliw

I' sorry ,both of yours solutions don't work too. I don't what the problems are and how I solve them.Please give more suggestions , Thanks guys.




Posts: 6

Number of monitoring servers: 1

Nagios Version: 3.0.6

Distributed monitoring: Ja

Redundant monitoring: Ja

Number of hosts: 3

Number of services: N

OS: linux REDHAT ENTERPRISE 5

Plugin Version: 1.4

NDO Version: 1

6

Tuesday, July 7th 2009, 3:29am

I forget to ask you a question , do you use the plugin check_oracle_health well ? What did you do ? Thanks

hazet

Intermediate

Posts: 275

Birthday: Sep 8th

Gender: male

Location: Augsburg

Number of monitoring servers: 2

Nagios Version: 3.0.5

Distributed monitoring: Nein

Redundant monitoring: Ja

Number of hosts: 160

Number of services: >2000

OS: Ubuntu 8.04

Plugin Version: 1.4.12

NagVis Version: 1.3

NDO Version: 1.4.7b

Other Addons: PNP 0.6.1,NagTrap 0.1.2

7

Tuesday, July 7th 2009, 6:46am

Yes, I use it and it works very well.
I put the Oracle-Environment (ORACLE_HOME, ORACLE_BASE, etc.) in the /etc/init.d/nagios script. Without that I also get errors (don't know the exact errormessage).
HTH
Harald
Complex problems have simple, easy to understand, wrong answers.
(H. L. Mencken)

Posts: 6

Number of monitoring servers: 1

Nagios Version: 3.0.6

Distributed monitoring: Ja

Redundant monitoring: Ja

Number of hosts: 3

Number of services: N

OS: linux REDHAT ENTERPRISE 5

Plugin Version: 1.4

NDO Version: 1

8

Tuesday, July 7th 2009, 7:39am

hi ,hazet ,could you speak more clearly??
Please tell me more details about what you have done to make your check_oracle_health work well.
and my MSN is xiaoluan7758@sina.com.cn ,wish you to add me as a new friend and maybe I have lots of things to learn from you , thanks

tumtliw

Intermediate

Posts: 377

Gender: male

Location: Leer

Occupation: Inschenör

Number of monitoring servers: 2

Hobbies: Amateurfunk

Nagios Version: 3.2.0

Icinga Version: 1.8.4

Distributed monitoring: Nein

Redundant monitoring: Ja

Number of hosts: ~ 350

Number of services: ~ 4500

OS: SLES 11 SP2

Plugin Version: 1.4.15

NagVis Version: 1.7.b2

IDO-Version: 1.8.4

Other Addons: snmptt, NagTrap, PNP4Nagios,check_mk

9

Tuesday, July 7th 2009, 8:15am

Hello,

hazet means in the startup script for nagios you have to source the Oracle environment variables. You can test it in the following manner. You stop nagios. Source the oracle environment variables and start nagios again.

If it works your startup script for nagios must modified to source all the oracle environment variables.


Greeting Willi

hazet

Intermediate

Posts: 275

Birthday: Sep 8th

Gender: male

Location: Augsburg

Number of monitoring servers: 2

Nagios Version: 3.0.5

Distributed monitoring: Nein

Redundant monitoring: Ja

Number of hosts: 160

Number of services: >2000

OS: Ubuntu 8.04

Plugin Version: 1.4.12

NagVis Version: 1.3

NDO Version: 1.4.7b

Other Addons: PNP 0.6.1,NagTrap 0.1.2

10

Tuesday, July 7th 2009, 8:35am

Hi luanjianfeng,
do it like tumliw told you. MSN: I have no account, and I have no plan do get one...
If you want to learn about nagios, then here is the right place to do so.
Complex problems have simple, easy to understand, wrong answers.
(H. L. Mencken)

Posts: 6

Number of monitoring servers: 1

Nagios Version: 3.0.6

Distributed monitoring: Ja

Redundant monitoring: Ja

Number of hosts: 3

Number of services: N

OS: linux REDHAT ENTERPRISE 5

Plugin Version: 1.4

NDO Version: 1

11

Tuesday, July 7th 2009, 8:49am

Thanks all guys to reply

Guys ,the methods all you tell me I have tried earlier time, But all failed. I still don't understand ,I can get the result in command line ,I think it means that the nagios "knows" oracle environment variables ,, But when I log in http://localhost/nagios ,at the Status Information it says :CRITICAL - connection could not be established within 60 seconds (I don't know how to insert a picture ,),,,

I spend several days to solve this problem ,But I couldn't solve it , Faint!! ?( ?( ?( ?( ?( ?( ?( ?( ?( ?( ?(

hazet

Intermediate

Posts: 275

Birthday: Sep 8th

Gender: male

Location: Augsburg

Number of monitoring servers: 2

Nagios Version: 3.0.5

Distributed monitoring: Nein

Redundant monitoring: Ja

Number of hosts: 160

Number of services: >2000

OS: Ubuntu 8.04

Plugin Version: 1.4.12

NagVis Version: 1.3

NDO Version: 1.4.7b

Other Addons: PNP 0.6.1,NagTrap 0.1.2

12

Tuesday, July 7th 2009, 9:42am

How did you restart nagios? As user nagios? With which command?
Complex problems have simple, easy to understand, wrong answers.
(H. L. Mencken)

Posts: 6

Number of monitoring servers: 1

Nagios Version: 3.0.6

Distributed monitoring: Ja

Redundant monitoring: Ja

Number of hosts: 3

Number of services: N

OS: linux REDHAT ENTERPRISE 5

Plugin Version: 1.4

NDO Version: 1

13

Tuesday, July 7th 2009, 11:11am

Thanks guys , I think all are ok .

Tell the truth ,I don't know how it becomes normal ,All I have done are to add ORACLE environment varibles to /etc/init.d/nagios and I log in by user nagios ,and I start it with command /etc/init.d/nagios and I log in the web. Amazing, all become normall . The result retuned by command line are showed in Status Information bar ..

Thanks guys ,give me lots of suggestions ,and I'm very excited ,

Thanks ....... :D :D :D :D :D :D :D :D

Dragoslav

Trainee

Posts: 151

Number of monitoring servers: 2

Nagios Version: 3.2

Distributed monitoring: Nein

Redundant monitoring: Nein

Number of hosts: ~140

Number of services: ~3300

OS: SLES9, SLES10

Plugin Version: -

14

Tuesday, July 7th 2009, 12:21pm

You just implemented what hazet (and tumtliw) already suggested