Re: [Nagios-users] Plugin check_oracle_health
Hi, Below is the service definition for all 4 cases: define service { use generic-service host_name DBIGASDS service_description Reachability via tnsping 1 check_command check_oracle_health! --connect IGAS --username ABC --password ABC --mode=tnsping --method sqlplus contactscosmin } define service { use generic-service host_name DBIGASDS service_description Reachability via tnsping 2 check_command check_oracle_health_tnsping contactscosmin define service { use generic-service host_name DBIGASDS service_description Connection time to DB 1 check_command check_oracle_health!--connect IGAS --username ABC --password ABC --mode=connection-time contactscosmin } define service { use generic-service host_name DBIGASDS service_description Connection time to DB 2 check_command check_oracle_health_time contactscosmin And this is the command definition: define command{ command_name check_oracle_health command_line $USER1$/check_oracle_health $ARG1$ define command{ command_name check_oracle_health_tnsping command_line $USER1$/check_oracle_health_tnsping } define command{ command_name check_oracle_health_time command_line $USER1$/check_oracle_health_time BUT - a huge discovery when composing this mail. The only service definition that worked from Nagios was the one which has the undocumented argument --method sqlplus. I think i saw on some forums the use of that paramether in the beginning, and it remained in the definition. Anyway, after adding that parammeter to all other service and command definitions, they started to work miracouslly (but still, from command line, the plugin is working without --method argument) Thank you for asking for command and service definition ;) Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro On 11/07/2012 05:48 PM, Claudio Kuenzler wrote: So my question for someone who has made check_oracle_healt work is: How come all 4 invocation from CLI as nagios user work, but when Nagios runs them, only 2 of them work. I know that the error message tells me that there is some env variable path problem, but why are the first 2 calls of check_oracle_healt work then? Can you, for completion, show your command definitions as well as the service definition? Just fyi: On my installation I used a different way to use --connect, I used EZCONNECT. See: http://labs.consol.de/lang/de/blog/uncategorized/check_oracle_health-kann-ezconnect/ My command definition: # check_oracle_health define command { command_namecheck_oracle_health command_line$USER1$/check_oracle_health --username $USER3$ --password $USER4$ --mode $ARG1$ --connect $HOSTADDRESS$:$ARG2$/$ARG3$ } And one of the service definitions: # Check Oracle define service{ usegeneric-service host_name myoraserver service_description Oracle Connections check_command check_oracle_health!connected-users!1521!SERVICENAME } -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Plugin check_oracle_health
I think i installed DBD::Oracle successfully, otherwise, i do not think i could have check this: nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username ABC --password ABC --mode=connection-time OK - 0.09 seconds to connect as ABC | connection_time=0.0934;1;5 The env variables were set as nagios user, not as root. However there seems to be some sort of env variable problem, but i cannot figure out what. I deleted the env variables from bashrc of nagios user, and set them globally in /etc/env nagios@monitor:/usr/local/nagios/etc/Eureko$ cat /etc/environment PATH=/home/nagios/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/oracle/11.2/client/bin ORACLE_HOME=/usr/lib/oracle/11.2/client LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib And define the following scripts nagios@monitor:/usr/local/nagios/libexec$ cat *check_oracle_health_time* #!/bin/bash export ORACLE_HOME=/usr/lib/oracle/11.2/client export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib perl /usr/local/nagios/libexec/check_oracle_health --connect IGAS --username ABC --password ABC --mode=connection-time nagios@monitor:/usr/local/nagios/libexec$ cat *check_oracle_health_tnsping* #!/bin/bash export ORACLE_HOME=/usr/lib/oracle/11.2/client export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib perl /usr/local/nagios/libexec/check_oracle_health --connect IGAS --username ABC --password ABC--mode=tnsping -method=sqlplus Both of this scrips should first set (again) the env variable and then run the desired check_oracle_health plugin. From CLI, all 4 execution as nagios user works: nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health_tnsping OK - connection established to IGAS. nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username ABC --password ABC --mode=tnsping -method=sqlplus OK - connection established to IGAS. nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health_time OK - 0.09 seconds to connect as ABC | connection_time=0.0897;1;5 nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username iapc_etl --password etl14admin --mode=connection-time OK - 0.09 seconds to connect as ABC | connection_time=0.0915;1;5 But when defining services in Nagios strange thing happens: The services defined in Nagios with check_oracle_health_tnsping and /check_oracle_health --connect IGAS --username ABC --password ABC --mode=tnsping -method=sqlplus both work, returning the corect result. The services defined with check_oracle_health_time and check_oracle_health --connect IGAS --username ABC --password ABC --mode=connection-time both do not work returning: CRITICAL - cannot connect to IGAS. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/nagios/libexec /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 13) line 3. So my question for someone who has made check_oracle_healt work is: How come all 4 invocation from CLI as nagios user work, but when Nagios runs them, only 2 of them work. I know that the error message tells me that there is some env variable path problem, but why are the first 2 calls of check_oracle_healt work then? Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro On 10/29/2012 11:06 AM, Claudio Kuenzler wrote: You didn't correctly install the DBD::Oracle or your env variables are not correct, as your error message shows it: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/nagios/libexec /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 13) line 3. You said that you have set the paths in .bashrc: I also set in .bashrc the enviroment variables: export ORACLE_HOME=/usr/lib/oracle/11.2/client export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib You probably set this as root. Don't forget that Nagios runs under its own user! (by default: nagios). On Mon, Oct 29, 2012 at 9:50 AM, Cosmin Neagu cosmin.ne...@omnilogic.ro mailto:cosmin.ne...@omnilogic.ro wrote: Hi Nagios Users, Can someone help me or give a hint on why check_oracle_health does not work (as describe below) ? On 10/23/2012 04:59 PM, Cosmin Neagu wrote: Hi all, I manage to install the oracle client on nagios machine after all (google is the best) and making all the necesary setting so that check_oracle_health is working from command line as nagios user: nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username abc
Re: [Nagios-users] Plugin check_oracle_health
Hi Nagios Users, Can someone help me or give a hint on why check_oracle_health does not work (as describe below) ? On 10/23/2012 04:59 PM, Cosmin Neagu wrote: Hi all, I manage to install the oracle client on nagios machine after all (google is the best) and making all the necesary setting so that check_oracle_health is working from command line as nagios user: nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username abc --password abc --mode=tnsping Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 4163. Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 6167. OK - connection established to IGAS. nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username abc --password abc --mode=connection-time Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 4163. Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 6167. OK - 0.10 seconds to connect as iapc_etl | connection_time=0.0968;1;5 nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username abc --password abc --mode=connected-users Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 4163. Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 6167. OK - 31 connected users | connected_users=31;50;100 The command is defined like this: define command{ command_name check_oracle_health command_line $USER1$/check_oracle_health $ARG1$ } And the services: define service { use generic-service host_name DBIGASDS service_description Reachability via tnsping check_command check_oracle_health! --connect IGAS --username abc --password abc --mode=tnsping contactscosmin } define service { use generic-service host_name DBIGASDS service_description Connection time to DB check_command check_oracle_health!--connect IGAS --username abc --password abc mode=connection-time contactscosmin } define service { use generic-service host_name DBIGASDS service_description Connected users to DB check_command check_oracle_health!--connect IGAS --username abc --password abc mode=connected-users contactscosmin I also set in .bashrc the enviroment variables: export ORACLE_HOME=/usr/lib/oracle/11.2/client export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib But, in Nagios 3.4.1, i do not receive the corect status for those services: For all 3 services i receive: CRITICAL - cannot connect to IGAS. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/nagios/libexec /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 13) line 3. I realy don't know what to check anymore and why does it say that, so any help would be apreciated. More info: nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health -V check_oracle_health (1.7.3) nagios@monitor:/usr/local/nagios/etc$ uname -a Linux monitor 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux nagios@monitor:/usr/local/nagios/etc$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 12.04.1 LTS Release:12.04 Codename: precise Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro On 10/03/2012 09:34 AM, Claudio Kuenzler wrote: It's not that hard and a lot of things are written in the documentation of check_oracle_health. I even wrote an article about this in September 2011 explaining the steps: http://www.claudiokuenzler.com/blog/192/install-perl-dbd-oracle-DBD::Oracle-on-SuSE-SLES10-without-cpan You should do it the way you prefer of course. But in my setup I wanted to run check_oracle_health on a standalone Nagios server. That way I also see if there's a latency in the remote sql query. Real life applications rarely use localhost connections. On Wed, Oct 3, 2012 at 8:14 AM, Cosmin Neagu cosmin.ne...@omnilogic.ro mailto:cosmin.ne...@omnilogic.ro wrote: Well, thats the hard part for me, installing those ORA files - didnt find yet how to do that. I think installing the plugin on DBServer and using NRPE is easier. Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro http://www.omnilogic.ro On 10/02/2012 06:05 PM, Claudio Kuenzler
Re: [Nagios-users] Plugin check_oracle_health
Hi all, I manage to install the oracle client on nagios machine after all (google is the best) and making all the necesary setting so that check_oracle_health is working from command line as nagios user: nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username abc --password abc --mode=tnsping Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 4163. Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 6167. OK - connection established to IGAS. nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username abc --password abc --mode=connection-time Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 4163. Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 6167. OK - 0.10 seconds to connect as iapc_etl | connection_time=0.0968;1;5 nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health --connect IGAS --username abc --password abc --mode=connected-users Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 4163. Use of qw(...) as parentheses is deprecated at ./check_oracle_health line 6167. OK - 31 connected users | connected_users=31;50;100 The command is defined like this: define command{ command_name check_oracle_health command_line $USER1$/check_oracle_health $ARG1$ } And the services: define service { use generic-service host_name DBIGASDS service_description Reachability via tnsping check_command check_oracle_health! --connect IGAS --username abc --password abc --mode=tnsping contactscosmin } define service { use generic-service host_name DBIGASDS service_description Connection time to DB check_command check_oracle_health!--connect IGAS --username abc --password abc mode=connection-time contactscosmin } define service { use generic-service host_name DBIGASDS service_description Connected users to DB check_command check_oracle_health!--connect IGAS --username abc --password abc mode=connected-users contactscosmin I also set in .bashrc the enviroment variables: export ORACLE_HOME=/usr/lib/oracle/11.2/client export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib But, in Nagios 3.4.1, i do not receive the corect status for those services: For all 3 services i receive: CRITICAL - cannot connect to IGAS. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/nagios/libexec /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 13) line 3. I realy don't know what to check anymore and why does it say that, so any help would be apreciated. More info: nagios@monitor:/usr/local/nagios/libexec$ ./check_oracle_health -V check_oracle_health (1.7.3) nagios@monitor:/usr/local/nagios/etc$ uname -a Linux monitor 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux nagios@monitor:/usr/local/nagios/etc$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 12.04.1 LTS Release:12.04 Codename: precise Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro On 10/03/2012 09:34 AM, Claudio Kuenzler wrote: It's not that hard and a lot of things are written in the documentation of check_oracle_health. I even wrote an article about this in September 2011 explaining the steps: http://www.claudiokuenzler.com/blog/192/install-perl-dbd-oracle-DBD::Oracle-on-SuSE-SLES10-without-cpan You should do it the way you prefer of course. But in my setup I wanted to run check_oracle_health on a standalone Nagios server. That way I also see if there's a latency in the remote sql query. Real life applications rarely use localhost connections. On Wed, Oct 3, 2012 at 8:14 AM, Cosmin Neagu cosmin.ne...@omnilogic.ro mailto:cosmin.ne...@omnilogic.ro wrote: Well, thats the hard part for me, installing those ORA files - didnt find yet how to do that. I think installing the plugin on DBServer and using NRPE is easier. Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro http://www.omnilogic.ro On 10/02/2012 06:05 PM, Claudio Kuenzler wrote: The plugin needs to be installed on the Oracle Database server. That's not entirely correct. It can also run on a standalone Nagios server
Re: [Nagios-users] Plugin check_oracle_health
Well, thats the hard part for me, installing those ORA files - didnt find yet how to do that. I think installing the plugin on DBServer and using NRPE is easier. Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro On 10/02/2012 06:05 PM, Claudio Kuenzler wrote: The plugin needs to be installed on the Oracle Database server. That's not entirely correct. It can also run on a standalone Nagios server. But you need to install the ora files to be able to launch the plugin against an Oracle DB server. I did that successfully on Nagios 3.3.1 against ORA11. -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Plugin check_oracle_health
Hi nagios users, I need to monitor an oracle database server, an found this plugin, check_oracle_health. The problem is that i'm not a DB Admin, and it seems that something else need to be configured along with this client like system variables (ORACLE_HOME and LD_LIBRARY_PATH) Since on the plugin site i did not find documentation on how to do that, i want to ask someone who use this plugin: This plugin needs to be installed on the nagios machine? Or it needs to be installed on the Oracle Database and used with NRPE? Because i see that those variables are set on DBServer. -- Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] check_ping strange behavior with google
You were right. It need to be told to use ipv4 with -4 switch. Thanks Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania www.omnilogic.ro On 06/07/2012 11:32 PM, Holger Weiß wrote: * Travis Runyardtravisruny...@gmail.com [2012-06-07 13:18]: It does work but I was using google.com which doesn't. Strange because it is pingable but returns network unreachable with check_ping. See my initial reply in this thread: | The hostname www.google.ro now¹ also resolves to an IPv6 address, and | check_ping has issues with IPv6 dependending on the ping6(1) | implementation used. These issues will hopefully be fixed in the next | release of the Nagios Plugins; until then, check_ping -4 [...] should | do the trick. [ http://article.gmane.org/gmane.network.nagios.user/73851 ] Holger -- 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-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- 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-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] check_ping strange behavior with google
Hi nagios users, Starting from yesterday, check_ping is behaving strange for a single host. When giving -H parameter as www.google.ro it gives CRITICAL - Network Unreachable But when giving -H parameter as IP address it is working. I have checked and there are no DNS issues nagios@mon2:/usr/local/nagios/libexec$ ./check_ping -H 173.194.35.159 -w 3000.0,80% -c 5000.0,100% PING OK - Packet loss = 0%, RTA = 46.97 ms|rta=46.971001ms;3000.00;5000.00;0.00 pl=0%;80;100;0 nagios@mon2:/usr/local/nagios/libexec$ ./check_ping -H www.google.ro -w 3000.0,80% -c 5000.0,100% CRITICAL - Network Unreachable (www.google.ro) nagios@mon2:/usr/local/nagios/libexec$ ping www.google.ro PING www-cctld.l.google.com (173.194.35.159) 56(84) bytes of data. 64 bytes from muc03s01-in-f31.1e100.net (173.194.35.159): icmp_seq=1 ttl=54 time=46.8 ms 64 bytes from muc03s01-in-f31.1e100.net (173.194.35.159): icmp_seq=2 ttl=54 time=46.8 ms Using nagios 3.2.3 nagios@mon2:/usr/local/nagios/libexec$ ./check_ping -h check_ping v1.4.15 (nagios-plugins 1.4.15) Copyright (c) 1999 Ethan Galstad nag...@nagios.org After a little more search Other sites works ok when used with check_ping, but not site containing goole is working nagios@mon2:/usr/local/nagios/libexec$ ./check_ping -H www.google.de -w 3000.0,80% -c 5000.0,100% CRITICAL - Network Unreachable (www.google.de) nagios@mon2:/usr/local/nagios/libexec$ ./check_ping -H www.google.com -w 3000.0,80% -c 5000.0,100% CRITICAL - Network Unreachable (www.google.com) nagios@mon2:/usr/local/nagios/libexec$ ./check_ping -H www.google.it -w 3000.0,80% -c 5000.0,100% CRITICAL - Network Unreachable (www.google.it) Any idea why? -- Cosmin Neagu NOC Team Leader Str. I. G. Duca nr. 36 Otopeni, Judetul Ilfov, 075100 Romania www.omnilogic.ro -- 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-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Unable to use check_bgp and check_catalyst_mem
Hi, Can anyoune help me understand what is wrong with those definitions? Please. On 10/31/2011 10:33 AM, Cosmin Neagu wrote: Actually, i have another one in the same situation, when executed manualy, it is working: /nagios@mon2:/usr/local/nagios/libexec$ ./check_catalyst_mem.pl -s 172.31.0.100 -C xxx -w 30 -c 20 OK: I/O: valid, Used: 25189592B Free: 41919272B (62%)! Processor: valid, Used: 114067808B Free: 801243696B (87%)!|WARING = 30%, CRITICAL = 20%/ But, when i define a service for it, it does not do the checking corectly: Status Critical and null status information: /define command { command_name check_catalyst_mem command_line $USER1$/check_catalyst_mem.pl -s $HOSTADDRESS$ $ARG1$ } define service { use generic-service host_name VSS6509 service_description Memory check_command check_catalyst_mem!-C xxx -w 30 -c 20 }/ What's wrong with this definitions and why nagios does not check corect? Cosmin Neagu On 10/31/2011 10:22 AM, Cosmin Neagu wrote: Hello, I'm trying to monitor bgp session, and i came upon the following script check_bgp. When i run it manually, it checks the bgp session OK: /nagios@mon2:/usr/local/nagios/libexec$ ./check_bgp.pl -H X.X.X.X -C xxx -p Y.Y.Y.Y OK - Y.Y.Y.Y (AS12345) state is established(6). Established for 69d9h34m43s. Last error Hold Timer Expired. / But, when i define the command, and add a service for it, it does not work. In nagios, i get CRITICAL status and /null/ Status information. Using nagios 3.2.3 /define command { command_name check_bgp command_line $USER1$/check_bgp.pl -H $HOSTADDRESS$ $ARG1$ }/ /define service { use generic-service host_name EDGE service_description eBGP to AS12345 check_command check_bgp!-C abcd -p Y.Y.Y.Y }/ So, what am i doing wrong? I have about 300 diferent services, and all checks works fine, this is the first time when a script works when invoked manually but not when invoked by nagios. Please help. -- Cosmin Neagu -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- RSAreg; Conference 2012 Save #36;700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Unable to use check_bgp
Hello, I'm trying to monitor bgp session, and i came upon the following script check_bgp. When i run it manually, it checks the bgp session OK: /nagios@mon2:/usr/local/nagios/libexec$ ./check_bgp.pl -H X.X.X.X -C xxx -p Y.Y.Y.Y OK - Y.Y.Y.Y (AS12345) state is established(6). Established for 69d9h34m43s. Last error Hold Timer Expired. / But, when i define the command, and add a service for it, it does not work. In nagios, i get CRITICAL status and /null/ Status information. Using nagios 3.2.3 /define command { command_name check_bgp command_line $USER1$/check_bgp.pl -H $HOSTADDRESS$ $ARG1$ }/ /define service { use generic-service host_name EDGE service_description eBGP to AS12345 check_command check_bgp!-C abcd -p Y.Y.Y.Y }/ So, what am i doing wrong? I have about 300 diferent services, and all checks works fine, this is the first time when a script works when invoked manually but not when invoked by nagios. Please help. -- Cosmin Neagu -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Unable to use check_bgp and check_catalyst_mem
Actually, i have another one in the same situation, when executed manualy, it is working: /nagios@mon2:/usr/local/nagios/libexec$ ./check_catalyst_mem.pl -s 172.31.0.100 -C xxx -w 30 -c 20 OK: I/O: valid, Used: 25189592B Free: 41919272B (62%)! Processor: valid, Used: 114067808B Free: 801243696B (87%)!|WARING = 30%, CRITICAL = 20%/ But, when i define a service for it, it does not do the checking corectly: Status Critical and null status information: /define command { command_name check_catalyst_mem command_line $USER1$/check_catalyst_mem.pl -s $HOSTADDRESS$ $ARG1$ } define service { use generic-service host_name VSS6509 service_description Memory check_command check_catalyst_mem!-C xxx -w 30 -c 20 }/ What's wrong with this definitions and why nagios does not check corect? Cosmin Neagu On 10/31/2011 10:22 AM, Cosmin Neagu wrote: Hello, I'm trying to monitor bgp session, and i came upon the following script check_bgp. When i run it manually, it checks the bgp session OK: /nagios@mon2:/usr/local/nagios/libexec$ ./check_bgp.pl -H X.X.X.X -C xxx -p Y.Y.Y.Y OK - Y.Y.Y.Y (AS12345) state is established(6). Established for 69d9h34m43s. Last error Hold Timer Expired. / But, when i define the command, and add a service for it, it does not work. In nagios, i get CRITICAL status and /null/ Status information. Using nagios 3.2.3 /define command { command_name check_bgp command_line $USER1$/check_bgp.pl -H $HOSTADDRESS$ $ARG1$ }/ /define service { use generic-service host_name EDGE service_description eBGP to AS12345 check_command check_bgp!-C abcd -p Y.Y.Y.Y }/ So, what am i doing wrong? I have about 300 diferent services, and all checks works fine, this is the first time when a script works when invoked manually but not when invoked by nagios. Please help. -- Cosmin Neagu -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Auto generated reports
Hello, Does anyone know a plugin that can generate periodically reports and sent them via email? Thanks -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Checking DHCP
Well...thanks for the comment. I thing you are right...i will add a pool for that ip address, just so it can give me an offer. Holger Weiß wrote: * Cosmin Neagu cosmin.ne...@omnilogic.ro [2010-07-08 10:12]: So from what i see on the server: DHCPD: DHCPDISCOVER received from client 0050.56a1.4fbf through relay 192.168.53.250 DHCPD: Seeing if there is an internally specified pool class DHCPD: there is no address pool for 192.168.53.250 Why can't you simply add an entry for 192.168.53.250 to the DHCP server configuration? I thing that nagios sets the relay agent ip address in dhcp header to be the ip address of the interface from where the dhcpdiscover is sent. Is there any posibilities to control this, i mean to put in that header whatever ip address i want for dhcp relay agent? No, because the server uses that IP address for the reply. That is, if you fake the field in question (giaddr), you won't get a response. Otherwise, i thing nagios cand only monitor dhcp servers on the same lan/subnet. check_dhcp's -u option works just fine if the server is configured appropriately. (And of course, you could use a real DHCP relay agent instead of check_dhcp's -u option.) Holger -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Checking DHCP
Hi All, I now this is an old post, but i have a problem in monitoring a dhcp server. Nagios is installed on a machine that is not on the same lan as the dhcp server. After reading the help, i tried something like this: cos...@cacti-1:/usr/local/nagios/libexec *./check_dhcp -v -u -s 10.0.0.2 -i eth1* Requested server address: 10.0.0.2 DHCP socket: 3 Hardware address: 00:50:56:a1:4f:bf Pretending to be relay client 192.168.53.250 DHCPDISCOVER to 10.0.0.2 port 67 DHCPDISCOVER XID: 96024288 (0x5B936E0) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 192.168.53.250 send_dhcp_packet result: 548 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 0 Valid responses for this machine: 0 CRITICAL: No DHCPOFFERs were received. This CRITICAL answer is given even if i can see the server giving an ip address from the same class as nagios ip (192.168.53.250). I even see dhcp binding on the server: R1#sh ip dhcp binding Bindings from all pools not associated with VRF: IP address Client-ID/ Lease expirationType Hardware address/ User name 192.168.53.10050.56a1.4fbf Jul 08 2010 09:44 AM Automatic Now, the problem is that the dhcp server is giving up addreses not in the same subnet as nagios ip address. So if i try something like this: cos...@cacti-1:/usr/local/nagios/libexec *./check_dhcp -v -u -s 10.0.0.2 -r 1.0.0.8 -i eth1* Requested server address: 10.0.0.2 DHCP socket: 3 Hardware address: 00:50:56:a1:4f:bf Pretending to be relay client 192.168.53.250 DHCPDISCOVER to 10.0.0.2 port 67 DHCPDISCOVER XID: 1649874259 (0x62571553) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 192.168.53.250 send_dhcp_packet result: 548 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 0 Valid responses for this machine: 0 CRITICAL: No DHCPOFFERs were received. where 10.0.0.2 is the ip of dhcp server and 1.0.0.8 an address from a pool configured on the server, i receive no reply. The server respond like: *Jul 8 10:04:15.783: DHCPD: there is no address pool for 192.168.53.250 //this is the ip address of nagios. So from what i see on the server: DHCPD: DHCPDISCOVER received from client 0050.56a1.4fbf through relay 192.168.53.250 DHCPD: Seeing if there is an internally specified pool class DHCPD: there is no address pool for 192.168.53.250 I thing that nagios sets the relay agent ip address in dhcp header to be the ip address of the interface from where the dhcpdiscover is sent. Is there any posibilities to control this, i mean to put in that header whatever ip address i want for dhcp relay agent? Otherwise, i thing nagios cand only monitor dhcp servers on the same lan/subnet. and i realy need a remote solution for monitoring. Thx for help. Cosmin Neagu NOC Team Leader Str. I. G. Duca nr 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro Marc Powell wrote: On Jan 14, 2010, at 7:33 AM, Eduardo Barreto wrote: Hi All, Does anybody knows or have a clue on how to check a dhcp server, I've tried direct no success and then I'm trying to monitor it through nrpe. I'll appreciate any help There's a check_dhcp plugin in the standard plugins to verify that a DHCP server his handing out leases. You need to run it from a host on the LAN that your DHCP server answers on. In most cases you cannot run this plugin on the DHCP server itself as they are most often configured *not* to give answers to themselves. If you're limited to running something on the DHCP server itself, you'll likely only be able to look to see if the DHCP process/service is running. How that's done depends on the OS of the server and how you can get to it from the Nagios machine. -- Marc -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Nagios
Re: [Nagios-users] Beginer questions about check_http
Thanks allot, it make sens that way :) Cosmin Neagu NOC Team Leader Str. I. G. Duca nr 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro Assaf Flatto wrote: Cosmin Neagu wrote: Hello everybody, I'm using check_http to monitor a wab server where we have more than 3 web address. Like: www.example1.com www.example2.com www.example3.com...are all on the same server. Is there a way to check the status for each site? I'm a little confused from reding the help of check_http, i have tried like: libexec/check_http -H 194.81.149.12 -p 80 --url=/www.example1.com libexec/check_http -H 194.81.149.12 -p 80 -P www.example1.com libexec/check_http -H 194.81.149.12 -p 80 -s www.example1.com But the output is not what i'm expecting. Can someone tell me if this is even posible? I think it should be something like this: cos...@cacti-1:/usr/local/nagios libexec/check_http -H 194.81.149.12 -p 80 *-u www.example1.com* HTTP WARNING: HTTP/1.1 400 Bad Request But it gives me bad request, and i don't know why. PS: of course that all the testing is done with the real web site and the correct ip address, not exemple1.com. The best way to do that is to query the websites with the FQDN in the host address : libexec/check_http -H www.example.com -p 80 that will resolve and send the query to the server with the URL and will trigger the vhost reply on the target host . Assaf -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Beginer questions about check_http
Hello everybody, I'm using check_http to monitor a wab server where we have more than 3 web address. Like: www.example1.com www.example2.com www.example3.com...are all on the same server. Is there a way to check the status for each site? I'm a little confused from reding the help of check_http, i have tried like: libexec/check_http -H 194.81.149.12 -p 80 --url=/www.example1.com libexec/check_http -H 194.81.149.12 -p 80 -P www.example1.com libexec/check_http -H 194.81.149.12 -p 80 -s www.example1.com But the output is not what i'm expecting. Can someone tell me if this is even posible? I think it should be something like this: cos...@cacti-1:/usr/local/nagios libexec/check_http -H 194.81.149.12 -p 80 *-u www.example1.com* HTTP WARNING: HTTP/1.1 400 Bad Request But it gives me bad request, and i don't know why. PS: of course that all the testing is done with the real web site and the correct ip address, not exemple1.com. -- Cosmin Neagu NOC Team Leader Str. I. G. Duca nr 36 Otopeni, Judetul Ilfov, 075100 Romania Tel: 021 303 3159 / 0732 669 193 www.omnilogic.ro -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Sending mails - first post
OK, i have put in /etc/aliases: /root: cosmin.ne...@omnilogic.ro, \root/ The email account in Thunderbird has outgoing smtp server: mail2.omnilogic.ro:25 Also Lyle Giese gave me some more tips on how to configure /etc/postfix/main. This is how postfix are configured now: /etc/postfix/main.cfg: //everything else is left unchanged. /myhostname = mail2.omnilogic.ro //mydomain = omnilogic.ro/ /myorigin = $mydomain/ /mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain smtp_sasl_auth_enable = yes smtp_sasl_security_options = smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd transport_maps = hash:/etc/postfix/transport/ /relayhost =/ /etc/postfix/transport /omnilogic.ro : .omnilogic.ro : *smtp:[mail2.omnilogic.ro]:25/ /etc/postfix/sasl_passwd: /webmail.omnilogic.rocosmin.ne...@omnilogic.ro:***// / I have attached the 2 configs that i thing is relevant to Nagios host/service configurations. And regarding your last advice, i have no clue on how to configure my email client to check the email account on the nagios machine...don't i need a mail server on nagios machine for that? So...can anyone tell me what is missing, or point me to some step-by-step documentation? *** Just before pressing SEND, Lyle gave me some more hints, and now it working, i can receive mails. These line needed to be added in /etc/postfix/transport: mail2.omnilogic.ro : .mail2.omnilogic.ro : * smtp:[mail2.omnilogic.ro]:25 Thank allot Lyle Michael Saldivar wrote: On Tue, Nov 17, 2009 at 2:36 AM, Cosmin Neagu cosmin.ne...@omnilogic.ro mailto:cosmin.ne...@omnilogic.ro wrote: Hello everybody, From what i see from commands.cfg, by default it tries to send email with: /usr/bin/mail -s. But the email ends up in a local folder /var/mail/cosmin. Can anyone help me with some documentation or some advice on how can i make nagios send emails? Thanks. Looks like it is sending mail, and that mail is being delivered locally. When you configured Nagios to send e-mail, what e-mail address did you tell it to send to? Also, look for a file called /etc/aliases. Open it, and see if there is a line like: root: cosmin The name on the left may match the e-mail address you gave nagios, and the aliases file is re-directing that mail to the local user cosmin. Replace cosmin with an e-mail address on a different domain. Or modify Nagios to send to a an e-mail address on a domain different than the local machine. Or configure the e-mail client on your computer to check the e-mail account on your Nagios machine. -- Mike define contactgroup{ contactgroup_name Monitorizare alias Grup de monitorizare Omnilogic members EmailCosmin } define contact{ contact_nameEmailCosmin alias Cosmin Neagu Email contactgroups Monitorizare host_notifications_enabled 1 service_notifications_enabled 1 host_notification_periodAllTime service_notification_period AllTime host_notification_options d,u,r service_notification_optionsw,u,c,r host_notification_commands notify-host-by-email service_notification_commands notify-service-by-email email cosmin.ne...@omnilogic.ro } define host{ host_name Cosmin alias CosminLaptopDell address 192.168.53.151 check_command check-host-alive max_check_attempts 3 check_periodAllTime contactsEmailCosmin contact_groups Monitorizare notification_interval 30 notification_period AllTime } define service{ host_name Cosmin service_description HTTP check_command check_http notifications_enabled 1 notification_optionsw,u,c,r,f,s max_check_attempts 5 check_interval 5 ;minutes retry_interval 3 check_periodAllTime notification_interval 30 ;minutes notification_period AllTime contactsEmailCosmin contact_groups Monitorizare } define service{ host_name Cosmin service_description SSH check_command check_ssh notifications_enabled 1 notification_optionsw,u,c,r,f,s
[Nagios-users] Sending mails - first post
Hello everybody, First time here, so if it is a stupid questions, sorry for that. I have just installed nagios 3.2.0 an have some host and services monitoring. Is installed on SuSE 10.2. The only thing that i don't know hot to do, is making nagios to send emails. Never configured stuff relating to emails before. From what i see from commands.cfg, by default it tries to send email with: /usr/bin/mail -s. But the email ends up in a local folder /var/mail/cosmin. Can anyone help me with some documentation or some advice on how can i make nagios send emails? Thanks. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null