Skip to content

clarencesubia/citrix_adc_collections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Load Balancer Vserver Stats Checker

This is a tool for retrieving stats for a load balancer vserver. It also gets all the vserver bound to it as well as their stats.

Version support

python3.5+

Usage/Examples

Python version support and modules:

#!/usr/bin/env python3

import requests
import json
import sys
import argparse
import getpass
from auth import auth 

Getting help

./lbstats.py --help

usage: lbstats.py [-h] -t  -u  [-v]

A tool that will generate all lb vservers and check its backend servers' status.

optional arguments:
  -h, --help        show this help message and exit
  -t , --target     Target LB Vserver (Hostname or IP address)
  -u , --username   Username for logging in.
  -v , --vserver    Check specific LB Vserver

Note: when -v/--vserver is ommited, the script will get all lb vservers.
./sgstats.py --help

usage: sgstats.py [-h] -t  -u  [-sg]

A tool that will generate all service groups and check its backend servers' status.

options:
  -h, --help            show this help message and exit
  -t , --target         Target Citrix ADC(hostname or IP address)
  -u , --username       Username for logging in.
  -sg , --servicegroup
                        Check specific Service Group

Use case 1 - Retrieve all lb vserver stats

./lbstats.py --username nsroot --target 192.168.203.101

Use case 2 - Retrieve a specific lb vserver

./lbstats.py --username nsroot --target 192.168.203.101 --vserver lb_vs_server1

Use case 3 - Retrieve all service group stats

./sgstats.py --username nsroot --target 192.168.203.101

Use case 2 - Retrieve a specific service group

./sgstats.py --username nsroot --target 192.168.203.101 --vserver servicegroup1

API Reference

Login

  POST https://<target lb>/nitro/v1/login
Parameter Type Description
Username string Username
Password string Password/OTP

Get item

  GET https://<target lb>/nitro/v1/config/resource
Parameter Type Description
target lb string Citrix ADC to be communicated
resource string resource to be retrieved

Authors

About

Rapid lb vserver and servicegroup checker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages