Re: [Nagios-users] Trouble with check_nrpe+check_hpasm

2009-06-02 Thread CSingh


-Original Message-
From: Trond Hasle Amundsen [mailto:t.h.amund...@usit.uio.no] 
Sent: Tuesday, June 02, 2009 11:35 AM
To: Singh, Charanbeer (LSBSR tech)
Cc: m...@ena.com; nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] Trouble with check_nrpe+check_hpasm

 writes:

> Thanks for your suggestion. I was able to get it fixed. Check_hpasm
> plugin needs to be run with root privileges. So, on locsys, 

No, it doesn't. The check_hpasm plugin will automatically try to use
sudo unless it is run as root. Add the following to your /etc/sudoers
file:

  xyzuser ALL=NOPASSWD:/sbin/hpasmcli
  xyzuser ALL=NOPASSWD:/usr/sbin/hpacucli

Also, you need to disable "requiretty", i.e. comment out this line:

  Defaultsrequiretty

That is all :)

Cheers,
-- 
Trond Hasle Amundsen 
Center for Information Technology Services, University of Oslo



Interestingly, I already had the above in my /etc/sudoers when I was
getting the error. I tried to run /usr/local/nagios/libexec/check_hpasm
as xyzuser and it prompted me for a password (apparently it was trying
to use sudo on its own).

Allowing /usr/local/nagios/libexec/check_hpasm in /etc/sudoers to
xyzuser and then defining the check_hpasm command in nrpe.cfg prefixed
with sudo fixed the problem.

Charan

This email is intended only for the named person or entity to which it is 
addressed and contains valuable business information that is proprietary, 
privileged, confidential and/or otherwise protected from disclosure. 
Dissemination, distribution or copying of this email or the information herein 
by anyone other than the intended recipient, or an employee or agent 
responsible for delivering the message to the intended recipient, is 
prohibited. If you have received this email by mistake, please delete it from 
your system immediately and notify the sender. Email transmission cannot be 
guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The 
sender therefore does not accept liability for any errors or omissions in the 
contents of this message, which arise as a result of email transmission.
 

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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] Trouble with check_nrpe+check_hpasm

2009-06-02 Thread Trond Hasle Amundsen
 writes:

> Thanks for your suggestion. I was able to get it fixed. Check_hpasm
> plugin needs to be run with root privileges. So, on locsys, 

No, it doesn't. The check_hpasm plugin will automatically try to use
sudo unless it is run as root. Add the following to your /etc/sudoers
file:

  xyzuser ALL=NOPASSWD:/sbin/hpasmcli
  xyzuser ALL=NOPASSWD:/usr/sbin/hpacucli

Also, you need to disable "requiretty", i.e. comment out this line:

  Defaultsrequiretty

That is all :)

Cheers,
-- 
Trond Hasle Amundsen 
Center for Information Technology Services, University of Oslo

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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] Trouble with check_nrpe+check_hpasm

2009-06-02 Thread CSingh


-Original Message-
From: Trond Hasle Amundsen [mailto:t.h.amund...@usit.uio.no] 
Sent: Tuesday, June 02, 2009 5:20 AM
To: Singh, Charanbeer (LSBSR tech)
Cc: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] Trouble with check_nrpe+check_hpasm

 writes:

> CHECK_NRPE: Socket timeout after 10 seconds.

>You may want to increase the timeout. check_hpasm can take ages to
>finish, depending on the amount of storage attached to the server. It's
>not the fault of check_hpasm, but "hpacucli", which it uses to check
the
>storage subsystem. We have increased the NRPE timeout to 180 sec on
some
>servers to work around this.


Thank you for this suggestion, it was nice to be aware about this
problem.

Regards,
-- 
Trond Hasle Amundsen 
Center for Information Technology Services, University of Oslo

This email is intended only for the named person or entity to which it is 
addressed and contains valuable business information that is proprietary, 
privileged, confidential and/or otherwise protected from disclosure. 
Dissemination, distribution or copying of this email or the information herein 
by anyone other than the intended recipient, or an employee or agent 
responsible for delivering the message to the intended recipient, is 
prohibited. If you have received this email by mistake, please delete it from 
your system immediately and notify the sender. Email transmission cannot be 
guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The 
sender therefore does not accept liability for any errors or omissions in the 
contents of this message, which arise as a result of email transmission.
 

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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] Trouble with check_nrpe+check_hpasm

2009-06-02 Thread CSingh


-Original Message-
From: Marc Powell [mailto:m...@ena.com] 
Sent: Monday, June 01, 2009 6:40 PM
To: Nagios Users Mailinglist
Subject: Re: [Nagios-users] Trouble with check_nrpe+check_hpasm


On Jun 1, 2009, at 4:45 PM, 
 wrote:

>
> I am monitoring system named locsys from NAGIOS server named Nagios.
>
> I can get check_hpasm to work locally on the system being monitored  
> (locsys) but I am unable to get check_hpasm to work with check_nrpe  
> when monitored through NAGIOS server. Other monitoring commands work  
> fine with check_nrpe with the same combination. Here are some  
> command outputs to provide a better understanding.
>
> [r...@locsys ~]# /usr/local/nagios/libexec/check_hpasm
> OK - System: 'proliant dl360 g3', S/N: 'xx', ROM: 'P31  
> 09/15/2004', hardware working fine, da: 1 logical drives, 2 physical  
> drives

Does this work as the user NRPE runs as? You should never test nagios- 
related tasks as root. Permission differences will lead you down wrong  
paths and waste a lot of time.

> Any clues would be appreciated.

http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf - Troubleshooting  
section. If the first part doesn't help, NRPE's debug mode may.

--
Marc


Thanks for your suggestion. I was able to get it fixed. Check_hpasm
plugin needs to be run with root privileges. So, on locsys, 

1. I had to allow the user NRPE runs as (xyzuser), privileges to the
command /usr/local/nagios/libexec/check_hpasm in /etc/sudoers 

xyzuser
ALL=NOPASSWD:/sbin/hpasmcli,/usr/local/nagios/libexec/check_hpasm

(Note that check_hpasm documentation already mentions giving sudo access
to nrpe user for /sbin/hpasmcli).

and 

2. Define the check_hpasm command in nrpe.cfg prefixed with sudo as
follows:

command[check_hpasm]=sudo /usr/local/nagios/libexec/check_hpasm


Regards,
Charan




--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the
latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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 email is intended only for the named person or entity to which it is 
addressed and contains valuable business information that is proprietary, 
privileged, confidential and/or otherwise protected from disclosure. 
Dissemination, distribution or copying of this email or the information herein 
by anyone other than the intended recipient, or an employee or agent 
responsible for delivering the message to the intended recipient, is 
prohibited. If you have received this email by mistake, please delete it from 
your system immediately and notify the sender. Email transmission cannot be 
guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The 
sender therefore does not accept liability for any errors or omissions in the 
contents of this message, which arise as a result of email transmission.
 

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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] Trouble with check_nrpe+check_hpasm

2009-06-02 Thread Trond Hasle Amundsen
 writes:

> CHECK_NRPE: Socket timeout after 10 seconds.

You may want to increase the timeout. check_hpasm can take ages to
finish, depending on the amount of storage attached to the server. It's
not the fault of check_hpasm, but "hpacucli", which it uses to check the
storage subsystem. We have increased the NRPE timeout to 180 sec on some
servers to work around this.

Regards,
-- 
Trond Hasle Amundsen 
Center for Information Technology Services, University of Oslo

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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] Trouble with check_nrpe+check_hpasm

2009-06-01 Thread Marc Powell

On Jun 1, 2009, at 4:45 PM,  
 wrote:

>
> I am monitoring system named locsys from NAGIOS server named Nagios.
>
> I can get check_hpasm to work locally on the system being monitored  
> (locsys) but I am unable to get check_hpasm to work with check_nrpe  
> when monitored through NAGIOS server. Other monitoring commands work  
> fine with check_nrpe with the same combination. Here are some  
> command outputs to provide a better understanding.
>
> [r...@locsys ~]# /usr/local/nagios/libexec/check_hpasm
> OK - System: 'proliant dl360 g3', S/N: 'xx', ROM: 'P31  
> 09/15/2004', hardware working fine, da: 1 logical drives, 2 physical  
> drives

Does this work as the user NRPE runs as? You should never test nagios- 
related tasks as root. Permission differences will lead you down wrong  
paths and waste a lot of time.

> Any clues would be appreciated.

http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf - Troubleshooting  
section. If the first part doesn't help, NRPE's debug mode may.

--
Marc


--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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] Trouble with check_nrpe+check_hpasm

2009-06-01 Thread CSingh
I am monitoring system named locsys from NAGIOS server named Nagios.

 

I can get check_hpasm to work locally on the system being monitored
(locsys) but I am unable to get check_hpasm to work with check_nrpe when
monitored through NAGIOS server. Other monitoring commands work fine
with check_nrpe with the same combination. Here are some command outputs
to provide a better understanding.

 

[r...@locsys ~]# /usr/local/nagios/libexec/check_hpasm

OK - System: 'proliant dl360 g3', S/N: 'xx', ROM: 'P31 09/15/2004',
hardware working fine, da: 1 logical drives, 2 physical drives

 

On NAGIOS server I get this:

 

[r...@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H locsys -c
check_hpasm

CHECK_NRPE: Socket timeout after 10 seconds.

 

Other check_nrpe monitoring commands work fine with the same
combination:

 

[r...@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H locsys -c
check_memory

OK: 66% (2028M) free memory.

 

 

Any clues would be appreciated.

 

Regards,

Charan

 

 


This email is intended only for the named person or entity to which it is 
addressed and contains valuable business information that is proprietary, 
privileged, confidential and/or otherwise protected from disclosure. 
Dissemination, distribution or copying of this email or the information herein 
by anyone other than the intended recipient, or an employee or agent 
responsible for delivering the message to the intended recipient, is 
prohibited. If you have received this email by mistake, please delete it from 
your system immediately and notify the sender. Email transmission cannot be 
guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The 
sender therefore does not accept liability for any errors or omissions in the 
contents of this message, which arise as a result of email transmission.
 
--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get___
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