Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check failed to run: undefined method `[]' for nil:NilClass #132

Open
pandaatrail opened this issue Sep 17, 2020 · 1 comment
Open

Check failed to run: undefined method `[]' for nil:NilClass #132

pandaatrail opened this issue Sep 17, 2020 · 1 comment

Comments

@pandaatrail
Copy link

pandaatrail commented Sep 17, 2020

Presentation

Launching an agent to check for mysql health, I get an error I don't know how to solve.

The context

I use Docker images with ruby shared runtime.
According to sensuctl asset list, the check I've created is:

---
type: CheckConfig
api_version: core/v2
metadata:
  created_by: global
  name: mysql_is_alive
  namespace: prod
spec:
  check_hooks: null
  command: check-mysql-alive.rb --ini /checks/my.cnf --ini-section=prod
  env_vars: null
  handlers: []
  high_flap_threshold: 0
  interval: 30
  low_flap_threshold: 0
  output_metric_format: ""
  output_metric_handlers: null
  proxy_entity_name: ""
  publish: true
  round_robin: false
  runtime_assets:
  - sensu-ruby
  - sensu-mysql
  secrets: null
  stdin: false
  subdue: null
  subscriptions:
  - mysql
  timeout: 20
  ttl: 0

The /checks/my.cnf directory is on the host, and shared through a volume into a Docker service.

The error

Here is the output I get from the agent executing the check:

Check failed to run: undefined method `[]' for nil:NilClass, ["/var/lib/sensu/2a68686cce9a58fffd7e384ede7538621a77d5930bba05c3296eb2a3b5f87d7caf20d0405099b2f9c81a5d86da7384b888e387dd84661b52ef23dc56e35431d8/lib/ruby/2.4.0/bundler/gems/sensu-plugins-mysql-a20e9500620b/bin/check-mysql-alive.rb:86:in `run'", "/var/lib/sensu/2a68686cce9a58fffd7e384ede7538621a77d5930bba05c3296eb2a3b5f87d7caf20d0405099b2f9c81a5d86da7384b888e387dd84661b52ef23dc56e35431d8/lib/ruby/2.4.0/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:59:in `block in <class:CLI>'"]
@pandaatrail
Copy link
Author

Up ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant