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

sensu-api not restarted when check definitions change #392

Closed
jhoblitt opened this issue Aug 3, 2015 · 7 comments
Closed

sensu-api not restarted when check definitions change #392

jhoblitt opened this issue Aug 3, 2015 · 7 comments

Comments

@jhoblitt
Copy link
Contributor

jhoblitt commented Aug 3, 2015

It appears that sensu-api needs to be restarted when check definitions change or they are not picked up by uchiwa. As a work around, I've put this expression into my manifest:

Class['::sensu::client::service'] ~> Class['::sensu::api::service']

Is this the correct way to handle check changes? If so, I'll open a PR.

@jlambert121
Copy link
Contributor

I don't believe the API needs to be restarted as it's just the relayer of information that's passed to it (I think you can even run the API service on a host with no knowledge of any checks). @portertech are you able to confirm this?

@jhoblitt
Copy link
Contributor Author

jhoblitt commented Aug 4, 2015

I've just reproduced this and the command column at http://uchiwa:3000/#/checks does not update when sensu-client, sensu-server, and uchiwa are restarted (and waiting 5 minutes then ctrl+f5 browser reload). It does update immediately when sensu-api is restarted. However, I've verified that the actual check executed does update correctly so this is essentially a display issue. Possibly relevant is that all of the checks I have defined are standalone as this is what sensu::check defaults to.

If this is indeed unexpected behavior, is uchiwa or sensu the correct upstream to report this to?

@jlambert121
Copy link
Contributor

From portertech on irc:

certain api routes serve static configuration, like /checks, that require service restarts

It appears that we should now add restarting the API as well when checks change.

@jlambert121
Copy link
Contributor

Looking at master it looks like if the api is installed on the machine $::sensu::check_notify should include it which is notified from the sensu_check resource in the defined type. What am I missing?

@jlambert121
Copy link
Contributor

@jhoblitt I'm going to go ahead and close this as I think master will restart the api as needed. Please let me know if it doesn't. (2.0 release forthcoming as well)

@jhoblitt
Copy link
Contributor Author

@jlambert121 Sounds reasonable to me -- I haven't had the time to re-investigate this issue. I'll reopen this ticket if/when I next battle this.

@GhostLyrics
Copy link

I don't think sensu-api is restarted automatically since my puppet-provided checks don't show up in the 'checks' part of uchiwa. Could we please re-check this?

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

3 participants