Page 1 of 1

check_asm

Posted: Thu Feb 22, 2018 4:30 am
by junqian1992
Hi support,
I'm using the check_asm, but when i direct run on the client server is show below result:

[root@XXXXXXX libexec]# ./check_asm --asm_home=/u01/installer/grid --action=dgstate
[CRITICAL] Diskgroup state: (: ERROR:) (invalid: ORA-01017:) (: ) (: ) (Invalid: SP2-0306:) (CONNECT]: Usage:) (logon>: where) (proxy>: ) (Invalid: SP2-0306:) (CONNECT]: Usage:) (logon>: where) (proxy>: ) (unable: SP2-0157:)

what is the problem? any configuration i need to configure?

Re: check_asm

Posted: Thu Feb 22, 2018 6:00 pm
by tgriep
I found this in the plugin on how the plugin needs to be ran.
This plug-in needs to be run as ASM binaries owner (usually oracle).

The command you would need to use to run the plugin as the Oracle user is as follows.

Code: Select all

sudo -u oracle ./check_asm --asm_home=/u01/installer/grid --action=dgstate
Try that and let us know if it works.

Re: check_asm

Posted: Thu Feb 22, 2018 9:54 pm
by junqian1992
Hi tgrip,

Client server :
after i put the sudo -u grid :

[root@xxxxxxxxx libexec]# sudo -u grid ./check_asm --asm_home=/u01/installer/grid --action=dgstate
[OK] Diskgroup state: (DATA: MOUNTED)

in my common.cfg i set
command[check_asm]=sudo -u grid /usr/local/nagios/libexec/check_asm --asm_home=/u01/installer/grid --action=diskstatus

i already enable sudo for nrpe-owner to run this script
nagios ALL=(grid) NOPASSWD: /usr/local/nagios/libexec/check_asm

when i direct run the command:
sudo -u grid /usr/local/nagios/libexec/check_asm --asm_home=/u01/installer/grid --action=diskstatus
sudo: unable to execute /usr/local/nagios/libexec/check_asm: Permission denied
=================================================================================================
nagios server :
but when nagios connect to using check_asm to collect result it show:
root@Nagios:/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_nrpe -H XXXXXXXXX -t 30 -c check_asm
NRPE: Unable to read output

Re: check_asm

Posted: Thu Feb 22, 2018 10:42 pm
by junqian1992
Hi,
I know the problem already, i set the nagios folder to 755 then the command is running normal now.
Thank for your help .

Re: check_asm

Posted: Fri Feb 23, 2018 9:04 am
by tgriep
Your welcome. If you do not have any related questions, shall I close and lock the port?

Re: check_asm

Posted: Mon Feb 26, 2018 3:18 am
by junqian1992
Hi,
Yes, can close the case.

Thank you.