Using Heartbeat as a Speed Test

(Josiah Raiche) #1

I'm trying to use Heartbeat to roughly check intranet speed. I have a large file on an internal server and I can reach it with heartbeat.

I'm testing on a slow internet connection. In the browser it takes over a minute to load this file. Heartbeat is reporting total time as 1 second or less.

I've tried the following configuration:

- type: http
  name: "Big File"
  urls: ["http://path/to/bluemarble.jpg"]
  schedule: '@every 30s'
    method: GET

Stuff I've tried:

I attempted to set the method just in case it was trying to do a HEAD request.

I tried also using a regex like so to ensure the content was long, but got a TCP error:

    body: '.{500,}'

> error.message: "read tcp [ipv6]:port->[ipv6]:port: use of closed network connection"

I also tried adding a timestamp to the url to prevent caching, but the variable didn't expand:

  urls: ["http://aotapps/speedtest/bluemarble.jpg%{+yyyy.MM.ddThh:mm:ss}"]

> monitor.url: "http://path/to/bluemarble.jpg?t=%{+yyyy.MM.ddThh:mm:ss}"

I suspect that it's only reading the first TCP frame and/or using a cached response for the content.

I'm not even sure if I'm on the right track - has anyone done this or suggest how it might be possible? Ideally I'd like to use [fixed file size] / as my speed metric.

(Andrew Cholakian) #2

Hey, thanks for writing.

So, the good news is this should work. The bad news is that there's a bug preventing it from working. The bug, which you found, is that we prematurely close large bodies before finishing reading them. fixed it. It's set to be released in 6.5.0 . There's always a small chance that any feature could be pulled before release, but that is not very likely in this case.

(Andrew Cholakian) #3

we also have 6.x package builds here:

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.