sensu-plugins / sensu-plugins-aws

This plugin provides native AWS instrumentation for monitoring and metrics collection, including: health and metrics for various AWS services, such as EC2, RDS, ELB, and more, as well as handlers for EC2, SES, and SNS.
http://sensu-plugins.io
MIT License
81 stars 143 forks source link

Get a bad gateway when try to install plugin. #312

Open lowks opened 5 years ago

lowks commented 5 years ago

This is the output when I try to run sensu-install -p aws :

[root@ip-172-31-6-16 centos]# sensu-install -v -p aws
[SENSU-INSTALL] installing Sensu plugins ...
[SENSU-INSTALL] provided Sensu plugins: ["aws"]
[SENSU-INSTALL] compiled Sensu plugin gems: ["sensu-plugins-aws"]
[SENSU-INSTALL] determining if Sensu gem 'sensu-plugins-aws' is already installed ...
[SENSU-INSTALL] gem list -i sensu-plugins-aws
false
[SENSU-INSTALL] Sensu gem 'sensu-plugins-aws' has not been installed
[SENSU-INSTALL] Sensu plugin gems to be installed: ["sensu-plugins-aws"]
[SENSU-INSTALL] installing Sensu gem 'sensu-plugins-aws'
[SENSU-INSTALL] gem install sensu-plugins-aws --no-ri --no-rdoc --verbose
HEAD https://api.rubygems.org/api/v1/dependencies
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=sensu-plugins-aws
200 OK
Getting SRV record failed: DNS result has no information for _rubygems._tcp.api.rubygems.org
GET https://api.rubygems.org/api/v1/dependencies?gems=aws-sdk,erubis,fog,fog-core,rest-client,right_aws,sensu-plugin
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=aws-sdk-resources,builder,excon,fog-atmos,fog-aws,fog-brightbox,fog-ecloud,fog-google,fog-json,fog-local,fog-powerdns,fog-profitbricks,fog-radosgw,fog-riakcs,fog-sakuracloud,fog-serverlove,fog-softlayer,fog-storm_on_demand,fog-terremark,fog-vmfusion,fog-voxel,fog-xml,formatador,http-cookie,ipaddress,json,mime-types,mixlib-cli,netrc,nokogiri,right_http_connection
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=aws-sdk-acm,aws-sdk-acmpca,aws-sdk-alexaforbusiness,aws-sdk-apigateway,aws-sdk-applicationautoscaling,aws-sdk-applicationdiscoveryservice,aws-sdk-appstream,aws-sdk-appsync,aws-sdk-athena,aws-sdk-autoscaling,aws-sdk-autoscalingplans,aws-sdk-batch,aws-sdk-budgets,aws-sdk-chime,aws-sdk-cloud9,aws-sdk-clouddirectory,aws-sdk-cloudformation,aws-sdk-cloudfront,aws-sdk-cloudhsm,aws-sdk-cloudhsmv2,aws-sdk-cloudsearch,aws-sdk-cloudsearchdomain,aws-sdk-cloudtrail,aws-sdk-cloudwatch,aws-sdk-cloudwatchevents,aws-sdk-cloudwatchlogs,aws-sdk-codebuild,aws-sdk-codecommit,aws-sdk-codedeploy,aws-sdk-codepipeline,aws-sdk-codestar,aws-sdk-cognitoidentity,aws-sdk-cognitoidentityprovider,aws-sdk-cognitosync,aws-sdk-comprehend,aws-sdk-configservice,aws-sdk-connect,aws-sdk-costandusagereportservice,aws-sdk-costexplorer,aws-sdk-databasemigrationservice,aws-sdk-datapipeline,aws-sdk-dax,aws-sdk-devicefarm,aws-sdk-directconnect,aws-sdk-directoryservice,aws-sdk-dlm,aws-sdk-dynamodb,aws-sdk-dynamodbstreams,aws-sdk-ec2,aws-sdk-ecr,aws-sdk-ecs,aws-sdk-efs,aws-sdk-eks,aws-sdk-elasticache,aws-sdk-elasticbeanstalk,aws-sdk-elasticloadbalancing,aws-sdk-elasticloadbalancingv2,aws-sdk-elasticsearchservice,aws-sdk-elastictranscoder,aws-sdk-emr,aws-sdk-firehose,aws-sdk-fms,aws-sdk-gamelift,aws-sdk-glacier,aws-sdk-glue,aws-sdk-greengrass,aws-sdk-guardduty,aws-sdk-health,aws-sdk-iam,aws-sdk-importexport,aws-sdk-inspector,aws-sdk-iot,aws-sdk-iot1clickdevicesservice,aws-sdk-iot1clickprojects,aws-sdk-iotanalytics,aws-sdk-iotdataplane,aws-sdk-iotjobsdataplane,aws-sdk-kinesis,aws-sdk-kinesisanalytics,aws-sdk-kinesisvideo,aws-sdk-kinesisvideoarchivedmedia,aws-sdk-kinesisvideomedia,aws-sdk-kms,aws-sdk-lambda,aws-sdk-lambdapreview,aws-sdk-lex,aws-sdk-lexmodelbuildingservice,aws-sdk-lightsail,aws-sdk-machinelearning,aws-sdk-macie,aws-sdk-marketplacecommerceanalytics,aws-sdk-marketplaceentitlementservice,aws-sdk-marketplacemetering,aws-sdk-mediaconvert,aws-sdk-medialive,aws-sdk-mediapackage,aws-sdk-mediastore,aws-sdk-mediastoredata,aws-sdk-mediatailor,aws-sdk-migrationhub,aws-sdk-mobile,aws-sdk-mq,aws-sdk-mturk,aws-sdk-neptune,aws-sdk-opsworks,aws-sdk-opsworkscm,aws-sdk-organizations,aws-sdk-pi,aws-sdk-pinpoint,aws-sdk-pinpointemail,aws-sdk-polly,aws-sdk-pricing,aws-sdk-rds,aws-sdk-redshift,aws-sdk-rekognition,aws-sdk-resourcegroups,aws-sdk-resourcegroupstaggingapi,aws-sdk-route53,aws-sdk-route53domains,aws-sdk-s3,aws-sdk-sagemaker,aws-sdk-sagemakerruntime,aws-sdk-secretsmanager,aws-sdk-serverlessapplicationrepository,aws-sdk-servicecatalog,aws-sdk-servicediscovery,aws-sdk-ses,aws-sdk-shield,aws-sdk-signer,aws-sdk-simpledb,aws-sdk-sms,aws-sdk-snowball,aws-sdk-sns,aws-sdk-sqs,aws-sdk-ssm,aws-sdk-states,aws-sdk-storagegateway,aws-sdk-support,aws-sdk-swf,aws-sdk-transcribeservice,aws-sdk-translate,aws-sdk-waf,aws-sdk-wafregional,aws-sdk-workdocs,aws-sdk-workmail,aws-sdk-workspaces,aws-sdk-xray,domain_name,dry-inflector,fission,google-api-client,mini_portile2,multi_json
502 Bad Gateway
GET https://api.rubygems.org/prerelease_specs.4.8.gz
200 OK
GET https://api.rubygems.org/specs.4.8.gz
200 OK
^CERROR:  Interrupted
/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-1.6.1/exe/sensu-install:79:in `system': Interrupt
        from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-1.6.1/exe/sensu-install:79:in `install_gem'
        from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-1.6.1/exe/sensu-install:139:in `block in install_plugins'
        from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-1.6.1/exe/sensu-install:138:in `each'
        from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-1.6.1/exe/sensu-install:138:in `install_plugins'
        from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-1.6.1/exe/sensu-install:185:in `run'
        from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-1.6.1/exe/sensu-install:195:in `<top (required)>'
        from /opt/sensu/embedded/bin/sensu-install:22:in `load'
        from /opt/sensu/embedded/bin/sensu-install:22:in `<main>'
notnmeyer commented 5 years ago

i believe the issue here is the huge number of dependencies. the installation hangs for me for about 5-10 minutes at the point you ctrl-c'd--but eventually completes.

replicating the issue here is as simple as gem install -V sensu-plugins-aws without any of the deps installed. i recommend you prepare a sandwich ahead of time.

majormoses commented 5 years ago

yes this is the same issue really as #293 some work is underway but we really need to get people that use the various scripts in there to test using only aws-sdk-v3 and the required gems rather than pulling in everything.

majormoses commented 5 years ago

I have seen that adding more resources to a machine has a significant impact on this.