get information of services in the lbvserver pool
Closed this issue · 2 comments
Hi,
At the moment its not possible to get information about the services.
Information I'm missing is:
- Service name
- IP address / Port
- Status ( active / disabled )
- Weight
Hi Richard,
Ok, it's better to show it by example.
I changed --getservicesstatus command from nsnitrocmd.py from
if args.getservicesstatus:
services = NSService().get_all(nitro)
print "-- Configured services (with status) ---"
for service in sorted(services, key=lambda k:
k.get_name()):
print "\t" + service.get_name() + ": "
- service.get_svrstate()
sys.exit(0)
to
if args.getservicesstatus:
services = NSService().get_all(nitro)
print "-- Configured services (with status) ---"
for service in sorted(services, key=lambda k:
k.get_name()):
print "Service name: " + service.get_name()
print "\tType: " +
service.get_servicetype()
print "\tIP: " + service.get_ipaddress()
print "\tPort: " + str(service.get_port())
print "\tStatus: " + service.get_svrstate()
print "\tWeight:" +
str(service.get_weight())
sys.exit(0)
Working fine -
...
Service name: test_service
Type: TCP
IP: 10.1.1.103
Port: 22
Status: OUT OF SERVICE
Weight:
Service name: test_service2
Type: TCP
IP: 10.1.1.104
Port: 22
Status: UP
Weight:
Service name: test_service3
Type: TCP
IP: 10.1.1.103
Port: 23
Status: DOWN
Weight:
Except weight - for some reason it's empty, maybe it's a bug, need to
check it...
WBR,
Denys.
On 01/22/2013 03:14 PM, Richard Pijnenburg wrote:
Hi,
At the moment its not possible to get information about the services.
Information I'm missing is:
- Service name
- IP address / Port
- Status ( active / disabled )
- Weight
—
Reply to this email directly or view it on GitHub
https://github.com/favoretti/nsnitro/issues/20.
This is possible with nsnitrocmd by issuing the --getservice argument.