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

Fix sensu check json #215

Closed
wants to merge 2 commits into from
Closed

Fix sensu check json #215

wants to merge 2 commits into from

Conversation

stefanandres
Copy link

When creating sensu checks with sensu::check, it will create a json with:

root@controller:/etc/sensu/conf.d/checks# cat nova_api.json 
{
  "checks": {
    "nova_api": {
      "handlers": [
        "hipchat"
      ],
      "standalone": true,
      "interval": 60,
      "command": "PATH=$PATH:/usr/lib/nagios/plugins/ check_nova_api --auth_url http://10.0.80.148:5000/v2.0 --username admin --password keystone_admin_password_oeikoa7eiThi8 --tenant admin",
      "refresh": "60",
      "subscribers": [

      ]
    }
  }
}

The sensu-plugin will there fail because refresh is interpreted as string instead of an integer. The provider is missing .to_i for refresh and occurrences like it is used for interval.

@stefanandres
Copy link
Author

The commit where original code came from is: 5711908

@stefanandres
Copy link
Author

#217 fixes my thing too.

@jamtur01
Copy link
Contributor

jamtur01 commented Aug 8, 2014

This is fixed by #217

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

Successfully merging this pull request may close these issues.

2 participants