MTR Check to Monitor Packet Loss

Packet loss and routing issues can impact any provider. Our newest check type, MTR, can help you detect and pinpoint the root of the problem. Faster detection and troubleshooting means less downtime for your websites and services.

The MTR command line tool has been around since 1997. Ask any graybeard sysadmin, they’re sure to be familiar with it. It’s great for revealing the presence of packet loss on a host and where along the route that packet loss starts.

Since routing is different for IPv6 than IPv4, you’ll want to create 2 MTR checks per host – one for your IPv4 address and another for the IPv6 address. You can either force IPv6 DNS resolution on your FQDN or use the IPv6 address itself as the check target.

MTR results from our probes is only half the story though. To get the full picture, you may need to run an MTR from your server. Use NodePing AGENT software to run MTR, PING, and nearly all our other check types from your server. It’s like having your own private NodePing probes. Results are quickly pushed to NodePing for processing and notifications.

No other network tool is more widely used among sysadmins for troubleshooting connectivity issues than MTR. Now you can automate it on both sides of the network using NodePing’s new MTR check.

If you don’t yet have a NodePing account, please sign up for our free, 15-day trial. Your graybeards will thank you.

Redis Monitoring

Redis is a very popular key/value store used by many web applications for sessions, caching, or as a main datastore. Its lightning fast, in-memory model has three versatile modes: standalone, sentinel, and cluster.

  • Redis standalone instance runs on a single host and provides quick access to data.
  • Redis sentinel mode will provide automated failover to a secondary host should the primary be unavailable to the sentinels.
  • Redis cluster instance shards your data so even the largest datasets can be accessed with the near instantaneous response Redis is famous for.

NodePing’s Redis check can monitor availability of all three instance types. You’ll be the first to know if your Redis hosts or sentinels are offline.

The check connects to your Redis instance, runs an INFO command, and waits for a valid response. If our probe can’t connect, gets an authentication error, or receives no response, we’ll verify the outage and send notifications. The faster you know, the faster the fix, the more uptime.

Redis is often used as a mission-critical datastore. Don’t let a Redis outage go unnoticed. Use NodePing’s Redis monitoring.

If you don’t have a NodePing account yet, sign up for our free, 15-day trial and see for yourself why those who know use NodePing.

Using NodePing’s API with Python

Over the years, NodePing has offered an API to manage most aspects of your monitoring. Today, we are introducing our new Python 2/3 library to interface with this API. Instead of reinventing the wheel in your code to interact with our API, drop this library into your project and with a few lines you can easily manage your checks and various other aspects of your account. With the Python library at your disposal, you can:

  • List, create, update, and delete checks
  • Manage contacts
  • Manage contact groups
  • Manage schedules
  • Get check results and uptime
  • Get notification information
  • Get probe information

This means that the Python library has feature parity with our API. You can get the code from our GitHub repository or install it from Pypi via pip. There is also some documentation written to help you by providing snippets of what your code might look like when querying the API with Python.

In this post, we will share a brief introduction to getting started with using the Python library and how it can be used to manage your account. You can use your installer of choice, but in this introduction I will use pip to install the library:


pip install nodeping-api

 

You may have to specify Python2 or 3 for your pip version, depending on your system. To start using the library, you will need to provide your API token as a variable, and an optional subaccount ID to start managing your checks.

 

From here, you can do things such as list failing checks:


#!/usr/bin/env python
# -*- coding: utf-8 -*-

""" Demo for Python library
"""

from pprint import pprint
from nodeping_api import get_checks

def main():
    """ Main function
    """

    token = 'my-secret-token'

    query = get_checks.GetChecks(token)
    checks = query.failing_checks()

    pprint(checks)

if __name__ == '__main__':
    main()

 

This example will collect all your failing checks and return them to be used in a dictionary format. The output might look something like this:

{'2019052211307H0IX-KCGJCX1X': {'_id': '2019052211307H0IX-KCGJCX1X',
    'created': 1563471438952,
    'customer_id': '2019052211307H0IX',
    'dep': False,
    'enable': 'active',
    'firstdown': 1563471472497,
    'homeloc': False,
    'interval': 3,
    'label': 'Test Check',
    'modified': 1563471438952,
    'notifications': [],
    'parameters': {'follow': False,
        'ipv6': False,
        'sens': 2,
        'target': 'https://notreal.nodeping.com/',
        'threshold': 5},
    'public': False,
    'queue': 'utcoCpoUJx',
    'runlocations': False,
    'state': 0,
    'status': 'assigned',
    'type': 'HTTP',
    'uuid': 've8s9sgj-j588-4li3-9ytp-1kho9wtutriy'}}

 

You can also create checks. For example, here is a basic idea of creating an HTTP check:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

""" Demo for Python library
"""

from pprint import pprint
from nodeping_api import create_check

def main():
    """ Main function
    """

    token = 'my-secret-token'

    target = 'https://nodeping.com'
    enabled = True
    public = False
    interval = 1
    runlocations = 'nam'

    created = create_check.http_check(
        token,
        target,
        label="Check NodePing",
        enabled=enabled,
        public=public,
        interval=interval,
        runlocations=runlocations
    )

    pprint(created)

if __name__ == '__main__':
    main()

 

Along with the output when the check is created. Note that it is in a dictionary format, but pretty printed so it’s easier to read here:

{'_id': '2019052211307H0IX-WEOR7GAH',
 'change': 1563474539024,
 'created': 1563474539024,
 'customer_id': '2019052211307H0IX',
 'dep': False,
 'enable': 'active',
 'homeloc': False,
 'interval': 1,
 'label': 'Check NodePing',
 'modified': 1563474539024,
 'parameters': {'follow': False,
                'ipv6': False,
                'sens': 2,
                'target': 'https://nodeping.com/',
                'threshold': 5},
 'runlocations': ['nam'],
 'public': False,
 'status': 'modified',
 'type': 'HTTP',
 'uuid': '1fog8q51-zdhv-4vmb-832r-tsun0o9unt3f'}

 

You can also get your uptime from a certain time interval. In this example, you can find what your uptime is since July, 2019

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from nodeping_api import results
from pprint import pprint


def main():
    """
    """

    token = 'my-secret-token'
    check_id = 'my-check-id'

    # Get uptime since July, 2019
    uptime_results = results.get_uptime(token, check_id, start="2019-07")

    pprint(uptime_results)


if __name__ == '__main__':
    main()

 

This will give you an output that looks something like this:
{'2019-07': {'down': 2154131, 'enabled': 2678400000, 'uptime': 99.92},
'2019-08': {'down': 88733, 'enabled': 753256766, 'uptime': 99.988},
'total': {'down': 2242864, 'enabled': 3431656766, 'uptime': 99.935}}

This is only a snippet of what the library can do, and the documentation is detailed to get you started on your journey. Give it a try and see how you can improve your uptime monitoring in your Python projects. This code is free and available to download. We encourage pull requests for new features so if you make changes or have requests, feel free to share.

If you aren’t using NodePing yet, you can sign up for a free, 15-day trial and test out monitoring your services today and take advantage of our API in your own Python projects.

PUSH Client Wizard

Last year, we introduced a new feature called PUSH Checks. This check type allows your server to push numeric metrics into our system, track the metrics, send a heartbeat, and receive alerts based on the results. This is a powerful tool, and we use it internally at NodePing to monitor system load, backup processes, gather metrics from logs, and a variety of other things. We’re also glad to hear about customers using this feature in interesting ways as well.

However, until now setting up a PUSH check could be challenging. You would have to create the check, download a copy of the client and configure it with the Check ID and Checktoken as well as configure the metrics. So today we’re releasing a PUSH Client Wizard (available on GitHub) that makes PUSH Checks really easy to configure and deploy across your systems using an interactive command line wizard. This Python 3 client is able to run on any system with Python 3.5 or newer, and has been tested on Linux, Windows 10, and FreeBSD.

Features

So what can it do? The wizard lets you list your existing PUSH checks, create new PUSH checks, and delete PUSH checks you no longer want.

When listing checks, it will show information such as:

  • Your check’s label
  • ID
  • Checktoken
  • If the check will fail when its results are old
  • PASS/FAIL status
  • If it’s enabled/disabled
  • Run Interval

When creating a check you can configure all sorts of information for the check such as:

  • The client you will use (POSIX, Python, Python3, PowerShell)
  • Information about the check (Label, interval, enabled, public reports, fail when old)
  • Metrics to gather for the check (or none for basic heartbeat functionality) and values for pass/fail
  • Contacts and their notification schedules
  • Client configuration
  • Remote/local deployment

Configuring the client is an optional step if you want to do it yourself. When configuring the client, you have the ability to deploy the new PUSH check client locally or remotely over SSH! Once the client has been configured, a cron job or Windows Task Scheduler event information will be provided so you can simply copy/paste the provided information at the end.

This tool will allow you to quickly and easily manage your PUSH checks so you can monitor your systems with PUSH checks in less time.

Give the wizard a try today!

We encourage pull requests for new features so if you make changes you think others would find useful, please do share.

If you aren’t using NodePing yet, you can sign up for a free, 15-day trial and test out our new PUSH checks yourself and give the new wizard a try.

WHMCS Module Update

Fresh update for our WHMCS module.  Changes include:

Use our WHMCS module to add NodePing uptime monitoring to your hosting/server offerings.

Get the new module file here.