Skip to main content

netbox-netscaler

Read-only NetBox plugin that shows which Citrix NetScaler (ADC) VIPs depend on a server, so that decommissions stop missing the load balancer.

  • NetScaler tab on every VM and Device with an IP: each lb VIP where the server is a service-group member, across all configured HA pairs, with the member state, the GSLB names in front of the VIP, and flags:

    • Last live member: no other server behind the VIP is UP, so the VIP goes down with this one.
    • Name mismatch: the NetScaler server object's name matches neither the NetBox object nor the IP's DNS name. This usually means the NetScaler config is wrong or stale.
    • Ambiguous IP: more than one NetBox IP record has the member's address.
  • Stale VIPs page (Plugins menu): every VIP with no live server behind it. That covers VIPs whose members are all DOWN, all on decommissioning or offline objects, or not in NetBox, as well as VIPs with no members at all.

  • NetScaler tab on IP address pages: for a VIP, its vservers, members (linked to their NetBox objects) and GSLB names; for a member IP, the VIPs it belongs to.

  • Sync VIPs page (Plugins menu): compares live VIPs with NetBox IPAM and lets an engineer preview, tick and apply changes. Run it whenever you like; there is no schedule.

    • Create: VIPs that are UP but have no NetBox IP record. They're created as /32, role VIP, attached to the pair's current Primary NetScaler VM.
    • Update: VIP records whose status, description or attachment no longer matches NetScaler. Each row shows old → new values. DNS names are only filled in when blank, never replaced.
    • Orphaned: VIP records whose address isn't on any NetScaler. The only action is setting them to deprecated; nothing is ever deleted. Orphans are hidden while any pair is unreachable.
    • Non-VIP records at a VIP address are listed as conflicts and never changed. Every change is recorded in the changelog under the user who applied it, plus a journal entry.

This replaces the netscaler_vip_sync.py custom script.

The plugin never changes NetScaler. It only sends NITRO GET requests. The only writes are to NetBox IPAM, and only when someone applies a sync.

How it works

  1. For each configured HA pair, the plugin asks the first node that answers which node is Primary (config/hanode), and reads only from the Primary. UP/DOWN health state is only authoritative on the Primary, and the Primary changes with every failover.
  2. It pulls lb vservers, service-group members and GSLB bindings using bulk NITRO calls (about 8 requests per pair).
  3. It caches each pair's inventory in NetBox's cache (default 15 minutes; a Refresh button clears it).
  4. It matches each member IP to NetBox IP addresses, then to the VM or Device they're assigned to, when it renders a page.

Page loads never wait on NetScaler. The tab's visibility check and badge read the cache only.

Permissions

  • The tabs and the Stale VIPs page need view permission on the object or on IP addresses.
  • Sync VIPs: previewing needs ipam.view_ipaddress; applying needs ipam.add_ipaddress to create and ipam.change_ipaddress to update or deprecate.

Requirements

  • NetBox 4.7.5 or newer
  • A read-only NetScaler account with NITRO API access on every node

Installation

pip install netbox-netscaler

Add the plugin to configuration/plugins.py:

import os

PLUGINS = ["netbox_netscaler"]

PLUGINS_CONFIG = {
    "netbox_netscaler": {
        "username": os.environ.get("NETSCALER_API_USERNAME", ""),
        "password": os.environ.get("NETSCALER_API_PASSWORD", ""),
        "pairs": [
            {"name": "Site A", "nodes": ["ns-a1.example.com", "ns-a2.example.com"]},
            {"name": "Site B", "nodes": ["ns-b1.example.com", "ns-b2.example.com"]},
            # A standalone appliance is a one-node pair:
            # {"name": "Lab", "nodes": ["ns-lab.example.com"]},
            # Per-pair credentials override the defaults:
            # {"name": "DMZ", "nodes": [...], "username": "...", "password": "..."},
        ],
    },
}

Restart NetBox. No migrations are needed; the plugin has no database models.

Settings

Setting Default Description
pairs [] HA pairs: {"name", "nodes", "username"?, "password"?}
username / password "" Default NITRO credentials
cache_timeout 900 Seconds to cache each pair's inventory. An unreachable pair is cached for at most 60 s.
timeout 15 NITRO request timeout in seconds
verify_ssl False Verify NetScaler TLS certificates
vip_tenant "" Tenant slug set on VIP records created by Sync VIPs (blank = no tenant)
tab_weight 9005 Position of the NetScaler tab on object pages
top_level_menu False True gives the plugin its own sidebar menu instead of an entry under Plugins

Reuse

Other code can ask what NetScaler config depends on an object:

from netbox_netscaler.api import memberships_for

for m in memberships_for(vm):
    print(m.vserver.pair, m.vserver.name, m.member.ip, m.last_live, [d for g in m.gslb for d in g.domains])

Support

If you find this plugin helpful, consider supporting development:

Buy Me A Coffee

License

Apache-2.0

Metadata

Release files for netbox-netscaler 0.1.1

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

Source distribution (sdist)

Source distribution for netbox-netscaler 0.1.1
File Size Uploaded Provenance Actions
netbox_netscaler-0.1.1.tar.gz 34.0 kB With provenance Details for netbox_netscaler-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netbox-netscaler 0.1.1
File Interpreter ABI Platform Actions
netbox_netscaler-0.1.1-py3-none-any.whl Python 3 none any Details for netbox_netscaler-0.1.1-py3-none-any.whl

Total release size: 66.8 kB

Release files / netbox_netscaler-0.1.1.tar.gz

Download URL netbox_netscaler-0.1.1.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bff902d32467c8220d759f492923ab42985dae0ee9c0fae50a994f73cc61be63
BLAKE2b-256 checksum
How to use checksums
f9e36157e812bf4e3a48b075d74faddb43162e2eacfd92e95d4f692473e11846
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / netbox_netscaler-0.1.1-py3-none-any.whl

Download URL netbox_netscaler-0.1.1-py3-none-any.whl
Size 32.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7627641f3d6c69301e48dc14950c98e78dbc0efd6371900fa75ab9dc6b416eb2
BLAKE2b-256 checksum
How to use checksums
77d98cb658bbadd1667aeb616d307abf3177d8cae4b3a98b4b8eac75e234420b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for netbox-netscaler 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for netbox_netscaler-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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