Get emailed when a website changes
Klaxon is a free, quick to setup and easy to use service that checks websites for changes so you don't have to.
You add websites you want monitored and Klaxon will visit them periodically. If they change, it'll email you what's different. It's perfect for monitoring website changes you might miss â like freedom of information disclosure logs, court records or anything related to Donald Trump. It can even send notifications to Slack and Discord channels with a little extra setup.
Read more below or say hello to the humans behind the project at the Google Group email list.
Alerting journalists to changes on the web
Built and refined in the newsroom of The Marshall Project, Klaxon has provided our journalists with many news tips, giving us early warnings and valuable time to pursue stories. Klaxon has been used and tested by journalists at The Marshall Project, The New York Times, The Texas Tribune, Associated Press, and more.
The public release of this free and open-source software was supported by Knight-Mozilla OpenNews.
How Does Klaxon Work?
Klaxon enables users to "bookmark" portions of a webpage and be notified (via email, Slack, or Discord) of any changes that may occur to those sections. Learn more about bookmarklets on the help.md page.
Setting up your Klaxon
Klaxon is open-source software built by the newsroom of The Marshall Project, a nonprofit investigative news organization covering the American criminal justice system. It was created by a team of three â Ivar Vong, Andy Rossback and Tom Meagher â and it is subject to the kind of shortcomings any side project might encounter. It may break unexpectedly. It may miss a change in a website or an email might not fire off correctly. Still weâve found it immensely useful in our daily reporting. We want other journalists to benefit from Klaxon and to help us improve it, but keep these caveats in mind and use it at your own risk.
Our team hacks on Klaxon in spare moments and we plan to keep it humming for our own use. But we think this project has the potential to help just about any newsroom. For it to succeed and to evolve it will depend on the contributions from other journalist-developers. We are excited about the prospect of building a community around this project to help maintain it. So when you spot the inevitable bug, please let us know. And if youâd like to help us make this better or add new functionality to it weâd love to have your help.
Getting started
One of our goals for Klaxon is to make it as easy as possible for reporters and editors without tech backgrounds to use and to setup. Getting your own Klaxon running in your newsroom will require you to run a handful of instructions one-time through the help of online services Heroku and GitHub. It should take maybe 10 minutes to set up your Klaxon, including the time to create accounts on Heroku and GitHub if you need to.
We use Heroku to deploy software at The Marshall Project. We think it makes some of the tedious work of running servers a lot easier to deal with so we designed Klaxon to be easily deployable on Heroku. (If youâd like to run this in your newsroomâs preferred server setup â say using Docker or a Linux machine â we encourage you to do so, but know you'll be on your own maintaining it!)
If you want to use our setup, youâll need to create an account with Heroku if you donât already have one.
How much will this cost?
Heroku unfortunately no longer offers a free tier, so you will need to be able to pay around $10 a month to get started. Out of the box with Heroku youâll get:
- 12,000 emails per month with SendGrid
- 10,000 records of changes in your Postgres database
- A web interface
- A scan of each watched site every 10 minutes
If you find your newsroom hitting the limits of these tiers you can pay to expand them. To send up to 40,000 emails a month you may upgrade your Sendgrid add-on in Heroku for $9.95 a month. If you need to store more records in your database you can pay an additional $4 a month for up to 10 million rows. And if you need your web interface running around the clock, you can upgrade your Heroku dyno from the Eco to the Hobby level for $2 more a month. This likely won't be necessary â particularly in smaller newsrooms â but itâs good to know.
Letâs do this
If you have a Heroku account youâre ready to go â itâs time to click on this button:
It will take you to a page to configure your new app in Herokuâs dashboard. First, give your app a name in the first box. While this is technically optional, this will also double as the URL for your Klaxon instance, so think carefully about it for a moment. Try maybe an abbreviation for your newsroom with a hyphen and the word klaxon, like âwp-klaxonâ or âsl-klaxonâ. This will become a URL as https://sl-klaxon.herokuapp.com/
Scroll down to the admin_emails
field and add a comma-separated list of email addresses of your newsroomâs Klaxon administrators. These administrators will be able to create accounts for users in your organization as well as configure the Slack and Discord integrations.
Click the big purple âDeploy" button. If you havenât given Heroku your credit card yet it will ask you for your information now. After that, give Heroku a few minutes for the app to build.
When you see this message:
...youâre almost done.
Click on the button that says âManage Appâ. This takes you behind the scenes of the various components powering your Klaxon. On this resources screen, click on the link for âHeroku Scheduler,â which will take you a new screen where you must add the very important piece. The scheduler is what runs every 10 minutes to actually check all the sites and pages youâre watching. Click the long, purple "Add new job" button. In the text box next to the dollar sign, type the words ârake check:allâ with the colon and without the quotes. Under âFrequencyâ change it from âDailyâ to âEvery 10 minutesâ. Click the purple âSaveâ button and your scheduler item should look like this:
Sendgrid now requires an additional step to confirm that you are not a spammer. Your new Sendgrid account is created in a "suspended" state. To get it unsuspended you have to contact Sendgrid support. You can do this by clicking the Sendgrid logo on the Resources tab.
If clicking on the logo takes you to an error page do not worry. This has been known to happen as Sendgrid's system has undergone redesigns. Instead go to Sendgrid's page to ask for support. Be sure to use the same email address associated with your Heroku account and provide the url of your Klaxon instance. When they ask for "Business impact," choose "P3 General - You have a question about Sendgrid or how to use its products".
This step is a nuisance, but important. You will not be able to get an email log in to Klaxon until you are cleared by Sendgrid. This usually happens pretty quickly.
Unfortunately you are not yet done configuring Sendgrid. There are more steps to set up your account.
- From the Heroku application page, click on the "Resources" tab, and click the link to the Sendgrid plugin, this will take you to the Sendgrid website.
- In the left hand column choose Settings -> API Keys. Click the blue "Create an API Key" button in the top right corner.
- In the form that appears fill in the API key name (doesn't matter what you name it), make sure the "Full Access" option is selected, and click "Create & View".
- Click the API key to copy it to your clipboard. Then navigate back to Heroku.
- In the "Settings" tab of your Heroku app click the "Reveal Config Vars" button.
- Change the
SENDGRID_PASSWORD
variable to the API Key by clicking the pencil icon next to it, pasting it in, and saving it. - Change the
SENDGRID_USERNAME
variable to the string "apikey" in the same manner.
Next you'll need to set up a "Verified Sender" account in Sendgrid using an email address that you have access to. In your Sendgrid dashboard, click "Sender Authentication" and choose "Verify Single Sender." (See #404 for some more context.)
When you've completed this process in Sendgrid, you'll need to set the MAILER_FROM_ADDRESS
variable as you did above to your verified sender email address.
Finally, now, you should be done setting up your Sendgrid account.
At the top of the scheduler page, click the link that is the name of your app (âsl-klaxonâ). This will take you to back to Klaxon's dashboard. Then click the button in the upper right that says "Open app," and this should take you to your Klaxon's login screen on the web.
Type the admin email address that you gave the Heroku dashboard earlier into the text box and hit the âLoginâ button. Youâll then be redirected to a page that says an email has been sent to you. Check your inbox. This may take a minute or two to arrive.
In the email, click the âGo to Dashboardâ button. Youâre now authenticated in the system and can access your Klaxon. Configuring your Klaxon Once youâre logged in, you should see the main page that will fill up in the coming days with the feed of all of your Klaxon updates. Now, you want to go add other users in your newsroom to the system. Click the âSettingsâ button in the upper right corner, and select âUsersâ from the menu.
On the right side of the page, click the âCreate New Userâ button. Add the reporterâs first and last name and email address, and she will get an email allowing her into the Klaxon. Now, finally, you and your users can start adding web pages you want Klaxon to watch.
Limit new users to only those on specific email domain(s)
By default, people with any email address can be added as new users. If you'd like to allow only users with specific email domains, set the APPROVED_USER_DOMAINS
environment variable (or "Config Vars" in Heroku's lingo). That variable should be a comma-separated list of domains, e.g., themarshallproject.org,nsa.gov
.
Notify a Slack or Discord channel
Youâre all set for email notifications. If youâd like to also receive alerts through Slack and/or Discord you can set that up now. Click on the âSettingsâ button in the upper right corner of the page and choose âIntegrationsâ from the menu. On the Integrations page, click the âCreate Slack Integrationâ button. You can add an integration for any number of channels in your newsroomâs Slack or Discord. For each channel, you just have to set up an Incoming Webhook.
Slack
In Slack, click on the dropdown arrow in the upper left corner and choose âApps & Integrationsâ from the menu. This will open a new window in your browser for you to search the Slack app directory. In the search box, type âIncoming Webhooksâ and choose that option when it pops up. If you already have webhooks, youâll see a button next to your Slack organizationâs name that says âConfigure.â Otherwise, click the green button that says âInstallâ.
Now, choose the channel that you want the Klaxon alerts to go to from the dropdown menu. Weâd recommend that you not send them to #General, but maybe create a new channel called #Klaxon. After you create or choose your channel, click the green button that says âAdd Incoming Webhooks Integrationâ. Near the top of the next screen, you should see a red URL next to the label âWebhook URLâ. Copy that URL and switch over to your browser window with Klaxon in it. Paste the URL into the box labeled âWebhook URL,â and type the name of the channel you want your Slack alerts to go to into the âChannelâ box (this should be the same channel name you used in Slack when you created the integration). Now click the âCreate Slack Integration Buttonâ. Now you should be all set. If you want to have the ability to send Klaxon alerts to other channels, for specific reporting teams or for certain projects, you can repeat this process.
Discord
In Discord, click on the dropdown arrow in the upper left (next to your server name) and choose âServer Settingsâ from the menu. Click âIntegrationsâ in the left sidebar, then click the âCreate Webhookâ button.
Now, choose the name for your webhook (you can leave it the default random name if you'd like) and choose the channel that you want the Klaxon alerts to go to. Weâd recommend that you not send them to #general, but maybe create a new channel called #klaxon (you'll need to do this in your normal server view first). After you choose your channel, click âCopy Webhook URLâ. Switch over to your browser window with Klaxon in it. Paste the URL into the box labeled âWebhook URL,â and type the name of the channel you want your Discord alerts to go to into the âChannelâ box (this should be the same channel name you used in Discord when you created the integration). Additionally, you must append â/slackâ (without quotes) to the end of your webhook URL, as these alerts will be sent to Discord as a Slack-Compatible Webhook. Now click the âCreate Slack Integration Buttonâ. Now you should be all set. If you want to have the ability to send Klaxon alerts to other channels, for specific reporting teams or for certain projects, you can repeat this process.
Applying upgrades as the project develops
When we release major changes to Klaxon, weâll make an announcement to our Google Group email list. At that point, youâll likely want to adopt those in your system as well. If you're comfortable using git on the command line, this would require just a few simple commands: pull the changes from the master branch of this repo, merge them into your forked repo and push it all to Heroku.
But if you're not a programmer, there is still a fairly painless way to upgrade by using GitHub and Heroku. First, youâll need to fork our repo to your own GitHub account to receive the updates, and then you can use Herokuâs dashboard to push the changes to your application.
If you donât already have an account at GitHub now is a good time to set one up (donât worry, itâs free). This has the added benefit of giving you the ability to comment on issues. Once youâre logged into GitHub with your new account, go to the repo for the Klaxon project and click the âForkâ button. This copies our code into a separate version under your GitHub account that you can tie to your Klaxon instance running on Herokuâs servers.
Now, go to https://dashboard.heroku.com and choose your application (remember, the one you named when you first set up Klaxon, probably sl-klaxon or something similar if you followed our advice above). From the menu of options at the top of the page, click on the âDeployâ button. Look for section called âDeployment method,â which should be the second from the top of the Deploy page.
You should see three buttons. Click the one in the middle that says âGitHub Connect With GitHubâ. The options at the bottom of the page will change. Now, click the gray button that says âConnect To GitHubâ. It will pop up a new window to log you into GitHub, if you arenât already. In that window, click the âAuthorize Applicationâ button. The popup window should now close itself.
On the Heroku page, in the âConnect to GitHubâ section at the bottom, type âklaxonâ into the search box next to your GitHub username. Click the âSearchâ button. Next, click the âConnectâ button next to the name of your forked repo that pops up below. Finally, select the 'master' branch from the dropdown and click âEnable Automatic Deploysâ button in the âAutomatic deploysâ section. This ties your Heroku server to your GitHub account, so that every time you merge updates into your forked version of the Klaxon repository, they will automatically go live on your server with the latest updates. You'll only have to do all of this one time to set up the pipeline.
Note: if you are upgrading from version 0.2.0 or lower, please follow the additional instructions in migration_setup.md
Finally, each time an update is announced on the Google Group, you can go to your forked version of the repo on GitHub and click the green âNew Pull Requestâ button to pull the changes from our master repo.
On the "basefork" dropdown on the left, click and select your repo. Then click the âcompare across forksâ link and change the âhead forkâ on the dropdown menu to âmarshallproject/klaxonâ. Make sure both the branches are set to âmasterâ (they should already be). Below that, a green checkbox and the words âAble to mergeâ should appear. If they do, click the green âCreate Pull Requestâ button. Give this pull request a title. You might want to say âMerging Klaxon release 0.9.1â or whatever the new version number is and click the âCreate Pull Requestâ button again.
You should then get a response that looks like this:
If it does, and everything is green, youâre good to go. Just click the âMerge pull requestâ button then click the âConfirm mergeâ button and thatâs that.
Acknowledgements
The core contributors to Klaxon have been Ivar Vong, Andy Rossback, Tom Meagher and Gabe Isman.
We've been grateful for additional contributions to the project from:
- Jackson Gothe-Snape, SBS News
- Cameo Hill
- Emily Hopkins
- Matthew Verive
- Jason Kulatunga
- Yolanda Martinez
- Jeremy Merrill
- Ryan Murphy
- Justin Myers
- Kevin Schaul
- Ari Shapell
- Jeremy Singer-Vine
- Mike Stucka
- k.wakitani
- Bob Weston
We also owe thanks to Knight-Mozilla OpenNews, which supported the initial public release of this free and open source software.