check_by_ssh time out issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: check_by_ssh time out issue

Post by bosecorp »

nop, noting
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_by_ssh time out issue

Post by ssax »

I know you tried with "su nagios" but just for the sake of testing, can you try it with "su - nagios" and post the full output if it fails?

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_by_ssh -H x.x.x.x -C "/usr/local/nagios/libexec/check_disk /" -v
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: check_by_ssh time out issue

Post by bosecorp »

it works

[nagios@nagmonus1 ~]$ /usr/local/nagios/libexec/check_by_ssh -H x.x.x.x -C "/usr/local/nagios/libexec/check_disk /" -t 90
DISK OK - free space: / 324 MB (56% inode=90%);| /=251MB;;;0;576
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: check_by_ssh time out issue

Post by jolson »

bosecorp,

I know that you have mod_gearman installed. Is it possible that this check is being picked up by one of your mod_gearman workers, and therefore the check times out?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: check_by_ssh time out issue

Post by bosecorp »

the worker who is doing the check runs where the XI server runs.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_by_ssh time out issue

Post by tgriep »

Is your gearman workers running as a different user?
Try adding this to your command's $ARG2$ variable in XI and see if it works.

Code: Select all

-l nagios
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: check_by_ssh time out issue

Post by bosecorp »

it's running as Nagios.

I tried that already and still the same.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_by_ssh time out issue

Post by tgriep »

Try running the command in a shell using the hostname and not the IP address. Maybe there is a DNS issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: check_by_ssh time out issue

Post by bosecorp »

same issue
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_by_ssh time out issue

Post by tgriep »

Did running the command using the hostname and not the IP address work?
Can you run the following and post the results back?

Code: Select all

grep nag /etc/passwd
grep nag /etc/group
ls -alR /home/nagios
gearman_top
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked