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

Flapjack 2.0.0 not processing event queue #944

Open
CVTJNII opened this issue May 26, 2016 · 8 comments
Open

Flapjack 2.0.0 not processing event queue #944

CVTJNII opened this issue May 26, 2016 · 8 comments

Comments

@CVTJNII
Copy link

CVTJNII commented May 26, 2016

I'm investigating upgrading from 1.x to 2.x but my initial tests are failing with the events queue not being processed. I have an upstream sending data into the events queue in Redis. The self_stats page shows the events queue count under global stats but the queue length graph is reporting NaN for all data points. I do not see any processor output in the logs beyond the following:

2016-05-26T20:16:07.185648+00:00 [DEBUG] :: flapjack-processor :: pikelet start for Flapjack::Processor
2016-05-26T20:16:07.185920+00:00 [INFO] :: flapjack-processor :: Booting main loop.

This is my processor config block, of which only the logger has been modified:

[processor]
  enabled = true
  queue = "events"
  notifier_queue = "notifications"
  archive_events = true
  events_archive_maxage = 10800
  # Flapjack sets scheduled maintenance on new check results so contacts aren't
  # notified as soon as Flapjack becomes aware of an entity to notify on.
  # This is useful is cases where your monitoring starts checking something
  # before it is completely provisioned
  # Value parsed by https://github.com/hpoydar/chronic_duration
  # You can disable this setting by specifying "0 seconds".
  new_check_scheduled_maintenance_duration = "100 years"
  new_check_scheduled_maintenance_ignore_regex = "bypass_ncsm$"
  [processor.logger]
    file = "/dev/stdout"
    level = "DEBUG"
    syslog_errors = false

So far I don't see any obvious PEBKAC issues. Has the events queue format changed?

@ghost
Copy link

ghost commented May 26, 2016

Flapjack 2.0 needs a "junk" event posted into the events_actions queue in Redis to trigger processing of the events queue. Something like this:

LPUSH events_actions, 'x'

The master branch of flapjackfeeder contains code to do this. You'll need to be using that version if you're using it to push data from Nagios/etc into Flapjack.

At least that's how I understand things. See options for configuration details.

@ali-graham
Copy link
Member

👍 The above is correct -- flapjackfeeder's master branch takes a flapjack_version=[1|2] argument in the nagios config file, and does the above action if it's 2.

@CVTJNII
Copy link
Author

CVTJNII commented May 27, 2016

So I'm using Sensu and Riemann which both feed data directly into the Redis events queue. Is that still expected to work, assuming I kickstart it as @tom-tuddenham-bulletproof mentioned, or do I now need an intermediary for Sensu and Riemann like flapjackfeeder is for Nagios?

@ghost
Copy link

ghost commented May 29, 2016

@CVTJNII what are you using to feed from Riemann to Flapjack?

@ali-graham
Copy link
Member

Whatever means Sensu and Riemann are using to feed data into Flapjack will need to be changed to implement the above action. Probably 10 lines of code or so each (flapjackfeeder was more, but that's C for you). Flapjack v2 does aim to provide feature parity, but with potentially breaking changes, and this is one of them (it's intended to make Flapjack's use of Redis more safely interruptible).

@CVTJNII
Copy link
Author

CVTJNII commented May 31, 2016

@tom-tuddenham-bulletproof I'm currently using this tool to feed from Riemann into Flapjack: https://github.com/avishai-ish-shalom/riemann-flapjack-output

@ali-graham I'm sorry, but I'm still not clear. Is the events_action kickstart all that is required, or are there other changes that need to be implemented as well?

@CVTJNII
Copy link
Author

CVTJNII commented Jun 2, 2016

I was unable to start processing by simply writing to events_actions.

LLEN events
:435
LPUSH events_actions 'x'
:1
LLEN events
:639
LLEN events
:714

flapjack_feeder won't work for my use case as I'm not using Nagios or Icinga. Is there documentation of the breaking changes here? It doesn't look like the Sensu and Riemann feeders are going to work against Flapjack 2 without some surgery.

@ali-graham
Copy link
Member

ali-graham commented Jun 2, 2016

The config file format has changed from YAML to TOML as well. Notification rules have also changed structure -- there's documentation for that within http://flapjack.io/docs/2.x/ , that header needs to be revised now that the release has actually happened. I don't think there's any solid migration document yet, only the high-level mailing list announcement of the beta.

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

2 participants