Skip to main content

NS1 provider for octoDNS

An octoDNS provider that targets NS1.

Installation

Command line

pip install octodns-ns1

requirements.txt/setup.py

Pinning specific versions or SHAs is recommended to avoid unplanned upgrades.

Versions
# Start with the latest versions and don't just copy what's here
octodns==0.9.14
octodns-ns1==0.0.1
SHAs
# Start with the latest/specific versions and don't just copy what's here
-e git+https://git@github.com/octodns/octodns.git@9da19749e28f68407a1c246dfdf65663cdc1c422#egg=octodns
-e git+https://git@github.com/octodns/octodns-ns1.git@ec9661f8b335241ae4746eea467a8509205e6a30#egg=octodns_ns1

Configuration

providers:
  ns1:
    class: octodns_ns1.Ns1Provider
    api_key: env/NS1_API_KEY
    # Only required if using dynamic records
    monitor_regions:
      - lga
    # Optional. Default: false. true is Recommended, but not the default
    # for backwards compatibility reasons. If true, all NS1 monitors will
    # use a shared notify list rather than one per record & value
    # combination. See CHANGELOG,
    # https://github.com/octodns/octodns/blob/master/CHANGELOG.md, for more
    # information before enabling this behavior.
    shared_notifylist: false
    # Optional. Default: None. If set, back off in advance to avoid 429s
    # from rate-limiting. Generally this should be set to the number
    # of processes or workers hitting the API, e.g. the value of
    # `max_workers`.
    parallelism: 11
    # Optional. Default: 4. Number of times to retry if a 429 response
    # is received.
    retry_count: 4
    # Optional. Default: None. Additional options or overrides passed to
    # the NS1 SDK config, as key-value pairs.
    client_config:
        endpoint: my.nsone.endpoint # Default: api.nsone.net
        ignore-ssl-errors: true     # Default: false
        follow_pagination: false    # Default: true
    # Optional. Default: false. Use modern HTTP monitor (true) or the legacy
    # HTTP-emulating TCP monitor (false) for HTTP(s) healthchecks.
    use_http_monitors: false
    # Optional. Default: HTTP/1.0. Default HTTP protocol to use when
    # health-checking dynamic record endpoints. See "Health Check Options"
    # README section below to override per dynamic record.
    # This is only supported when use_http_monitors is set to false. If it
    # is set to true, HTTP/1.1 will be used and it cannot be changed.
    default_healthcheck_http_version: HTTP/1.0

Support Information

Records

All octoDNS record types are supported.

Root NS Records

Ns1Provider supports full root NS record management.

Dynamic

Ns1Provider supports dynamic records.

Subnet targeting

Ns1Provider supports subnet targeting in dynamic records.

Health Check Options

See https://github.com/octodns/octodns/blob/master/docs/dynamic_records.md#health-checks for information on health checking for dynamic records. Ns1Provider supports the following options:

Key Description Default
policy One of:
  1. all - down if every region is down
  2. quorum - down if majority regions are down
  3. one - down if any region is down
quorum
frequency Frequency (in seconds) of health-check 60
connect_timeout Timeout (in seconds) before we give up trying to connect 2
response_timeout Timeout (in seconds) after connecting to wait for output 10
rapid_recheck Enable or disable a second, automatic verification test before changing the status of a host. Enabling this option can help prevent false positives. False
http_version Specify HTTP version to use when HTTP health-checking a host. Only applicable if use_http_monitors=False. One of
  1. HTTP/1.0
  2. HTTP/1.1
    HTTP/1.0
    ---
      octodns:
        ns1:
          healthcheck:
            policy: quorum
            frequency: 60
            connect_timeout: 2
            response_timeout: 10
            rapid_recheck: True
            http_version: HTTP/1.1
    

    Development

    See the /script/ directory for some tools to help with the development process. They generally follow the Script to rule them all pattern. Most useful is ./script/bootstrap which will create a venv and install both the runtime and development related requirements. It will also hook up a pre-commit hook that covers most of what's run by CI.

    Release files for octodns-ns1 1.0.2

    For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

    Source distribution (sdist)

    Source distribution for octodns-ns1 1.0.2
    File Size Uploaded
    octodns_ns1-1.0.2.tar.gz 38.3 kB Details

    Built distribution (wheel)

    Table of built distributions (wheels) for octodns-ns1 1.0.2
    File Interpreter ABI Platform
    octodns_ns1-1.0.2-py3-none-any.whl Python 3 none any Details

    Total release size: 57.8 kB

    Release files / octodns_ns1-1.0.2.tar.gz

    Download URL octodns_ns1-1.0.2.tar.gz
    Size 38.3 kB
    Tags Source
    SHA-256 checksum
    How to use checksums
    25390c2286446062e9934fb04d09e0e51d6a7c192285dc71ffc7642234373227
    BLAKE2b-256 checksum
    How to use checksums
    4a8c4b843db7512d42532007f1cc72742a4bfeae429a2e4ab55f4300fdbff49e
    Upload date
    Uploaded using Trusted Publishing?
    What is trusted publishing?
    No
    Uploaded via twine/6.2.0 CPython/3.13.12

    Release files / octodns_ns1-1.0.2-py3-none-any.whl

    Download URL octodns_ns1-1.0.2-py3-none-any.whl
    Size 19.5 kB
    Tags Python 3
    SHA-256 checksum
    How to use checksums
    6e254796b74e96ce48dc0badaca3e7af3f867eda16984068dce9d81345ac5919
    BLAKE2b-256 checksum
    How to use checksums
    132e8a0988ca2bd6614b6c91adbe9ba2274915d50395cf55bc7160ee7a37914b
    Upload date
    Uploaded using Trusted Publishing?
    What is trusted publishing?
    No
    Uploaded via twine/6.2.0 CPython/3.13.12

    Release history Release notifications | RSS feed

    This release

    1.0.2 This release

    2 release files

    1.0.1

    2 release files

    1.0.0

    2 release files

    0.0.7

    2 release files

    0.0.6

    2 release files

    0.0.5

    2 release files

    0.0.4

    2 release files

    0.0.3

    2 release files

    0.0.2

    2 release files

    0.0.1

    2 release files

    Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page