[Nagios-users] bacula plugin incorrect output

2013-06-23 Thread Tim Dunphy
Hey all,

I've tried adding a plugin from the exchange for bacula backups. The output
is not quite right and I think my definitions may be off. I'd like to try
for some advice.

This is the output:

Check Bacula Last
Backuphttp://nagios.jokefire.com/nagios/cgi-bin/extinfo.cgi?type=2host=nagiosservice=Check+Bacula+Last+Backup
UNKNOWN06-23-2013 13:45:490d 0h 4m 8s3/3check_bacula_lastbackup.pl 1.0
Nagios Plugin

My command definition is this:

# A command to check bacula last backup
define command{
command_namecheck_bacula_last_backup
command_line$USER1$/check_bacula_lastbackup.pl -H HOSTADDRESS
-client $ARG1$
}

# Define a service to check last bacula backup on the  local machine.
define service{
use generic-service
host_name   nagios
service_description Check Bacula Last Backup
contact_groups  linux-admins
check_command   check_bacula_last_backup!
cloud.mydomain.com
notifications_enabled   1
}


If I run the check locally the output appears correct:

[root@cloud:~] #/usr/local/nagios/libexec/check_bacula_lastbackup.pl-client
cloud.mydomain.com

OK: Last backup for cloud.mydomain.com was 10:43 hours ago.mydomain


And these are the ownership/permissions on the script:


[root@cloud:~] #ls -l /usr/local/nagios/libexec/check_bacula_lastbackup.pl

-rwxrwxr-x 1 nagios nagios 4335 Jun 23 12:32 /usr/local/nagios/libexec/
check_bacula_lastbackup.pl


It'd be great if I could get an opinion on this and much appreciated.


Thanks

Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-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] can't access nagios.cmd from the interface

2013-03-18 Thread Tim Dunphy
Hello,

 I'm running nagios 3.2 under centos 5.9 and I notice if I try to issue any
command such as rescheduling a check I see the message:


Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd'
for update!

The permissions on the external command file and/or directory may be
incorrect. Read the FAQs on how to setup proper permissions.

An error occurred while attempting to commit your command for processing.

Return from whence you came

These are the permissions and ownership on this file:

prw-rw 1 nagios nagios 0 Mar 16 08:01
/usr/local/nagios/var/rw/nagios.cmd

Since this file gets recreated I tried applying the following commands:

[root@cloud:~] #chown nagios.nagios /usr/local/nagios/var/rw
[root@cloud:~] #chmod g+rwx /usr/local/nagios/var/rw
[root@cloud:~] #chmod g+s /usr/local/nagios/var/rw

This seems to have no effect. I notice if I try to reschedule the command
again I get the same error message telling me to 'return from whence I
came'.

The only thing I can do to make this temporarily work from the interface is
to change mode on that command file to world which is obviously not what
you want to do.

Can someone please point me in the right direction here as to where I may
be going wrong?

Thanks!
Tim




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
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_mar___
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] can't access nagios.cmd from the interface

2013-03-18 Thread Tim Dunphy
The user and group for apache is 'apache'

grep -i user httpd.conf

User apache

grep -i group  httpd.conf

Group apache

On Mon, Mar 18, 2013 at 7:00 PM, Tech Support supp...@voipbusiness.uswrote:

 What user is Apache running under?

 ** **

 *From:* Tim Dunphy [mailto:bluethu...@gmail.com]
 *Sent:* Monday, March 18, 2013 6:17 PM
 *To:* nagios-users@lists.sourceforge.net

 *Subject:* [Nagios-users] can't access nagios.cmd from the interface

 ** **

 Hello,


  I'm running nagios 3.2 under centos 5.9 and I notice if I try to issue
 any command such as rescheduling a check I see the message:


 

 Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd'
 for update!

 The permissions on the external command file and/or directory may be
 incorrect. Read the FAQs on how to setup proper permissions.

 An error occurred while attempting to commit your command for processing.

 Return from whence you came

 These are the permissions and ownership on this file:

 prw-rw 1 nagios nagios 0 Mar 16 08:01
 /usr/local/nagios/var/rw/nagios.cmd

 Since this file gets recreated I tried applying the following commands:

 [root@cloud:~] #chown nagios.nagios /usr/local/nagios/var/rw
 [root@cloud:~] #chmod g+rwx /usr/local/nagios/var/rw
 [root@cloud:~] #chmod g+s /usr/local/nagios/var/rw

 This seems to have no effect. I notice if I try to reschedule the command
 again I get the same error message telling me to 'return from whence I
 came'.

 The only thing I can do to make this temporarily work from the interface
 is to change mode on that command file to world which is obviously not what
 you want to do.

 Can someone please point me in the right direction here as to where I may
 be going wrong?

 Thanks!
 Tim


 


 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


 --
 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_mar
 ___
 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




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
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_mar___
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] can't access nagios.cmd from the interface

2013-03-18 Thread Tim Dunphy
By the way.. thanks for the hint! That did it.

Tim

On Mon, Mar 18, 2013 at 7:00 PM, Tech Support supp...@voipbusiness.uswrote:

 What user is Apache running under?

 ** **

 *From:* Tim Dunphy [mailto:bluethu...@gmail.com]
 *Sent:* Monday, March 18, 2013 6:17 PM
 *To:* nagios-users@lists.sourceforge.net

 *Subject:* [Nagios-users] can't access nagios.cmd from the interface

 ** **

 Hello,


  I'm running nagios 3.2 under centos 5.9 and I notice if I try to issue
 any command such as rescheduling a check I see the message:


 

 Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd'
 for update!

 The permissions on the external command file and/or directory may be
 incorrect. Read the FAQs on how to setup proper permissions.

 An error occurred while attempting to commit your command for processing.

 Return from whence you came

 These are the permissions and ownership on this file:

 prw-rw 1 nagios nagios 0 Mar 16 08:01
 /usr/local/nagios/var/rw/nagios.cmd

 Since this file gets recreated I tried applying the following commands:

 [root@cloud:~] #chown nagios.nagios /usr/local/nagios/var/rw
 [root@cloud:~] #chmod g+rwx /usr/local/nagios/var/rw
 [root@cloud:~] #chmod g+s /usr/local/nagios/var/rw

 This seems to have no effect. I notice if I try to reschedule the command
 again I get the same error message telling me to 'return from whence I
 came'.

 The only thing I can do to make this temporarily work from the interface
 is to change mode on that command file to world which is obviously not what
 you want to do.

 Can someone please point me in the right direction here as to where I may
 be going wrong?

 Thanks!
 Tim


 


 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


 --
 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_mar
 ___
 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




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
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_mar___
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] detect failover in suncluster

2012-11-24 Thread Tim Dunphy
Hello,

 I've been asked to check whether members of a number of sun clusters we have 
here have 'failed over' from primary to secondary. The clustered machines are 
all Oracle Databases. The idea is that if one node goes down then the secondary 
in the node becomes the primary Database. Apparently this is all achieved 
through Sun Cluster, which I have to admit I'm not well versed on.
 
 I did find a plugin in the nagios exchange that checks the components of Sun 
Cluster - things such as IPMP, resource groups and quorum. But what I don't 
think it offers is to tell if one node fails over to another. It could just be 
that I don't know enough about Sun Cluster to correlate the options in the 
check. 

Here's the usage for the check:

[db07-dc2:~] root% /opt/nagios/libexec/check_suncluster -h

Usage: check_suncluster [-t, -q, -g, -G resource-group, -r, -R resource, -i]
Usage: check_suncluster --help

Sun Cluster check plugin for Nagios

-t: check transport paths
-q: check quorum
-g: check resource groups
-G: check one individual resource group
-r: check all resources
-R: check one individual resources
-i: check IPMP groups

Does anyone out there have any suggestions on how I may get this check or 
perhaps another one you may know of to indicate whether a Sun Cluster 
(Database) node fails over and a secondary becomes primary?


Thanks in advance,
Tim

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_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


[Nagios-users] check_logfiles

2012-07-08 Thread Tim Dunphy
Hello,

 I am trying to use the check_logfiles plugin that I found on the exchange to 
find some critical patterns in the logs. 

 Here's the run of the command I am trying 

 [db:~] root% /opt/nagios/libexec/check_logfiles 
--logfile=/u01/app/oracle/admin/ecom/bdump/alert_ecom1.log --tag=oracle 
--rotation=linux --criticalpattern='ORA-00600' --warningpattern='ORA-*'
OK - no errors or warnings|oracle_lines=0 oracle_warnings=0 oracle_criticals=0 
oracle_unknowns=0


 This is what is in that logfile - 

[db07:~] root% grep 'ORA-00600' /u01/app/oracle/admin/ecom/bdump/alert_ecom1.log
ORA-00600 - This is only a test.. please disregard


But as you can see it's clearly not finding a pattern that I've specified.

Does anybody out there have enough experience with this plugin to know what may 
be going wrong here? Trying to get this figured out.

Thanks
Tim

--
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] printing info from nagios db check script

2012-05-13 Thread Tim Dunphy
Hey list,

 I'm having a small but important problem with a script I am writing in order 
to monitor the tablespaces of an oracle database. This is probably more of a 
bash programming issue, but as the ultimate purpose of the script is to be a 
nagios check I am hoping that you won't mind me asking here. 


Just to give you a brief overview of what I am experiencing, I'd like to start 
by giving you the output of a couple runs of the script and a couple snippets 
of code. 

First:

[db07-dc2:~] root% /opt/nagios/libexec/check_qaecom1_tablespace.sh 
/opt/nagios/libexec/check_qaecom1_tablespace.sh: line 60: [: BAM_USER_INDX_LG: 
unary operator expected
All OK


is mainly achieved through this loop:

while i=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql 
| awk '{print $1}') j=$($sqlplus -s -l $USERNAME/$PASS@$SID  
@/opt/bin/ops/mlb_tablespace.sql | awk '{print $3}') k=$($sqlplus -s -l 
$USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk '{print $2}') 
l=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk 
'{print $4}') 
do
TBLSPACE=$i
PCT=$j
FREE=$k
TOTAL=$l
if [  $TBLSPACE ]
then
   echo NOK $TBLSPACE is at $PCT $FREE/$TOTAL  
   exit 2
else
   echo All OK
exit 0
fi 
done

But as you can see a 'unary operator' error is produced by this code. As you 
can probably tell, all it does is execute a few sqlplus commands (with the SQL 
contained in a separate file) and assign them to a few variables. It 
incorrectly produces an 'OK' state.


But if I try to fix the 'unary operator' error by putting the TBLSPACE variable 
in quotes, the result changes from ALL OK to showing some output and 
(correctly) produces an error state: 

[db07-dc2:~] root% /opt/nagios/libexec/check_qaecom1_tablespace.sh 
NOK BAM_USER_INDX_LG
MLBDATASM is at 97.50%
95.85% 820
340/32764
8191 



while i=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql 
| awk '{print $1}') j=$($sqlplus -s -l $USERNAME/$PASS@$SID  
@/opt/bin/ops/mlb_tablespace.sql | awk '{print $3}') k=$($sqlplus -s -l 
$USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk '{print $2}') 
l=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk 
'{print $4}') 
do
TBLSPACE=$i
PCT=$j
FREE=$k
TOTAL=$l
if [  $TBLSPACE ]
then
   echo NOK $TBLSPACE is at $PCT $FREE/$TOTAL  
   exit 2
else
   echo All OK
exit 0
fi 
done

The SQL is designed to list any tablespaces that grow beyond a certain 
threshold. 


My question is this:

[db07-dc2:~] root% /opt/nagios/libexec/check_qaecom1_tablespace.sh 
NOK BAM_USER_INDX_LG # -- this is correctly output from the script
MLBDATASM is at 97.50%   # -- this is also correctly output from the 
scipt
95.85% 820   # -- but where does this additional and 
different percentage come from?
340/32764# -- and why are the two variables 
$FREE/$TOTAL broken up on different lines?
8191



I realize that this may not be an easy question, but I wanted to put this out 
there in case anyone has faced a similar situation before. 



Here is the entirety of the shell script:


#!/bin/bash

# exit codes
CRED_ERR=1  # if the credentials are not valid
NOARGS=2# if the required parameters were not supplied

# credentials / environment variables
ORACLE_HOME=/u01/app/oracle/product/10.2.0.4
ORACLE_SID=qaecom1
sqlplus=/u01/app/oracle/product/10.2.0.4/bin/sqlplus
USERNAME=mlbwatch
PASS=n3x1ch3q
SID=${ORACLE_SID}

if [ -z ${USERNAME} ] || [ -z ${PASS} ];   # Exit if no arguments were 
given.
then
echo Error: Username or Password are empty
exit $NOARGS
fi ;

PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export ORACLE_HOME PATH LD_LIBRARY_PATH



while i=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql 
| awk '{print $1}') j=$($sqlplus -s -l $USERNAME/$PASS@$SID  
@/opt/bin/ops/mlb_tablespace.sql | awk '{print $3}') k=$($sqlplus -s -l 
$USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk '{print $2}') 
l=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk 
'{print $4}') 
do
TBLSPACE=$i
PCT=$j
FREE=$k
TOTAL=$l
if [  $TBLSPACE ]
then
   echo NOK $TBLSPACE is at $PCT $FREE/$TOTAL  
   exit 2
else
   echo All OK
exit 0
fi 
done


errorCode=$?# checks if the last operation (sqlplus) was completed 
successfully or not
if [ ${errorCode} -ne 0 ]
then
echo Running sqlplus FAILED
exit ${CRED_ERR}
echo
fi


And here's the SQL that the script calls.

--###
--###  THIS IS FOR TABLESPACE MONITORING with exclusion of TEMP and UNDO 
--##Tablespace Alert - A tablespace has reached a crital state!  #
--###  Checks for different pecentage thresholds by total size of the TS.   #
--###  Alert the DBA 

Re: [Nagios-users] printing info from nagios db check script

2012-05-13 Thread Tim Dunphy
hey guys,

 this was kind of interesting so I thought I might report it to anyone who 
might take an interest in this thread. But I just realized where the 
'additional' percentage that the tablespace check is reporting comes from.

 It comes from the fact that the check is attempting to report two tablespaces 
and that's why the formatting is falling apart. 

 I altered the print statement of the loop a little bit and saw the important 
difference:

 while i=$($sqlplus -s -l $USERNAME/$PASS@$SID  
@/opt/bin/ops/mlb_tablespace.sql | awk '{print $1}') j=$($sqlplus -s -l 
$USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk '{print $3}') 
k=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk 
'{print $2}') l=$($sqlplus -s -l $USERNAME/$PASS@$SID  
@/opt/bin/ops/mlb_tablespace.sql | awk '{print $4}')
do
TBLSPACE=$i
PCT=$j
FREE=$k
TOTAL=$l
if [ $TBLSPACE ]
then
   echo NOK  $TBLSPACE  is at   $PCT  $FREE/$TOTAL 
   exit 2
else
   echo All OK
exit 0
fi
done

Now outputs:

[db07-dc2:~] root% /opt/nagios/libexec/check_qaecom1_tablespace.sh 
NOK BAM_USER_INDX_LG MLBDATASM  is at  97.50% 95.85% 820 340/32764 8191


So what I need to try and figure out is how to print additional tablespaces 
that meet the threshold levels and have the output make sense visually. I will 
keep working on this, but would welcome any input you might have. 


Thanks
Tim

- Original Message -
From: Tim Dunphy bluethu...@jokefire.com
To: nagios-users@lists.sourceforge.net
Sent: Sunday, May 13, 2012 6:27:36 PM
Subject: printing info from nagios db check script

Hey list,

 I'm having a small but important problem with a script I am writing in order 
to monitor the tablespaces of an oracle database. This is probably more of a 
bash programming issue, but as the ultimate purpose of the script is to be a 
nagios check I am hoping that you won't mind me asking here. 


Just to give you a brief overview of what I am experiencing, I'd like to start 
by giving you the output of a couple runs of the script and a couple snippets 
of code. 

First:

[db07-dc2:~] root% /opt/nagios/libexec/check_qaecom1_tablespace.sh 
/opt/nagios/libexec/check_qaecom1_tablespace.sh: line 60: [: BAM_USER_INDX_LG: 
unary operator expected
All OK


is mainly achieved through this loop:

while i=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql 
| awk '{print $1}') j=$($sqlplus -s -l $USERNAME/$PASS@$SID  
@/opt/bin/ops/mlb_tablespace.sql | awk '{print $3}') k=$($sqlplus -s -l 
$USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk '{print $2}') 
l=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk 
'{print $4}') 
do
TBLSPACE=$i
PCT=$j
FREE=$k
TOTAL=$l
if [  $TBLSPACE ]
then
   echo NOK $TBLSPACE is at $PCT $FREE/$TOTAL  
   exit 2
else
   echo All OK
exit 0
fi 
done

But as you can see a 'unary operator' error is produced by this code. As you 
can probably tell, all it does is execute a few sqlplus commands (with the SQL 
contained in a separate file) and assign them to a few variables. It 
incorrectly produces an 'OK' state.


But if I try to fix the 'unary operator' error by putting the TBLSPACE variable 
in quotes, the result changes from ALL OK to showing some output and 
(correctly) produces an error state: 

[db07-dc2:~] root% /opt/nagios/libexec/check_qaecom1_tablespace.sh 
NOK BAM_USER_INDX_LG
MLBDATASM is at 97.50%
95.85% 820
340/32764
8191 



while i=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql 
| awk '{print $1}') j=$($sqlplus -s -l $USERNAME/$PASS@$SID  
@/opt/bin/ops/mlb_tablespace.sql | awk '{print $3}') k=$($sqlplus -s -l 
$USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk '{print $2}') 
l=$($sqlplus -s -l $USERNAME/$PASS@$SID  @/opt/bin/ops/mlb_tablespace.sql | awk 
'{print $4}') 
do
TBLSPACE=$i
PCT=$j
FREE=$k
TOTAL=$l
if [  $TBLSPACE ]
then
   echo NOK $TBLSPACE is at $PCT $FREE/$TOTAL  
   exit 2
else
   echo All OK
exit 0
fi 
done

The SQL is designed to list any tablespaces that grow beyond a certain 
threshold. 


My question is this:

[db07-dc2:~] root% /opt/nagios/libexec/check_qaecom1_tablespace.sh 
NOK BAM_USER_INDX_LG # -- this is correctly output from the script
MLBDATASM is at 97.50%   # -- this is also correctly output from the 
scipt
95.85% 820   # -- but where does this additional and 
different percentage come from?
340/32764# -- and why are the two variables 
$FREE/$TOTAL broken up on different lines?
8191



I realize that this may not be an easy question, but I wanted to put this out 
there in case anyone has faced a similar situation before. 



Here is the entirety of the shell script:


#!/bin/bash

# exit codes
CRED_ERR=1  # if the credentials are not valid
NOARGS=2# if the required

[Nagios-users] permissions error on host groups page

2012-02-17 Thread Tim Dunphy
Hello list,

 I am getting a permissions error on my Host Groups page I was wondering if I 
could get an opinon on how to solve this issue


  It appears as though you do not have permission to view information for any 
of the hosts you requested...
  If you believe this is an error, check the HTTP server authentication 
requirements for accessing this CGI
  and check the authorization options in your CGI configuration file.


 From the cgi.cfg I have the following options set:

authorized_for_system_commands=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin


I was hoping that I could get some advice on how to solve this issue.


This is on a centos 5.7 x86 server.

Thanks!
tim



--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
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] blank home page issue

2012-02-17 Thread Tim Dunphy
Hello list,

I have one more nagging issue I'd like to try and solve if you'd be so kind... 
when I click on the home page to nagios all I see is a white page with nothing 
on it.. if I have a look at the logs I see that PHP can't find certain files 
even tho they are there...

## Error in the logs when clicking on homepage:

[root@aws-nag conf.d]# tail -f /var/log/httpd/nagios_ssl_error_log
[Fri Feb 17 13:06:17 2012] [error] [client 66.192.34.68] PHP Warning:  
require_once(./includes/rss/extlib/Snoopy.class.inc) [a 
href='function.require-once'function.require-once/a]: failed to open stream: 
No such file or directory in /usr/local/nagios/share/includes/rss/rss_fetch.inc 
on line 35, referer: https://nag2/nagios/side.php
[Fri Feb 17 13:06:17 2012] [error] [client 66.192.34.68] PHP Fatal error:  
require_once() [a href='function.require'function.require/a]: Failed 
opening required './includes/rss/extlib/Snoopy.class.inc' 
(include_path='.:/usr/share/pear:/usr/share/php') in 
/usr/local/nagios/share/includes/rss/rss_fetch.inc on line 35, referer: 
https://nag2/nagios/side.php


## these are the files that nagios is failing to open:

[root@aws-nag ~]# ls -l 
/usr/local/nagios/html/includes/rss/extlib/Snoopy.class.inc
-rwxr--r-- 1 nagios apache 27402 Jul 24  2011 
/usr/local/nagios/html/includes/rss/extlib/Snoopy.class.inc

[root@aws-nag ~]# ls -l /usr/local/nagios/share/includes/rss/rss_fetch.inc
-rw-rw-r-- 1 nagios apache 15058 Feb 13 14:37 
/usr/local/nagios/share/includes/rss/rss_fetch.inc




thanks once again,
tim

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
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] nagios url checks

2012-01-19 Thread Tim Dunphy



the check url with check_http results in warning in the web interface:


FOO.com

Notifications for this service have been disabled
UNKNOWN 01-19-2012 17:12:04 0d 0h 0m 9s 1/4 
check_http: Warning threshold must be integer - /index.jsp 


the command definition is set to this:

'check_url' command definition
define command{
command_namecheck_url
command_line$USER1$/check_http -H $HOSTADDRESS$ -u $ARG1$ -w $ARG2$ 
 -c $ARG3$
}


the service definition is set to this:


define service{
use local-service ; Name of service 
template to use
host_name   localhost
service_description foo.com
check_command   check_url!foo.com!/index.jsp!5!10
notifications_enabled   0
}

the command I am trying to use does work on the command line: 

[root@mlb-nag ~]# /usr/local/nagios/libexec/check_http -H foo.com -u /index.jsp 
-w 5 -c 10
HTTP OK: HTTP/1.0 200 OK - 143385 bytes in 0.161 second response time 
|time=0.161110s;5.00;10.00;0.00 size=143385B;;;0



The reason I am taking this approach is that the URL is a large load balanced 
web environment with over 200 web servers and the load balancer is set to not 
respond to pings. If I use a traditional host check, the host is reported as 
'down' tho the URL check usually works if handled in this manner. I am 
attempting to monitor the URL in such a way that the host check is not reported 
as down.


thanks

tim





--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-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


[Nagios-users] problem resgistering new service

2011-10-08 Thread Tim Dunphy
Hello list!!

I am trying to setup a new plugin that will check haproxy. However when I try 
to add the service definition to the config file I am getting an error claiming 
that it cannot register the service. I was wondering where I could best look to 
track down this error and if anyone has any suggestion that might help 
troubleshoot this.

# config error

Error: Could not register service (config file 
'/usr/local/nagios/etc/objects/lb.cfg', starting on line 197)
   Error processing object config files!

## service definition from /usr/local/nagios/etc/objects/lb.cfg 

define service {
  host_name virtual  ## - line 197
  service_description   HAProxy
  check_command check_haproxy!http://virtual/admin?stats;csv
}

## host definition for 'virtual' host in /usr/local/nagios/etc/objects/lb.cfg

define host{

use linux-server
host_name   virtual
address 192.168.1.200
}


## command definition

define command {
command_namecheck_haproxy
command_line$USER1$/check_haproxy.pl -u $ARG1$
#~  _commentTest url HAProxy
}


thanks in advance!
tim

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
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] disk checks unreliable

2011-10-05 Thread Tim Dunphy
hello list!

 hello.. I am running a nagios disk check that reports OK even when the 
partition is not mounted or the machine is shut down .. how can I test the 
check and adjust it so that it reports accurately?


## Machine info

CentOS release 5.6 (Final)
i686

##Nagios Version

Nagios Core 3.3.1

## Command definition

define command{
command_namecheck_store_disk
command_line$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}


## Service definition

define service{
use local-service ; Name of service 
template to use
#host_name   localhost
hostgroup_name  web-servers
service_description Store Partition
check_command   check_store_disk!20%!10%!/
}

The disk is mounted:

[root@VIRTCENT11:~] #df -h
nas2:/mnt/store
  1.4T  370G  876G  30% /mnt/store

[root@VIRTCENT11:~] #/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p 
/mnt/store
DISK OK - free space: /mnt/store 896088 MB (70% inode=99%);| 
/mnt/store=378829MB;1108624;1247202;0;1385780

In this case the check is accurate...the disk is mounted

Now I unmount the partition:

[root@VIRTCENT11:~] #umount /mnt/store

I verify that the partition is not mounted with df and then run the check again:

[root@VIRTCENT11:~] #/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p 
/mnt/store
DISK OK - free space: / 5737 MB (68% inode=96%);| /=2581MB;7017;7894;0;8772

But the check still thinks the disk is ok. 

How can I best address this problem?

Thank you,
Tim


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
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