Hi,
I am trying to use the Box293 plugin for vcenter Monitoring.
When I add VMA server in portal, during the Perform VMA Host Test--->
Getting the test results as "The vMA host xxxxx is NOT in the known_hosts file.
Please refer to the box293_check_vmware manual on how to configure this Nagios host to communicate with the vMA host. "
I am also posting some of the commands executed easy for troubleshooting. I followed the instruction as per the manual. Please let me know is there anything missing.
--------------------As a root user,
[root@xxxxx var]# ssh vi-admin@xxxxx
Welcome to vSphere Management Assistant
vi-admin@xxxxx's password:
You have new mail in /var/spool/mail/root
-----------------------As a nagios user,
[root@xxxxx var]# su nagios
[nagios@xxxxx var]$ /usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H xxxxx -C '~/box293_check_vmware.pl --server xxxxx --check vCenter_Name_Version'
CRITICAL - Plugin timed out after 10 seconds
--------------------Entering vma server
[nagios@xxxxx var]$ ssh [email protected]
Welcome to vSphere Management Assistant
Last login: Wed Mar 16 15:20:56 CET 2016 from xxxxx.com on ssh
Last failed login: Wed Mar 16 15:27:11 CET 2016 from xxxxx.com on ssh:notty
There were 2 failed login attempts since the last successful login.
Last login: Wed Mar 16 15:28:17 2016 from xxxxx.rwe.com
vi-admin@xxxxx:~> ./box293_check_vmware.pl --server xxxxx --check vCenter_Name_Version
Enter username: readonly
OK: VMware vCenter Server 5.5.0 build-2001466
[nagios@xxxxx .ssh]$ ls -ltr
total 8
-rw-r-xr--+ 1 root root 442 Mar 16 11:59 known_hosts
-rw-r-x---+ 1 root root 668 Mar 16 11:59 id_dsa
Thanks
BOX293 Plugin ssh error
BOX293 Plugin ssh error
Last edited by sannatar on Fri Feb 01, 2019 11:12 am, edited 2 times in total.
Re: BOX293 Plugin ssh error
Which .ssh folder were you in at this time? pwd[nagios@hostname]$ ls -ltr
total 8
-rw-r-xr--+ 1 root root 442 Mar 16 11:59 known_hosts
-rw-r-x---+ 1 root root 668 Mar 16 11:59 id_dsa
I believe the permissions are off on this folder (depending where it is), see this post - https://support.nagios.com/forum/viewto ... 14#p123270
Former Nagios Employee
Re: BOX293 Plugin ssh error
.ssh is under directory /var/www/. We have followed the same topic "https://support.nagios.com/forum/viewto ... 14#p123270", but still it is throwing SSH connection not established.
Re: BOX293 Plugin ssh error
Did you adjust the permissions of your .ssh folder? Can you post a result of what the permissions are now?
Former Nagios Employee
Re: BOX293 Plugin ssh error
No. I haven't adjusted any permission.
[nagios@xxxxx libexec]$ cd /var/www/.ssh/
[nagios@xxxxx .ssh]$ ls -ltr
total 8
-rw-r-xr--+ 1 root root 442 Mar 16 14:19 known_hosts
-rw-r-x---+ 1 root root 668 Mar 16 14:19 id_dsa
[nagios@xxxxx libexec]$ cd /var/www/.ssh/
[nagios@xxxxx .ssh]$ ls -ltr
total 8
-rw-r-xr--+ 1 root root 442 Mar 16 14:19 known_hosts
-rw-r-x---+ 1 root root 668 Mar 16 14:19 id_dsa
Last edited by sannatar on Fri Feb 01, 2019 11:13 am, edited 2 times in total.
Re: BOX293 Plugin ssh error
Please update the permissions on the .ssh folder as directed by @Box293 -
Code: Select all
setfacl -R -m u:apache:r-x /var/www/.ssh/
Former Nagios Employee
Re: BOX293 Plugin ssh error
I have done this already. Again I ran the same command.
[root@xxxxx var]# setfacl -R -m u:apache:r-x /var/www/.ssh/
[root@xxxxx var]# cd /var/www/.ssh/
[root@xxxxx .ssh]# ls -ltr
total 8
-rw-r-xr--+ 1 root root 442 Mar 16 14:19 known_hosts
-rw-r-x---+ 1 root root 668 Mar 16 14:19 id_dsa
the same error: [root@xxxxx .ssh]# /usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H xxxxx -C '~/box293_check_vmware.pl --server xxxxx --check vCenter_Name_Version'
vi-admin@xxxxx's password:
[root@xxxxx var]# setfacl -R -m u:apache:r-x /var/www/.ssh/
[root@xxxxx var]# cd /var/www/.ssh/
[root@xxxxx .ssh]# ls -ltr
total 8
-rw-r-xr--+ 1 root root 442 Mar 16 14:19 known_hosts
-rw-r-x---+ 1 root root 668 Mar 16 14:19 id_dsa
the same error: [root@xxxxx .ssh]# /usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H xxxxx -C '~/box293_check_vmware.pl --server xxxxx --check vCenter_Name_Version'
vi-admin@xxxxx's password:
Last edited by sannatar on Fri Feb 01, 2019 11:09 am, edited 1 time in total.
Re: BOX293 Plugin ssh error
What is the result from the Nagios interface? Is the check working as expected?
Former Nagios Employee
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: BOX293 Plugin ssh error
See here how it is prompting you for as username, this is the cause of the issue.sannatar wrote:--------------------Entering vma server
[nagios@hostname var]$ ssh [email protected]
Welcome to vSphere Management Assistant
Last login: Wed Mar 16 15:20:56 CET 2016 from s930l3092.rwe.com on ssh
Last failed login: Wed Mar 16 15:27:11 CET 2016 from s930l3092.rwe.com on ssh:notty
There were 2 failed login attempts since the last successful login.
Last login: Wed Mar 16 15:28:17 2016 from s930l3092.rwe.com
vi-admin@hostname :~> ./box293_check_vmware.pl --server xxxxx --check vCenter_Name_Version
Enter username: readonly
OK: VMware vCenter Server 5.5.0 build-2001466
Page 27 of the manual explains what is going on and how to fix it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: BOX293 Plugin ssh error
I have added the vcenter cred in crdstore.
vi-admin@s93tv5022:~> /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add --server 10.87.178.100 --username "GROUP\ui577720" --password "test"
Existing entry modified successfully.
vi-admin@s93tv5022:~> /usr/lib/vmware-vcli/apps/general/credstore_admin.pl list
Server User Name
10.87.178.100 GROUP\ui577720
vi-admin@s93tv5022:~> ./box293_check_vmware.pl --server 10.87.178.100 --check vCenter_Name_Version
OK: VMware vCenter Server 5.5.0 build-2001466
Now it doesn't ask for username, I have only one entry in the credstore. But still I get the error in the portal when testing the ssh configuration for vMA server. Could you please help to resolve this error.
THANKS.
vi-admin@s93tv5022:~> /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add --server 10.87.178.100 --username "GROUP\ui577720" --password "test"
Existing entry modified successfully.
vi-admin@s93tv5022:~> /usr/lib/vmware-vcli/apps/general/credstore_admin.pl list
Server User Name
10.87.178.100 GROUP\ui577720
vi-admin@s93tv5022:~> ./box293_check_vmware.pl --server 10.87.178.100 --check vCenter_Name_Version
OK: VMware vCenter Server 5.5.0 build-2001466
Now it doesn't ask for username, I have only one entry in the credstore. But still I get the error in the portal when testing the ssh configuration for vMA server. Could you please help to resolve this error.
THANKS.
You do not have the required permissions to view the files attached to this post.