Automated Service Monitoring with F5, Consul and Python F5 SDK

from f5.bigip import ManagementRoot

# Connect to BIG-F5
mgmt = ManagementRoot("test.server.com", "testuser", "testpassword")

# Get a list of all pools on the BigIP and print their names
pools = mgmt.tm.ltm.pools.get_collection()
for pool in pools:
    print("+++ \t", pool.name)
    for member in pool.members_s.get_collection():
        print("\t--- \t",  member.name)

# Create a HTTP Monitor for an F5 Pool
if mgmt.tm.ltm.monitor.https.http.exists(partition='Common', name='F5Automation_HTTP_Monitor'):
    print ("HTTP Monitor Already Exists...")
else:
    mgmt.tm.ltm.monitor.https.http.create(name="F5Automation_HTTP_Monitor", partition="Common")

# Load an existing pool and update its description
pool_a = mgmt.tm.ltm.pools.pool.load(name='F5Automation', partition='Common')
pool_a.description = "F5Automation"
pool_a.monitor = "F5Automation_HTTP_Monitor"
pool_a.update()

Comments

  1. شرکت تلکا هاست پیشرو در میزبانی انواع وب سایت و هم چنین دارای انواع خرید هاست دانلود ارزان قیمت با کنترل پنل سی پنل میباشد.حتما از سایت ما دیدن کنید و از قیمت های مناسب برای انواع سرویس های وب و ثبت انواع دامنه شگفت زده شوید.

    ReplyDelete
  2. After going through your contents I realize that this is the best of my knowledge as it provides the best information and suggestions. This is very helpful and share worthy. If you are looking for the best Automated Forex Trading Platform then visit TVG International. Keep sharing more.

    ReplyDelete

  3. Nice Information , Thanks For The Great Content
    Get started Hp printer software install and setup .you can install 123 HP OJ4650 Setup from

    123.hp.com/Setup|123.hp.com/oj8049|123.hp.com/oj3830|123.hp.com/oj4650 |123.hp.com/ojpro6968| 123.hp.com/Setup ojpro

    ReplyDelete

Post a Comment

Popular posts from this blog

ActiveMQ, easy to use open source message oriented middleware (MOM)

Basic Send Message to MQ with Java and IBM MQ JMS

Apache Apollo