Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect status of load balancing server with configured backup load balancing server #133

Open
Tunu-de opened this issue Nov 18, 2024 · 0 comments

Comments

@Tunu-de
Copy link

Tunu-de commented Nov 18, 2024

Description

Hello,

I have the following problem. I have configured a primary load balancer (LB) on my NetScaler at LB level, which switches to a backup LB if the primary LB fails. However, the switchover does not happen automatically, this is intentional and I would like to monitor this. I do not want to create a separate test for this, but would rather have it included in the standard test:

./check_netscaler.pl -H ${IPADDR} -s -C state -o lbvserver -n vs_lb_http_webserver

I have checked the API endpoint, but unfortunately, the /stats endpoint does not have an entry to indicate if a backup server is configured or not. This information is only available in the /config endpoint, similar to service groups. To see if a backup server is configured, you need to check the /config/lbvserver/lb_http_webserver endpoint for the backupvserverstatus entry with the value (Backup Active). If the backup LB is not in use, this entry will not exist. To verify if a backup LB is configured, the backupvserver entry can be checked at the same endpoint.

API Outpuut

Entpoint: https://${IPADDR}/nitro/v1/config/lbvserver/vs_lb_http_webserver

With Backup Configure and Backup active

{
    "errorcode": 0,
    "message": "Done",
    "severity": "NONE",
    "lbvserver": [
        {
            "name": "vs_lb_http_webserver",
            "insertvserveripport": "OFF",
            "ipv46": "0.0.0.0",
            "ippattern": "0.0.0.0",
            "ipmask": "*",
            "listenpolicy": "NONE",
            "ipmapping": "0.0.0.0",
            "port": 0,
            "range": "1",
            "servicetype": "HTTP",
            "type": "ADDRESS",
            "curstate": "UP",
            "effectivestate": "UP",
            "status": 6,
            "lbrrreason": 3,
            "cachetype": "SERVER",
            "authentication": "OFF",
            "authn401": "OFF",
            "dynamicweight": "0",
            "backupvserver": "vs_lb_http_webserver_backup",
            "priority": "0",
            "clttimeout": "180",
            "somethod": "NONE",
            "sopersistence": "DISABLED",
            "sopersistencetimeout": "2",
            "healththreshold": "0",
            "lbmethod": "LEASTCONNECTION",
            "backuplbmethod": "ROUNDROBIN",
            "dataoffset": "0",
            "health": "100",
            "datalength": "0",
            "ruletype": "0",
            "m": "IP",
            "persistencetype": "NONE",
            "timeout": 2,
            "persistmask": "255.255.255.255",
            "v6persistmasklen": "128",
            "persistencebackup": "NONE",
            "backuppersistencetimeout": 2,
            "cacheable": "NO",
            "rtspnat": "OFF",
            "sessionless": "DISABLED",
            "trofspersistence": "ENABLED",
            "map": "OFF",
            "connfailover": "DISABLED",
            "redirectportrewrite": "DISABLED",
            "downstateflush": "ENABLED",
            "disableprimaryondown": "ENABLED",
            "gt2gb": "DISABLED",
            "consolidatedlconn": "GLOBAL",
            "consolidatedlconngbl": "YES",
            "thresholdvalue": 0,
            "invoke": false,
            "version": 0,
            "totalservices": "1",
            "activeservices": "1",
            "statechangetimesec": "Sun Nov 17 19:30:42 2024",
            "statechangetimeseconds": "1731871842",
            "statechangetimemsec": "530",
            "tickssincelaststatechange": "5112776",
            "hits": "0",
            "pipolicyhits": "0",
            "push": "DISABLED",
            "pushlabel": "none",
            "pushmulticlients": "NO",
            "policysubtype": "0",
            "l2conn": "OFF",
            "appflowlog": "ENABLED",
            "isgslb": false,
            "icmpvsrresponse": "PASSIVE",
            "rhistate": "PASSIVE",
            "newservicerequestunit": "PER_SECOND",
            "vsvrbindsvcip": "0.0.0.0",
            "vsvrbindsvcport": 0,
            "skippersistency": "None",
            "td": "0",
            "minautoscalemembers": "0",
            "maxautoscalemembers": "0",
            "macmoderetainvlan": "DISABLED",
            "dns64": "DISABLED",
            "bypassaaaa": "NO",
            "processlocal": "DISABLED",
            "vsvrdynconnsothreshold": "0",
            "backupvserverstatus": "(Backup Active)",
            "retainconnectionsoncluster": "NO",
            "nodefaultbindings": "NO",
            "toggleorder": "ASCENDING",
            "orderthreshold": "0",
            "currentactiveorder": "None"
        }
    ]
}

With Backup Configured and Backup not Aktive

{
    "errorcode": 0,
    "message": "Done",
    "severity": "NONE",
    "lbvserver": [
        {
            "name": "vs_lb_http_webserver",
            "insertvserveripport": "OFF",
            "ipv46": "0.0.0.0",
            "ippattern": "0.0.0.0",
            "ipmask": "*",
            "listenpolicy": "NONE",
            "ipmapping": "0.0.0.0",
            "port": 0,
            "range": "1",
            "servicetype": "HTTP",
            "type": "ADDRESS",
            "curstate": "UP",
            "effectivestate": "UP",
            "status": 2,
            "lbrrreason": 8,
            "cachetype": "SERVER",
            "authentication": "OFF",
            "authn401": "OFF",
            "dynamicweight": "0",
            "backupvserver": "vs_lb_http_webserver_backup",
            "priority": "0",
            "clttimeout": "180",
            "somethod": "NONE",
            "sopersistence": "DISABLED",
            "sopersistencetimeout": "2",
            "healththreshold": "0",
            "lbmethod": "LEASTCONNECTION",
            "backuplbmethod": "ROUNDROBIN",
            "dataoffset": "0",
            "health": "100",
            "datalength": "0",
            "ruletype": "0",
            "m": "IP",
            "persistencetype": "NONE",
            "timeout": 2,
            "persistmask": "255.255.255.255",
            "v6persistmasklen": "128",
            "persistencebackup": "NONE",
            "backuppersistencetimeout": 2,
            "cacheable": "NO",
            "rtspnat": "OFF",
            "sessionless": "DISABLED",
            "trofspersistence": "ENABLED",
            "map": "OFF",
            "connfailover": "DISABLED",
            "redirectportrewrite": "DISABLED",
            "downstateflush": "ENABLED",
            "disableprimaryondown": "ENABLED",
            "gt2gb": "DISABLED",
            "consolidatedlconn": "GLOBAL",
            "consolidatedlconngbl": "YES",
            "thresholdvalue": 0,
            "invoke": false,
            "version": 0,
            "totalservices": "1",
            "activeservices": "1",
            "statechangetimesec": "Mon Nov 18 09:06:49 2024",
            "statechangetimeseconds": "1731920809",
            "statechangetimemsec": "780",
            "tickssincelaststatechange": "5466",
            "hits": "0",
            "pipolicyhits": "0",
            "push": "DISABLED",
            "pushlabel": "none",
            "pushmulticlients": "NO",
            "policysubtype": "0",
            "l2conn": "OFF",
            "appflowlog": "ENABLED",
            "isgslb": false,
            "icmpvsrresponse": "PASSIVE",
            "rhistate": "PASSIVE",
            "newservicerequestunit": "PER_SECOND",
            "vsvrbindsvcip": "0.0.0.0",
            "vsvrbindsvcport": 0,
            "skippersistency": "None",
            "td": "0",
            "minautoscalemembers": "0",
            "maxautoscalemembers": "0",
            "macmoderetainvlan": "DISABLED",
            "dns64": "DISABLED",
            "bypassaaaa": "NO",
            "processlocal": "DISABLED",
            "vsvrdynconnsothreshold": "0",
            "retainconnectionsoncluster": "NO",
            "nodefaultbindings": "NO",
            "toggleorder": "ASCENDING",
            "orderthreshold": "0",
            "currentactiveorder": "None"
        }
    ]
}

Important entries

  • "backupvserverstatus": "(Backup Active)"
  • "backupvserver": "vs_lb_http_webserver_backup"

Expected Outcome

Integrate the monitoring of backup LB status into the standard check to avoid additional separate checks.

Thank you for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant