Manage and report on Load Balancers using NSX Edge CLI commands

 
To see a list of the load balancer commands on the NSX edge device, type show service loadbalancer ? As you can see, there are six different types of data we can pull from the load balancer.
 

vShield-edge-6-1> show service loadbalancer ?
  
  error    Show loadbalancer Latest Errors information.
  monitor  Show loadbalancer HealthMonitor information.
  pool     Show loadbalancer pool information.
  session  Show loadbalancer Session information.
  table    Show loadbalancer Sticky-Table information.
  virtual  Show loadbalancer virtualserver information.

 

First, let’s start with checking to see if the load balancer service is running using the following command:
 

vShield-edge-6-1> show service loadbalancer
-----------------------------------------------------------------------
Loadbalancer Services Status:

L7 Loadbalancer     : running
Health Monitor      : stopped
-----------------------------------------------------------------------
L7 Loadbalancer Status Information:
STATUS     PID        MAX_MEM_MB MAX_SOCK   MAX_CONN   MAX_PIPE   CUR_CONN   CONN_RATE  CONN_RATE_LIMIT MAX_CONN_RATE
running    1255       0          2079       1024       0          0          0          0               0
-----------------------------------------------------------------------
L4 Loadbalancer Statistics:
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn

 
Next, I have pasted the output of a couple different commands and the output you recieve. The first displays any errors that the loadbalancer has, in my case, I show 0 errors. The second command displays the pool statistics. You can see that I have a transparent load balancer, with two different members: Web-sv-01a and Web-sv-02a.
 

vShield-edge-6-1> show service loadbalancer error
-----------------------------------------------------------------------
L7 Loadbalancer Request/Response Errors:

Total events captured on [01/May/2015:00:38:20.248] : 0

 

vShield-edge-6-1> show service loadbalancer pool
Log4perl: Seems like no initialization happened. Forgot to call init()?
2015-05-01 00:38:52 :: WARN :: C_UTILS :: File /var/db/networkmonitor/monitor_status.dat not exist
-----------------------------------------------------------------------
Loadbalancer Pool Statistics:

POOL Server-Pool
|  LB METHOD round-robin
|  LB PROTOCOL L7
|  Transparent enabled
|  SESSION (cur, max, limit, total) = (0, 0, 103, 0)
|  BYTES in = (0), out = (0)
   +->POOL MEMBER: Server-Pool/Web-sv-01a, STATUS: UP
   |  |  STATUS = UP, MONITOR STATUS = UNKNOWN
   |  |  SESSION (cur, max, limit, total) = (0, 0, , 0)
   |  |  BYTES in = (0), out = (0)
   +->POOL MEMBER: Server-Pool/Web-sv-02a, STATUS: UP
   |  |  STATUS = UP, MONITOR STATUS = UNKNOWN
   |  |  SESSION (cur, max, limit, total) = (0, 0, , 0)
   |  |  BYTES in = (0), out = (0)

Lastly, just like the previous section, you can pull the configuration of the load balancer with the following command.

vShield-edge-6-1> show configuration loadbalancer
-----------------------------------------------------------------------
vShield Edge Loadbalancer Config:
{
   "monitorService" : {
      "logging" : {
         "enable" : false,
         "logLevel" : "info"
      },
      "enable" : true,
      "healthMonitors" : [
         {
            "extension" : null,
            "send" : null,
            "expected" : null,
            "maxRetries" : 3,
            "name" : "default_tcp_monitor",
            "interval" : 5,
            "receive" : null,
            "timeout" : 15,
...
...cont..

 

Leave A Comment

Your email address will not be published. Required fields are marked (required):

Back to Top