Skip to content

Conversation

@fgiannar
Copy link
Contributor

@fgiannar fgiannar commented Nov 3, 2022

Adds veriflier/jetmon hostname in monitoring data we send to WPCOM.

Testing instructions

Pre-requisites

  • A JN site with Jetpack plugin active and fully connected
  • Downtime monitoring should be also on (Jetpack settings -> Downtime monitoring )

Jetmon status running

  • Update your test site's site_status in the DB to be 0: update jetpack_monitor_subscription set site_status=0 where blog_id=WPCOM_SITE_ID
  • Make sure your site is up and running
  • Restart jetmon with docker compose stop jetmon and docker compose start jetmon
  • Monitor ES and verify that host is now logged

Jetmon status down

  • You'll need to manually update PEER_OFFLINE_LIMIT to 1 in jetmon.js here: This determines how many peers have to confirm that the site is down before a notification email is sent. By default it's 3, however on our local envs we only run a single veriflier service, therefore we need to set this to 1 to actually send the monitoring data to WPCOM
  • Update your test site's site_status in the DB to be 1: update jetpack_monitor_subscription set site_status=1 where blog_id=WPCOM_SITE_ID
  • Bring your site down
  • Restart jetmon with docker compose stop jetmon and docker compose start jetmon
  • Monitor ES and verify that host is now logged in both Jetmon and Veriflier checks results

@fgiannar fgiannar self-assigned this Nov 3, 2022
@darssen
Copy link
Contributor

darssen commented Nov 10, 2022

Tested and able to verify that host is now logged in ES both for
Jetmon status running

[{"type":1,"host":"docker.jetmon.dev.com","status":1,"rtt":563,"code":200}]

Jetmon status down

[{"type":1,"host":"docker.jetmon.dev.com","status":0,"rtt":735,"code":503},{"type":1,"host":"docker.jetmon.dev.com","status":0,"rtt":818,"code":503},{"type":1,"host":"docker.jetmon.dev.com","status":0,"rtt":509,"code":503},{"type":2,"host":"veriflier","status":0,"rtt":564,"code":503}]

Copy link
Contributor

@darssen darssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fgiannar fgiannar merged commit c689b68 into master Nov 10, 2022
@fgiannar fgiannar deleted the add/include_hostname_in_monitoring_data branch November 10, 2022 11:01
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.

3 participants