Documentation

HTTP Parse Checks

About HTTP Parse Checks

The HTTP Parse check allows you to monitor, track, and graph arbitrary values provided by a web server. It is commonly used for monitoring and tracking internal server metrics like server load, CPU utilization, available RAM, and disk space.

The check makes an HTTP GET call to a URL you specify and parses the JSON or text returned. It looks for fields you specify and then compares each value for those fields to an acceptable range you set for each. The check will PASS if the HTTP check returns a status code greater than 200 and less than 399 and all fields are present and within the ranges you specified.

The HTTP Parse check can be easily used in conjunction with the following system information utilities that are freely available:

You can, of course, have the check parse any URL, including your custom code. The check will parse plain text or JSON formatted responses. If the format is plain text, it should be in the format name:value. For example:

  • cpu:90
  • views:12093
  • ramavailble: 1.6

White space around the value will be ignored.

If the response is in JSON format deep linking is available using a flattened path. For example, in this JSON:

{ 
    "mount": [ 
        { "filesystem": "/dev/sda1", "free": "99" },  
        { "filesystem": "/dev/sda2", "free": "99" }
    ]
}

We can monitor the free space on these devices with two paths: mount.0.free and mount.1.free

When to use HTTP Parse Checks

NodePing's HTTP Parse checks are commonly used to track things like CPU usage, load averages, disk space, and available RAM. It's an excellent way to track the inner workings of your server and its processes but the check is also so flexible, you can use it to literally track anything on your server. Want to track how many emails you're sending each hour? Or maybe monitor how many users are logged in?

Using HTTP Parse Checks

To set up an HTTP Parse check,

  1. Select HTTP Parse from the Check type drop down.
  2. Give it a friendly label to identify this check in lists and notifications.
  3. Enable Automated Diagnostics if you'd like detailed technical info about the failure that may help you troubleshoot a failure.
  4. Set how often you want the check to run on the Check Frequency field - as frequent as once every minute.
  5. Set the URL of the HTTP GET call. The content returned from that URL should be either valid JSON or contain name:value pairs in the format mentioned above.
  6. Optionally set any headers you'd like to send with your HTTP request in the Request Headers fields. Example: 'User-Agent' in the Header field and 'Chrome' in the Value field. Add as many headers as you need by clicking on the 'add another header' link. More header fields will appear.
  7. Enter the name of the data you want to parse in the Name field (examples: load, cpu, RAM.free) and set Min and Max values as integers or floats (examples: -1, 0, 234985, 1.653)
  8. Add more fields to track by clicking the Add another field link.
  9. Set a time out. The default 5 seconds works fine for most situations.
  10. Set the Sensitivity. High is usually appropriate.
  11. Set the notifications for this check. More information about notifications.

Common usage:
To monitor numeric values of any type available on your server.

Other considerations

IPv6 URLs require the bracket formatting such as http://[2606:c700:4020:11::53:4a3b]/

SSL/TLS certs are not validated by this check so it will work fine for expired and self-signed certs. You'll want to add an SSL check to verify your SSL certs and get warnings before they expire.

SSLv3/TLS1.0 are not supported.

If you have any questions, get in touch at support@nodeping.com, or use our Contact form.