### Install ripe-atlas-tools from a Tarball Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs the ripe-atlas-tools package manually by un-tarring the source code and running the setup script. This method is useful for offline installations or custom builds. ```bash python setup.py install ``` -------------------------------- ### Install RIPE Atlas Tools on Void Linux Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/PACKAGING.md Instructions for installing the RIPE Atlas Tools on Void Linux using the XBPS package manager. ```bash xbps-install ripe-atlas-tools ``` -------------------------------- ### View Ripe Atlas Help Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/quickstart.rst Displays the help information for the ripe-atlas command-line tool, outlining available subcommands and options. ```bash ripe-atlas --help ``` -------------------------------- ### View Ripe Atlas Measurement Creation Help Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/quickstart.rst Displays detailed help information specific to the creation of RIPE Atlas measurements. ```bash ripe-atlas measure --help ``` -------------------------------- ### Install RIPE Atlas Tools on Gentoo Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/PACKAGING.md Instructions for installing the RIPE Atlas Tools on Gentoo Linux using the Portage package manager. ```bash emerge ripe-atlas-tools ``` -------------------------------- ### Install ripe-atlas-tools from GitHub using pip Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs the ripe-atlas-tools package directly from its GitHub repository using pip. This allows for installing the latest development version. ```bash pip install git+https://github.com/RIPE-NCC/ripe-atlas-tools.git ``` -------------------------------- ### Create Ripe Atlas Measurement Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/quickstart.rst Initiates the creation of a new RIPE Atlas measurement, specifying the type (e.g., ping) and target. ```bash ripe-atlas measure ping --target example.com ``` -------------------------------- ### Install Debian/Ubuntu System Packages Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs essential system packages for Debian-based distributions like Jessie, including development headers for Python, FFI, and SSL. ```bash sudo apt-get install python-dev libffi-dev libssl-dev ``` -------------------------------- ### Install RIPE Atlas Tools on FreeBSD Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs the RIPE Atlas Tools from the FreeBSD ports collection. ```bash cd /usr/ports/net/py-ripe.atlas.tools make install ``` -------------------------------- ### Install ripe-atlas-tools from PyPI using pip Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs the ripe-atlas-tools package using Python's package installer, pip. It can be installed globally, per-user, or within a virtual environment. ```bash # From within a virtualenv pip install ripe.atlas.tools # In your user's local environment pip install --user ripe.atlas.tools ``` -------------------------------- ### Install RIPE Atlas Tools on Gentoo Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs the RIPE Atlas Tools using Gentoo's Portage package manager. ```bash sudo emerge ripe-atlas-tools ``` -------------------------------- ### Create a basic ping measurement Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This example shows the simplest way to create a ping measurement to a target domain, specifying the number of probes. ```bash $ ripe-atlas measure ping --target example.com ``` -------------------------------- ### View Ripe Atlas Measurement Stream Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/quickstart.rst Fetches and displays the live data stream for a given RIPE Atlas measurement ID. ```bash ripe-atlas stream ``` -------------------------------- ### Install RIPE Atlas Tools on OpenBSD Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs the RIPE Atlas Tools package directly from the OpenBSD package repository. ```bash sudo pkg_add ripe.atlas.tools ``` -------------------------------- ### Perform a basic DNS lookup Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This example demonstrates a simple DNS lookup measurement. When --target is omitted, the probe's default resolver is used. ```bash $ ripe-atlas measure dns --query-argument example.com ``` -------------------------------- ### Install Pip on macOS Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs pip, Python's package manager, on macOS using the easy_install script. Requires Xcode to be installed. ```bash sudo easy_install pip ``` -------------------------------- ### Install CentOS System Libraries Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs necessary system libraries on CentOS, including a C compiler, libffi development files, and OpenSSL development files. ```bash sudo yum install gcc libffi-devel openssl-devel ``` -------------------------------- ### Install CentOS EPEL Repository Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs the EPEL (Extra Packages for Enterprise Linux) repository, which is required to install pip and virtualenv on CentOS. ```bash sudo yum install epel-release ``` -------------------------------- ### Install ripe-atlas-tools from GitHub in editable mode Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs the ripe-atlas-tools package from a GitHub repository in editable mode using pip. This is recommended for development, allowing changes to be seen without reinstallation. ```bash pip install -e git+https://github.com/your-username/ripe-atlas-tools.git ``` -------------------------------- ### Install Debian/Ubuntu Virtualenv and Pip Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs virtualenv (recommended) and pip for managing Python packages on Debian-based systems. ```bash sudo apt-get install python-virtualenv python-pip ``` -------------------------------- ### Install CentOS Virtualenv and Pip Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Installs virtualenv (recommended) and pip for managing Python packages on CentOS. ```bash sudo yum install python-virtualenv python-pip ``` -------------------------------- ### Search Ripe Atlas Measurements Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/quickstart.rst Searches for RIPE Atlas measurements containing a specified keyword in their descriptions or names. ```bash ripe-atlas measurement-search --search wikipedia ``` -------------------------------- ### Create a recurring ping measurement Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This example shows how to set up a ping measurement that repeats at a specified interval, using the --interval option. ```bash $ ripe-atlas measure ping --target example.com --interval 3600 ``` -------------------------------- ### Generate Measurement Report from Start Time Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Generates a report for a measurement ID, including results from a specified start time up to the current time. This is helpful for tracking progress since a particular event. ```bash $ ripe-atlas report 1001 --start-time 2015-01-01 ``` -------------------------------- ### libyaml compilation error during pyyaml installation Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/troubleshooting.rst Shows a compilation error during the installation of pyyaml when libyaml is not found or has compiler errors. The installation script falls back to using a --without-libyaml option, which is sufficient for configuration purposes. ```shell Running setup.py install for pyyaml checking if libyaml is compilable x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory #include ^ compilation terminated. libyaml is not found or a compiler error: forcing --without-libyaml (if libyaml is installed correctly, you may need to specify the option --include-dirs or uncomment and modify the parameter include_dirs in setup.cfg) ``` -------------------------------- ### View Ripe Atlas Measurement Report Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/quickstart.rst Retrieves and displays a basic report for a specified public RIPE Atlas measurement ID. ```bash ripe-atlas report ``` -------------------------------- ### Search Ripe Atlas Probes by ASN Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/quickstart.rst Finds and lists RIPE Atlas probes associated with a specific Autonomous System Number (ASN). ```bash ripe-atlas probe-search --asn 3333 ``` -------------------------------- ### Advanced DNS query with specific bits set Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This example shows a more complex DNS measurement, specifying query type, argument, and setting several DNS flags like NSID, RD, DO, and CD. ```bash $ ripe-atlas measure dns --query-type AAAA --query-argument example.com \ --set-nsid-bit --set-rd-bit --set-do-bit --set-cd-bit ``` -------------------------------- ### Shell alias for ripe-atlas ping Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Shows an example of creating a shell alias for the ripe-atlas ping command to streamline typing. This is an alternative to typing the full command. ```bash $ aping --target example.com ``` -------------------------------- ### Initiate Ping Measurement Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/README.rst Starts a ping measurement to a specified IP address or hostname from a given number of RIPE Atlas probes. ```bash ripe-atlas measure ping ping.ripe.net --probes 5 ``` -------------------------------- ### Filter probes by tag for ping measurement Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This example demonstrates how to refine probe selection by including specific tags, such as 'system-ipv6-works', in the measurement request. ```bash $ ripe-atlas measure ping --target example.com --probes 20 \ --from-country ca --include-tag system-ipv6-works ``` -------------------------------- ### Search DNS Measurements Since a Date Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Filters measurements of type 'dns' that started after January 1, 2015. ```bash $ ripe-atlas measurement-search --type dns --started-after 2015-01-01 ``` -------------------------------- ### Search Measurements and Get Only IDs Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Retrieves a list of ongoing IPv6 measurements and outputs only their IDs. ```bash $ ripe-atlas measurement-search --status ongoing --af 6 --ids-only ``` -------------------------------- ### Set RIPE Atlas Tools User Agent Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/packaging.rst Manually sets the user agent for RIPE Atlas Tools by writing a string to a file. This helps track which distributions are using the software. The file should contain a single line with a maximum of 128 characters. If not provided, a platform-specific agent is generated. ```shell echo "RIPE Atlas Tools [FreeBSD 10.2] 1.2" > /ripe/atlas/tools/user-agent ``` -------------------------------- ### Create ping measurement from specific country with probe count Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This example shows how to request a specific number of probes from a particular country using --probes and --from-country. ```bash $ ripe-atlas measure ping --target example.com --probes 20 --from-country ca ``` -------------------------------- ### Configure Gentoo Git for Curl Support Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/installation.rst Ensures that the git package on Gentoo is built with curl support, which may be necessary for using the bleeding-edge version of the RIPE Atlas Tools. ```bash sudo USE="curl" emerge git ``` -------------------------------- ### Specify IP address family for ping Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This example illustrates how to specify the IP address family (IPv4 or IPv6) for a ping measurement using the --af option. ```bash $ ripe-atlas measure ping --target example.com --af 6 ``` -------------------------------- ### InsecurePlatformWarning in Python Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/troubleshooting.rst Displays an InsecurePlatformWarning on older Python versions (<2.7.10) due to SSL handling. It suggests upgrading Python, installing specific packages (pyopenssl, ndg-httpsclient, pyasn1), or disabling warnings (not recommended). ```text /path/to/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:100: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning ``` -------------------------------- ### Generate Measurement Report for a Specific Time Range Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Generates a report for a measurement ID, including results only from a specified start and end time. This is useful for analyzing performance during particular periods. ```bash $ ripe-atlas report 1001 --start-time 2015-01-01 --stop-time 2015-01-07 ``` -------------------------------- ### RIPE Atlas CLI: Running a Custom Renderer Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/plugins.rst Shows how to use the RIPE Atlas command-line interface to execute a measurement and apply a custom renderer. This demonstrates the integration of the Python renderer with the CLI tool. ```bash $ ripe-atlas report --help ``` ```bash $ ripe-atlas report 1000192 --renderer my_renderer Packets received: 3 Packets received: 3 Packets received: 3 Packets received: 3 Packets received: 3 Packets received: 3 Total packets received: 18 ``` -------------------------------- ### Create Renderer Directory and Files Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/plugins.rst This bash snippet demonstrates how to create the necessary directory structure and placeholder files for a new Python renderer plugin. It ensures the renderers directory exists and creates an '__init__.py' file for Python package recognition and a 'my_renderer.py' file for the custom renderer. ```bash mkdir -p ${HOME}/.config/ripe-atlas-tools/renderers touch ${HOME}/.config/ripe-atlas-tools/renderers/__init__.py touch ${HOME}/.config/ripe-atlas-tools/renderers/my_renderer.py ``` -------------------------------- ### Measurement Creation Options Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Lists and explains the common options available when creating a RIPE Atlas measurement. These options control renderers, authentication, target, probe selection, and more. ```bash --renderer ``` ```bash --dry-run ``` ```bash --auth ``` ```bash --af <4|6> ``` ```bash --description "" ``` ```bash --target "" ``` ```bash --no-report ``` ```bash --go-web ``` ```bash --resolve-on-probe ``` ```bash --interval ``` ```bash --from-area ``` ```bash --from-country "" ``` ```bash --from-prefix "" ``` ```bash --from-asn ``` ```bash --from-probes "" ``` ```bash --from-measurement "" ``` -------------------------------- ### Configure RIPE Atlas Toolkit Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Initialize and configure the RIPE Atlas Toolkit. This involves creating a configuration file and optionally setting specific configuration values or invoking an editor to manually adjust settings. ```bash $ ripe-atlas configure --help ``` ```bash $ ripe-atlas configure --init ``` ```bash $ ripe-atlas configure --editor ``` ```bash $ ripe-atlas configure --set authorisation.create=YOUR_API_KEY ``` -------------------------------- ### View Measurement Details with RIPE Atlas Toolkit Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Use the 'go' command to quickly access the detail page of a specific RIPE Atlas measurement by providing its ID. This opens the measurement's page in a web browser. ```bash $ ripe-atlas go ``` -------------------------------- ### Clone ripe-atlas-tools Repository Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/CONTRIBUTING.rst This command clones the ripe-atlas-tools repository from GitHub to your local machine. Ensure you replace 'your-username' with your actual GitHub username. ```bash git clone git@github.com:your-username/ripe-atlas-tools.git ``` -------------------------------- ### Stream Measurement Results Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Demonstrates how to stream results from a RIPE Atlas measurement. It shows basic streaming, limiting results, specifying a renderer, and combining options. ```bash $ ripe-atlas stream 1001 ``` ```bash $ ripe-atlas stream 1001 --limit 500 ``` ```bash $ ripe-atlas stream 1001 --renderer ping ``` ```bash $ ripe-atlas stream 1001 --renderer ping --limit 500 ``` -------------------------------- ### Create Measurement Command Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Illustrates the invocation of the `ripe-atlas` command to create a measurement. This command allows for extensive configuration based on measurement type and various options. ```bash ripe-atlas create ``` -------------------------------- ### Process Results from Standard Input Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Pipes the content of an arbitrary file containing measurement results into the ripe-atlas report command. The rendering engine is automatically guessed from the first line of input. ```bash $ cat /path/to/file/full/of/results | ripe-atlas report ``` -------------------------------- ### Shortcut for traceroute measurement Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This demonstrates the use of a shortcut command 'atraceroute' as an alias for 'ripe-atlas measure traceroute'. ```bash atraceroute ``` -------------------------------- ### Shortcut for ping measurement Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This demonstrates the use of a shortcut command 'aping' as an alias for 'ripe-atlas measure ping'. ```bash aping ``` -------------------------------- ### Simulate creating a ping measurement without execution Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst This command demonstrates how to use the --dry-run flag to preview the actions of creating a ping measurement without actually executing it. ```bash $ ripe-atlas measure ping --target example.com --dry-run ``` -------------------------------- ### Process Results from a File Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Specifies a file path directly to the ripe-atlas report command to render results. This method is an alternative to piping input and requires the `--from-file` option. ```bash $ ripe-atlas report --from-file /path/to/file/full/of/results ``` -------------------------------- ### Run Tests with Tox or Nosetests Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/CONTRIBUTING.rst These commands are used to run the project's tests. 'tox' is a general-purpose tool for automating testing in Python, while 'nosetests' is a test runner. It's recommended to ensure tests pass before making changes. ```bash tox ``` ```bash nosetests tests/ ``` -------------------------------- ### Basic Renderer Implementation in Python Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/plugins.rst This Python snippet shows the fundamental structure of a RIPE Atlas custom renderer. It defines a 'Renderer' class that inherits from 'BaseRenderer', specifies the type of results it can handle (PING in this case), and implements the 'on_result()' method to process individual result objects and return a string. ```python from ripe.atlas.tools.renderers.base import Renderer as BaseRenderer class Renderer(BaseRenderer): # This renderer is capable of handling ping results only. RENDERS = [BaseRenderer.TYPE_PING] def on_result(self, result): """ on_result() only gets one argument, a result object, which is actually an instance of a RIPE Atlas result parsed with Sagan: https://ripe-atlas-sagan.readthedocs.org/ """ return "Packets received: {}".format(result.packets_received) ``` -------------------------------- ### Search Measurements (Basic) Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Retrieves a list of measurements. No specific filters are applied. ```bash $ ripe-atlas measurement-search ``` -------------------------------- ### Stream Measurement Results in Real-time Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Connects to the RIPE Atlas streaming API to render measurement results in real-time as they are generated. This is useful for continuous monitoring and analysis. ```bash ripe-atlas stream ``` -------------------------------- ### Search Measurements with Limit Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Retrieves a list of ongoing IPv6 measurements, limited to 200 entries. ```bash $ ripe-atlas measurement-search --status ongoing --af 6 --limit 200 ``` -------------------------------- ### Measurement Creation API Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Create and configure RIPE Atlas measurements with various options, including target, renderers, and probe selection criteria. ```APIDOC ## POST /api/v2/measurements ### Description Creates a RIPE Atlas measurement with specified parameters and streams results. ### Method POST ### Endpoint /api/v2/measurements ### Parameters #### Query Parameters - **--renderer** (string) - Optional - The renderer to use for the measurement results (e.g., dns, http, ping). If not specified, an appropriate renderer is selected. - **--dry-run** (boolean) - Optional - If set, only shows the measurement definition without creating it. - **--auth** (string) - Optional - The API key for authentication. - **--af** (integer) - Optional - The address family (4 or 6). Defaults to guessing based on the target, favoring 6. - **--description** (string) - Optional - A descriptive name for the measurement. - **--target** (string) - Optional - The target domain or IP address. If omitted for DNS measurements, the probe's resolver is used. - **--no-report** (boolean) - Optional - If set, does not wait for a response and returns the measurement URL. - **--go-web** (boolean) - Optional - If set, immediately opens the measurement URL in the default web browser. - **--resolve-on-probe** (boolean) - Optional - If set, resolves names on the probe; otherwise, resolves on RIPE Atlas servers. - **--interval** (integer) - Optional - Sets the measurement to run at a specified interval in seconds. Implies `--no-report`. - **--from-area** (string) - Optional - Selects probes from a specified geographical area (e.g., WW, West). - **--from-country** (string) - Optional - Selects probes from a specified two-letter ISO country code. - **--from-prefix** (string) - Optional - Selects probes from a specified prefix string. - **--from-asn** (integer) - Optional - Selects probes from a specified ASN number. - **--from-probes** (string) - Optional - Selects probes using a comma-separated list of probe IDs. - **--from-measurement** (integer) - Optional - Selects probes based on a specified measurement ID. ### Request Example ```json { "type": "ping", "targets": [ "example.com" ], "description": "My Ping Measurement", "resolve_on_probe": true, "interval": 3600, "group_id": 1234, " aunts": [1, 2, 3] } ``` ### Response #### Success Response (201 Created) - **id** (integer) - The ID of the created measurement. - **url** (string) - The URL to access the measurement results. #### Response Example ```json { "id": 987654, "url": "https://atlas.ripe.net/measurements/987654/" } ``` ``` -------------------------------- ### Stream Measurement Results with Specific Renderer Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Streams measurement results in real-time using a specified renderer. This enables tailored analysis of live data streams based on measurement type. ```bash $ ripe-atlas stream --renderer ping ``` -------------------------------- ### Python Renderer Class for RIPE Atlas Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/plugins.rst Defines a custom Python renderer class that extends the base RIPE Atlas renderer. It customizes the rendering process by tracking packet totals and providing additional summary information. ```python from ripe.atlas.tools.renderers.base import Renderer as BaseRenderer class Renderer(BaseRenderer): RENDERS = [BaseRenderer.TYPE_PING] def __init__(self, *args, **kwargs): self.packet_total = 0 BaseRenderer.__init__(self, *args, **kwargs) def on_result(self, result): self.packet_total += result.packets_received return "Packets received: {} ".format(result.packets_received) def additional(self, results): return "\nTotal packets received: {} ".format(self.packet_total) ``` -------------------------------- ### Search Measurements with Specific Fields Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Retrieves a list of ongoing IPv6 measurements and displays only the 'id', 'url', and 'target' fields. ```bash $ ripe-atlas measurement-search --status ongoing --af 6 \ --field id --field url --field target ``` -------------------------------- ### ripe-atlas measure http command Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Executes an HTTP measurement using the ripe-atlas tool. It is aliased to 'ahttp'. ```bash ripe-atlas measure http ``` -------------------------------- ### ripe-atlas measure sslcert command Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Executes an SSL certificate measurement using the ripe-atlas tool. It is aliased to 'asslcert'. ```bash ripe-atlas measure sslcert ``` -------------------------------- ### ripe-atlas measure dns command Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Executes a DNS measurement using the ripe-atlas tool. It is aliased to 'adig'. ```bash ripe-atlas measure dns ``` -------------------------------- ### Configure RIPE Atlas API Key Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/README.rst Sets the API key for creating measurements within RIPE Atlas. This command requires the API key as an argument. ```bash ripe-atlas configure --set authorisation.create=MY_API_KEY ``` -------------------------------- ### ripe-atlas measure ntp command Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Executes an NTP measurement using the ripe-atlas tool. It is aliased to 'antp'. ```bash ripe-atlas measure ntp ``` -------------------------------- ### Aggregate Probes by Country and ASN Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Aggregates probes first by country, and then by ASN. This command showcases the `--aggregate-by` option. ```bash $ ripe-atlas probe-search --aggregate-by country --aggregate-by asn_v4 ``` -------------------------------- ### Generate Measurement Report with Specific Renderer Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Generates a report for a specific measurement ID using a designated renderer, such as 'ping'. This allows for customized data visualization and analysis based on the measurement type. ```bash $ ripe-atlas report 1001 --renderer ping ``` -------------------------------- ### Search Probes and Specify Fields Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Searches for probes within a specific ASN and retrieves detailed fields such as ID, URL, target, description, and public status. This allows for targeted data extraction about probes. ```bash $ ripe-atlas probe-search --asn 3333 --field id --field url --field description \ --field is_public ``` -------------------------------- ### Search Probes by ASN Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Retrieves a list of probes located within ASN 3333. ```bash $ ripe-atlas probe-search --asn 3333 ``` -------------------------------- ### Search Probes with Custom Limit Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Retrieves a list of probes within ASN 3333, changing the default limit from 25 to 200. ```bash $ ripe-atlas probe-search --asn 3333 --limit 200 ``` -------------------------------- ### Search NTP Measurements and Process with awk Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/README.rst Searches for NTP measurements, formats the output as tab-separated values without a header, and pipes the results to 'awk' for further processing to extract measurement ID and source. ```bash ripe-atlas measurement-search --type ntp --format tab --no-header --limit 5 \ | awk -Ft '{printf "#%s (%s)\n", $1, $3}' ``` -------------------------------- ### RIPE Atlas Tools DNS Query Output Structure Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/ripe/atlas/tools/renderers/templates/reports/dns.txt This snippet outlines the standard output format of RIPE Atlas Tools, which includes header information, query details, answer sections, and timing statistics. It's crucial for parsing and understanding network probe results. ```text ;; <<>> RIPE Atlas Tools <<>> {question_name} ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: {header_opcode}, status: {header_return_code}, id: {header_id} ;; flags: {header_flags}; QUERY: 1, ANSWER: {answer_count}, AUTHORITY: {authority_count}, ADDITIONAL: {additional_count} {edns}{question}{answers}{authorities}{additionals} ;; Query time: {response_time} msec ;; SERVER: {destination_address}#53({destination_address}) ;; WHEN: {created} ;; MSG SIZE rcvd: {response_size} ``` -------------------------------- ### Query RIPE Atlas Measurements Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Query the RIPE Atlas database for measurements using various filters. Options include searching by string, status, address family, type, date ranges, and specifying which fields to display. Results can be limited and IDs can be retrieved exclusively. ```bash $ ripe-atlas measurements --search "example.com" --type ping --status ongoing --limit 10 ``` ```bash $ ripe-atlas measurements --af 4 --field id --field target ``` ```bash $ ripe-atlas measurements --started-before "2023-01-01T00:00:00" ``` ```bash $ ripe-atlas measurements --ids-only ``` -------------------------------- ### Search Probes by ASN and Aggregate Results Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Searches for probes belonging to a specific ASN (Autonomous System Number) and aggregates the results by country and IPv4 address. This helps in understanding probe distribution and network characteristics. ```bash $ ripe-atlas probe-search --asn 3333 --aggregate-by country --aggregate-by asn_v4 ``` -------------------------------- ### Generate Measurement Report Aggregated by Country Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Generates a report for a measurement ID and aggregates the results by country. This provides an overview of measurement performance across different geographical locations. ```bash $ ripe-atlas report 1001 --aggregate-by country ``` -------------------------------- ### Stream Limited Number of Measurement Results Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Streams a maximum specified number of results from the RIPE Atlas streaming API. This allows for controlled consumption of real-time data. ```bash $ ripe-atlas stream --limit 1000 ``` -------------------------------- ### Search IPv6 Measurements Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Filters measurements to include only IPv6 compliant ones with an 'ongoing' status. ```bash $ ripe-atlas measurement-search --status ongoing --af 6 ``` -------------------------------- ### Search Probes by ASN and Country Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Filters probes within ASN 3333 to show only those located in the Netherlands ('nl'). ```bash $ ripe-atlas probe-search --asn 3333 --country nl ``` -------------------------------- ### Generate Latest Measurement Report Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Generates a human-readable text report of the latest results for a given measurement ID. This is useful for quick checks of recent measurement outcomes. ```bash $ ripe-atlas report 1001 ``` -------------------------------- ### Search for Probes by Country and Aggregate by ASN Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/README.rst Searches for RIPE Atlas probes located in a specific country and groups the results by their Autonomous System Number (ASN). ```bash ripe-atlas probe-search --country de --aggregate-by asn_v4 --limit 10 ``` -------------------------------- ### Search Measurements by Status Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Filters measurements to include only those with the status 'ongoing'. ```bash $ ripe-atlas measurement-search --status ongoing ``` -------------------------------- ### Stream Measurement Results API Source: https://github.com/ripe-ncc/ripe-atlas-tools/blob/master/docs/use.rst Stream results from a specific RIPE Atlas measurement, with options to limit the number of results and specify a renderer. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/stream ### Description Streams results from a given measurement ID. You can optionally limit the number of results and specify a renderer. ### Method GET ### Endpoint /api/v2/measurements/{measurement_id}/stream ### Parameters #### Path Parameters - **measurement_id** (integer) - Required - The ID of the measurement to stream results from. #### Query Parameters - **--limit** (integer) - Optional - The maximum number of results to stream. - **--renderer** (string) - Optional - The renderer to use for the streamed results (e.g., ping, raw). ### Request Example ```bash ripe-atlas stream 1001 --limit 500 --renderer ping ``` ### Response #### Success Response (200 OK) - **(streamed data)** - The measurement results in the format specified by the renderer. #### Response Example (Output will vary based on renderer and measurement type. Example for ping): ``` { "time": 1678886400, "time_str": "2023-03-15T12:00:00Z", "result": [ { "rtt": 25.5, "ttl": 58, "from": "192.168.1.1", "size": 64 } ] } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.