Page 1 of 1
Could not connect to InServ HPE 3par
Posted: Thu May 21, 2020 1:36 pm
by fraguillen
Good afternoon
We have an HPE 3par installed, the certificate had to be renewed, it was renewed until 2023 but we were alerted as "UNKNOWN" the specific monitoring.
We reinstalled the 3par client, the new password files were configured and it keeps generating the same error.
If I run the instruction directly on the Nagios server console it gives me the following results, the first with the nagios user and the second with the root user.
What should I do to solve it?
Best regards...
Re: Could not connect to InServ HPE 3par
Posted: Fri May 22, 2020 11:36 am
by ssax
You ran the command first as the root user which creates temp files owned by root, don't test commands as the root user,
su - nagios first before testing.
Do this (as root):
The do this:
Then test again.
Re: Could not connect to InServ HPE 3par
Posted: Fri May 22, 2020 12:59 pm
by fraguillen
Hello,
Thanks for your reply.
The following is the result after changing the permissions.
Best regards...
[root@ ~]# chown -R apache.nagios /tmp/3par*
[root@ ~]# ls /tmp -alh
total 38M
drwxrwxrwt. 22 root root 4.0K May 22 11:51 .
dr-xr-xr-x. 18 root root 257 Feb 14 05:21 ..
drwxr-xr-x 2 nagios nagios 23 Mar 13 07:32 10.3.103.212
-rw-r--r-- 1 apache nagios 165 May 22 11:49 3par_check_cap_fc.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:51 3par_check_cap_fc.10.149.136.244.out
-rw-r--r-- 1 apache nagios 165 May 22 11:50 3par_check_cap_nl.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:47 3par_check_cap_nl.10.149.136.244.out
-rw-r--r-- 1 apache nagios 165 May 22 11:48 3par_check_cap_ssd.10.149.136.244.out
-rw-r--r-- 1 apache nagios 165 May 22 11:51 3par_check_ld.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:48 3par_check_ld.10.149.136.244.out
-rw-r--r--. 1 apache nagios 27M May 22 11:51 3par_check_log.out
-rw-r--r-- 1 apache nagios 165 May 22 11:51 3par_check_node.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:51 3par_check_node.10.149.136.244.out
-rw-r--r-- 1 apache nagios 165 May 22 11:49 3par_check_pd.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:50 3par_check_pd.10.149.136.244.out
-rw-r--r-- 1 apache nagios 3 May 21 09:53 3par_check_port_fc.10.149.136.243.filtered
-rw-r--r-- 1 apache nagios 165 May 22 11:51 3par_check_port_fc.10.149.136.243.out1
-rw-r--r-- 1 apache nagios 3 May 17 15:13 3par_check_port_fc.10.149.136.244.filtered
-rw-r--r-- 1 apache nagios 165 May 22 11:51 3par_check_port_fc.10.149.136.244.out1
-rw-r--r-- 1 apache nagios 165 May 22 11:51 3par_check_vv.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:48 3par_check_vv.10.149.136.244.out
drwxrwxrwt. 2 root root 6 Feb 13 22:27 .font-unix
drwxr-xr-x 2 root root 6 May 21 10:19 hsperfdata_root
And, here is the result of executing the command:
[root@ ~]# su - nagios
Last login: Thu May 21 11:55:30 CST 2020 on pts/5
[nagios@ ~]$ /usr/local/nagios/libexec/check_3par 10.149.136.244 /home/nagios/.hp3par/spe3par20k-01.pwf
/usr/local/nagios/libexec/check_3par: line 57: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 83: /tmp/3par_check_log.out: Permission denied
/usr/local/nagios/libexec/check_3par: line 85: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 114: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 142: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 195: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 224: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 252: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 285: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 325: [: ==: unary operator expected
/usr/local/nagios/libexec/check_3par: line 364: [: ==: unary operator expected
[nagios@ ~]$
Re: Could not connect to InServ HPE 3par
Posted: Fri May 22, 2020 2:37 pm
by ssax
It requires three arguments, you are only specifying two.
Code: Select all
/usr/local/nagios/libexec/check_3par 10.149.136.244 /home/nagios/.hp3par/spe3par20k-01.pwf check_pd
# Usage : check_3par InServ Username Command
#
# Supported commands
# check_pd : Check status of physical disks
# Degraded -> Warning
# Failed -> Critical
#
# check_node : Check status of controller nodes
# Degraded -> Warning
# Failed -> Critical
#
# check_ld : Check status of logical disks
# Degraded -> Warning
# Failed -> Critical
#
# check_vv : Check status of virtual volumes
# Degraded -> Warning
# Failed -> Critical
#
# check_port_fc : Check status of virtual volumes
# loss_sync -> Warning
# config_wait -> Warning
# login_wait -> Warning
# non_participate -> Warning
# error -> Critical
#
# check_cap_fc : Check used FC capacity
# >= $PCWARNINGFC -> Warning
# >= $PCCRITICALFC -> Critical
#
# check_cap_nl : Check used NL capacity
# >= $PCWARNINGNL -> Warning
# >= $PCCRITICALNL -> Critical
#
# check_ps : Check Power Supply Node and Cage
# Degraded -> Warning
# Failed -> Critical
#
Re: Could not connect to InServ HPE 3par
Posted: Fri May 22, 2020 5:05 pm
by fraguillen
I apologize, here I show the complete line:
[nagios@ ~]$ whoami
nagios
[nagios@ ~]$ /usr/local/nagios/libexec/check_3par 10.149.136.243 /home/nagios/.hp3par/spe3par10k-01.pwf check_ld
/usr/local/nagios/libexec/check_3par: line 83: /tmp/3par_check_log.out: Permission denied
/usr/local/nagios/libexec/check_3par: line 226: /tmp/3par_check_ld.10.149.136.243.out: Permission denied
Could not connect to InServ 10.149.136.243
[nagios@ ~]$
Re: Could not connect to InServ HPE 3par
Posted: Fri May 22, 2020 5:14 pm
by ssax
Actually, do this instead:
Re: Could not connect to InServ HPE 3par
Posted: Fri May 22, 2020 5:36 pm
by fraguillen
Yes, this has already been executed, it is shown without executing the line that you show me:
[nagios@ ~]$ whoami
nagios
[nagios@ ~]$ /usr/local/nagios/libexec/check_3par 10.149.136.243 /home/nagios/.hp3par/spe3par10k-01.pwf check_ld
/usr/local/nagios/libexec/check_3par: line 83: /tmp/3par_check_log.out: Permission denied
/usr/local/nagios/libexec/check_3par: line 226: /tmp/3par_check_ld.10.149.136.243.out: Permission denied
Could not connect to InServ 10.149.136.243
[nagios@ ~]$ ls -alh /tmp/3par*
-rw-r--r-- 1 apache nagios 165 May 22 11:49 /tmp/3par_check_cap_fc.10.149.136.243.out
-rw-r--r-- 1 apache nagios 522 May 22 15:59 /tmp/3par_check_cap_fc.10.149.136.244.out
-rw-r--r-- 1 apache nagios 165 May 22 11:50 /tmp/3par_check_cap_nl.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:47 /tmp/3par_check_cap_nl.10.149.136.244.out
-rw-r--r-- 1 apache nagios 165 May 22 11:48 /tmp/3par_check_cap_ssd.10.149.136.244.out
-rw-r--r-- 1 apache nagios 165 May 22 11:51 /tmp/3par_check_ld.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:48 /tmp/3par_check_ld.10.149.136.244.out
-rw-r--r--. 1 apache nagios 27M May 22 15:59 /tmp/3par_check_log.out
-rw-r--r-- 1 apache nagios 165 May 22 11:51 /tmp/3par_check_node.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:51 /tmp/3par_check_node.10.149.136.244.out
-rw-r--r-- 1 apache nagios 165 May 22 11:49 /tmp/3par_check_pd.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:50 /tmp/3par_check_pd.10.149.136.244.out
-rw-r--r-- 1 apache nagios 3 May 21 09:53 /tmp/3par_check_port_fc.10.149.136.243.filtered
-rw-r--r-- 1 apache nagios 165 May 22 11:51 /tmp/3par_check_port_fc.10.149.136.243.out1
-rw-r--r-- 1 apache nagios 3 May 17 15:13 /tmp/3par_check_port_fc.10.149.136.244.filtered
-rw-r--r-- 1 apache nagios 165 May 22 11:51 /tmp/3par_check_port_fc.10.149.136.244.out1
-rw-r--r-- 1 apache nagios 165 May 22 11:51 /tmp/3par_check_vv.10.149.136.243.out
-rw-r--r-- 1 apache nagios 165 May 22 11:48 /tmp/3par_check_vv.10.149.136.244.out
[nagios@ ~]$
Re: Could not connect to InServ HPE 3par
Posted: Tue May 26, 2020 4:10 pm
by ssax
Your permissions show it as not being done:
-rw-r--r-- 1
apache nagios 165 May 22 11:51 /tmp/3par_check_node.10.149.136.243.out
-rw-r--r-- 1
apache nagios 165 May 22 11:51 /tmp/3par_check_node.10.149.136.244.out
-rw-r--r-- 1
apache nagios 165 May 22 11:49 /tmp/3par_check_pd.10.149.136.243.out
Run this command (it is different command), and then test again:
Re: Could not connect to InServ HPE 3par
Posted: Fri May 29, 2020 1:07 pm
by fraguillen
Best regards
I executed the command that had been shared with me, but it is different from the one that you show me here, I will execute the latter to see what results.
[root@ ~]# chown -R nagios.nagios /tmp/3par*
[root@ ~]# su - nagios
Last login: Fri May 22 16:01:21 CST 2020 on pts/1
[nagios@ ~]$ ls -alh /tmp/3par*
-rw-r--r-- 1 nagios nagios 165 May 29 12:01 /tmp/3par_check_cap_fc.10.149.136.243.out
-rw-r--r-- 1 nagios nagios 165 May 29 12:00 /tmp/3par_check_cap_fc.10.149.136.244.out
-rw-r--r-- 1 nagios nagios 165 May 29 12:02 /tmp/3par_check_cap_nl.10.149.136.243.out
-rw-r--r-- 1 nagios nagios 165 May 22 11:47 /tmp/3par_check_cap_nl.10.149.136.244.out
-rw-r--r-- 1 nagios nagios 165 May 22 11:48 /tmp/3par_check_cap_ssd.10.149.136.244.out
-rw-r--r-- 1 nagios nagios 165 May 29 12:02 /tmp/3par_check_ld.10.149.136.243.out
-rw-r--r-- 1 nagios nagios 165 May 29 12:03 /tmp/3par_check_ld.10.149.136.244.out
-rw-r--r--. 1 nagios nagios 27M May 29 12:03 /tmp/3par_check_log.out
-rw-r--r-- 1 nagios nagios 165 May 22 11:51 /tmp/3par_check_node.10.149.136.243.out
-rw-r--r-- 1 nagios nagios 165 May 22 11:51 /tmp/3par_check_node.10.149.136.244.out
-rw-r--r-- 1 nagios nagios 165 May 29 12:02 /tmp/3par_check_pd.10.149.136.243.out
-rw-r--r-- 1 nagios nagios 165 May 29 12:02 /tmp/3par_check_pd.10.149.136.244.out
-rw-r--r-- 1 nagios nagios 3 May 21 09:53 /tmp/3par_check_port_fc.10.149.136.243.filtered
-rw-r--r-- 1 nagios nagios 165 May 22 11:51 /tmp/3par_check_port_fc.10.149.136.243.out1
-rw-r--r-- 1 nagios nagios 3 May 17 15:13 /tmp/3par_check_port_fc.10.149.136.244.filtered
-rw-r--r-- 1 nagios nagios 165 May 22 11:51 /tmp/3par_check_port_fc.10.149.136.244.out1
-rw-r--r-- 1 nagios nagios 165 May 22 11:51 /tmp/3par_check_vv.10.149.136.243.out
-rw-r--r-- 1 nagios nagios 165 May 29 12:01 /tmp/3par_check_vv.10.149.136.244.out
[nagios@ ~]$ /usr/local/nagios/libexec/check_3par 10.149.136.243 /home/nagios/.hp3par/spe3par10k-01.pwf check_ld
Could not connect to InServ 10.149.136.243
[nagios@ ~]$ rm -f /tmp/3par*
[nagios@ ~]$ exit
logout
[root@ ~]# chown -R nagios.nagios /tmp/3par*
chown: cannot access ‘/tmp/3par*’: No such file or directory
[root@ ~]# su - nagios
Last login: Fri May 29 12:01:57 CST 2020 on pts/3
[nagios@ ~]$ /usr/local/nagios/libexec/check_3par 10.149.136.243 /home/nagios/.hp3par/spe3par10k-01.pwf check_ld
Could not connect to InServ 10.149.136.243
[nagios@ ~]$ ls -alh /tmp/3par*
-rw-r--r-- 1 nagios nagios 165 May 29 12:05 /tmp/3par_check_cap_fc.10.149.136.244.out
-rw-rw-r-- 1 nagios nagios 165 May 29 12:05 /tmp/3par_check_ld.10.149.136.243.out
-rw-rw-r-- 1 nagios nagios 130 May 29 12:05 /tmp/3par_check_log.out
[nagios@ ~]$
Re: Could not connect to InServ HPE 3par
Posted: Mon Jun 01, 2020 11:30 am
by ssax
Yes, it was my mistake, that's why I was having you run a different command.
Are you trying to use SSH (the default) or the 3par CLI?
Please attach this file:
/usr/local/nagios/libexec/check_3par
If SSH, I think you may need to do this again:
Then test again as the nagios user.
If that doesn't work, you may need to do this again:
Then test:
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_3par 10.149.136.243 check_ld