ssh into ec2 nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
metadojo
Posts: 7
Joined: Thu Mar 29, 2012 1:16 pm

ssh into ec2 nagios

Post by metadojo »

hello,

I have done everything perfectly but cant ssh into nagios...

(from a ubuntu vm on my desktop)
ssh -i testnewkp.pem [email protected]
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

ive tried a new pem file, changing perms on the pem file
tried from mindterm java applet from aws console
tried from putty
tried from a ubuntu vm on my desktop
ive tried ec2-user, root, nagiosadmin,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ssh into ec2 nagios

Post by scottwilkerson »

How long after starting the instance did you try the connection?

After bringing up the instance for the first time, it takes about 15-20 minutes (on a m1.large) before all the software is installed.

It takes even longer for smaller instances.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
metadojo
Posts: 7
Joined: Thu Mar 29, 2012 1:16 pm

Re: ssh into ec2 nagios

Post by metadojo »

many hours after initial installation.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ssh into ec2 nagios

Post by scottwilkerson »

The key file needs to be the one downloaded from Amazon. No others will work.

Amazon places the public key on the server after bootup.

The user you need to login as is ec2-user, and the permissions on the keyfile should be 600
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
metadojo
Posts: 7
Joined: Thu Mar 29, 2012 1:16 pm

Re: ssh into ec2 nagios

Post by metadojo »

yes ive done all that. actually the first box i fired up suddenly worked today.
24 hours?!

i created a new VM in ec2
and seeing the same symptoms now.

anyway to speed this up?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ssh into ec2 nagios

Post by scottwilkerson »

What size instances are you starting?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
metadojo
Posts: 7
Joined: Thu Mar 29, 2012 1:16 pm

Re: ssh into ec2 nagios

Post by metadojo »

small.
metadojo
Posts: 7
Joined: Thu Mar 29, 2012 1:16 pm

Re: ssh into ec2 nagios

Post by metadojo »

ok i was able to get in finally...

i have another issue now... the original problem....

Hello,

I am running a small instance of
AMI: nagiosxi/centos/6/2.2-SNAPSHOT-1/x86_64 (ami-8f8d53e6)
the nagios image in AWS EC2.

I tried installing the check_mongo.py plugin into nagios XI with these directions....
http://www.doug.kerr-net.us/mediawiki/i ... _Configure

in short...
define command {
command_name check_mongodb
command_line $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$
}

define service {
use generic-service
hostgroup_name Mongo Servers
service_description Mongo Connect Check
check_command check_mongodb!connect!27017!2!4

}

and then i go to the XI UI and
create a command
a host to point to my mongodb install
and a nagios service that runs the check command

unfortunately i get Return code of 127 is out of bounds, plugin may be missing

I tried installing pymongo manually with yum install pymongo.

I tried changing the command structure from

$USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$
To
$USER1$ /check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$
To
/usr/local/nagios/libexec/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$

and i chmod the check_mongo.py file to 777

nothing has worked so far.

any ideas?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ssh into ec2 nagios

Post by scottwilkerson »

metadojo wrote:ok i was able to get in finally...

i have another issue now... the original problem....
Answered here
http://support.nagios.com/forum/viewtop ... f=6&t=5379
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked