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

✨ Health Checks for Links #79

Merged
merged 5 commits into from
Sep 8, 2020
Merged

Conversation

wyred
Copy link
Contributor

@wyred wyred commented Jun 17, 2020

Here's a new feature that checks the http status code for each link using guzzle.

Once enabled, the health check task is hardcoded to run every 10 minutes, and only check up to a maximum of 20 links. You can configure how often to check each link at Settings. It is currently defaulted to 7 days, max 365.

healthcheck-settings

healthcheck-dashboard

healthcheck-deadlinks

guzzlehttp/guzzle is used to make the checks.

2 database columns http_status and http_checked_at are added to the links table.

I'm not familiar with vue so the links dashboard and dead links pages are done the traditional way using blade templates.

@MarceauKa
Copy link
Owner

MarceauKa commented Jun 17, 2020

Wow, nice work! Let me check that and I'll merge it :)

Edit: Give me some time, I'll add some nice enhancements to that (vue instead of blade for example)

@MarceauKa MarceauKa changed the title ✨ Health Checks for Links ✨ Health Checks for Links Jun 17, 2020
@Meuschke23
Copy link

Can individual links be excluded from the check? I also use the tool for links in the local network.

@wyred
Copy link
Contributor Author

wyred commented Jun 17, 2020

Some things to note, I used a Chrome user agent because sites like reddit block requests made with guzzle's default user agent. Even though with this user agent, some sites still manage to block and I have not been able to figure out how.

@wyred
Copy link
Contributor Author

wyred commented Jun 17, 2020

Can individual links be excluded from the check? I also use the tool for links in the local network.

As of now there's no way to exclude links, but the setting will come disabled by default so those links won't be pinged.

It's easy to add a way to exclude links but I'm not familiar with vue enough to build the interface for it.

@MarceauKa MarceauKa added the next version Something for the next version of the project label Jun 17, 2020
@MarceauKa
Copy link
Owner

MarceauKa commented Jun 17, 2020

To Do

  • Vue instead of blade
  • Full i18n
  • Disable health check for a link
  • 404 notification
  • Health check status on a link directly from a card (badge ?)

@wyred
Copy link
Contributor Author

wyred commented Sep 3, 2020

I've added the health check status on the link card, it will not show up if there's no data.
healthcheck-1

Health check can now be disabled for a specific link
healthcheck-2

List of disabled links can be viewed from control panel
healthcheck-3

@wyred
Copy link
Contributor Author

wyred commented Sep 3, 2020

@MarceauKa I've been learning vuejs for a while so if you haven't converted the control panel to vue, I'd like to give it a try. Let me know : )

@MarceauKa
Copy link
Owner

@MarceauKa I've been learning vuejs for a while so if you haven't converted the control panel to vue, I'd like to give it a try. Let me know : )

I'm working to release that, don't worry! :D

MarceauKa added a commit that referenced this pull request Sep 8, 2020
MarceauKa added a commit that referenced this pull request Sep 8, 2020
@MarceauKa MarceauKa merged commit 2ec3168 into MarceauKa:dev Sep 8, 2020
@MarceauKa MarceauKa removed the next version Something for the next version of the project label Sep 8, 2020
@MarceauKa
Copy link
Owner

Hi, just merged this with a lot of improvements. Look at this commit: fd2acc7

There are major changes in UI, commands, translations, controllers and migration

@MarceauKa MarceauKa added the enhancement New feature or request label Sep 8, 2020
@MarceauKa
Copy link
Owner

Released in 1.2.43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants