Thanks Emilio.

Still, I'd like not to be tied to a CLI/bash interface...many external controllers may not have directly CLI access (monitoring/alerting frameworks, VM provisioning, IPS/IDS systems, etc).

I suppose one alternative is to write a quick Sinatra app which calls the bash commands you reference below...this Sinatra app would live on the ZenLB host...but again, I'd rather not have to write this interface myself...pretty please?! :)

Bryan

On 08/31/2012 01:44 AM, Emilio Campos wrote:
Hi Bryan, how is your shell/bash level?

Yoursel can do it in no more than 20 minutes

I attach you an example now you can modify or add new properties

Include the attached file zlbcmd in /usr/local/zenloadbalancer and apply execution permissions

chmod +x /usr/local/zenloadbalancer/zlbmd
Take a look in the first lines you have to changes the variables values with your

server,port,user and password for the webgui.

*root#zlbcmd --help *
zlb farmane action
                 action = [add|del]
                         if action eq add then
zlb farmname action rip_server port_server timeout_server priority_server
                         if action eq delete then
                                 zlb farmname action id_server

*all fields are mandatory so change timeout_server and priority_server by x if can't introduce a value


i e:
*root#./zlbcmd tst add 192.168.2.2 80 x x
*with this I add a backend 192.168.2.2 with port 80 in my farm named tst

*root#./zlbcmd tst del 0*
with this I delete the backend with id 0 in my farm named tst

I checked with HTTPS farm profile and it works like a charm!

Enjoy it!

Regards

2012/8/30 Bryan Stenson <[email protected] <mailto:[email protected]>>

    Bump.

    From my perspective, lack of a RESTful API prevents ZenLB from
    being a legitimate contender in the VM/automation world we live in.

    I'd LOVE to write a chef cookbook which will add/remove a host
    from a specific ZenLB pool when I deploy to my newly provisioned
    VM...  :)

    Any chance this gets on the v4 roadmap?


    On 08/02/2012 05:23 AM, Emilio Campos wrote:
    Hi Humberto

    There isn't yet API implemented in Zen, we developed functions
    that the zen lb web gui uses. If you want to develope some
    functionality  can use the functions that web gui uses in
    /usr/local/zenloadbalancer/www/*functions.cgi

    There isn't documentation about this functions. I recognize if
    you don't have too much knowledge about perl it could be a hardw
    work

    Regards

    2012/8/2 Humberto N. Castejon Martinez <[email protected]
    <mailto:[email protected]>>

        Hi!

        I would like to have an API, preferably REST API, to manage
        the Zen LB from program code. For what I have seen, such API
        does not exist at the moment, right? But Zen has a Web
        interface, so I was wondering how is this interface
        implemented. Is the web server embedded into the LB itself,
        or is the web server communicating via a given API with the
        LB? Thanks!

        Cheers,
        Humberto


        
------------------------------------------------------------------------------
        Live Security Virtual Conference
        Exclusive live event will cover all the ways today's security and
        threat landscape has changed and how IT managers can respond.
        Discussions
        will include endpoint security, mobile security and the
        latest in malware
        threats.
        http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
        _______________________________________________
        Zenloadbalancer-support mailing list
        [email protected]
        <mailto:[email protected]>
        https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support




-- Load balancer distribution - Open Source Project
    http://www.zenloadbalancer.com
    Distribution list (subscribe):
    [email protected]
    <mailto:[email protected]>



    
------------------------------------------------------------------------------
    Live Security Virtual Conference
    Exclusive live event will cover all the ways today's security and
    threat landscape has changed and how IT managers can respond. Discussions
    will include endpoint security, mobile security and the latest in malware
    threats.http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


    _______________________________________________
    Zenloadbalancer-support mailing list
    [email protected]  
<mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support


    
------------------------------------------------------------------------------
    Live Security Virtual Conference
    Exclusive live event will cover all the ways today's security and
    threat landscape has changed and how IT managers can respond.
    Discussions
    will include endpoint security, mobile security and the latest in
    malware
    threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
    _______________________________________________
    Zenloadbalancer-support mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support




--
Load balancer distribution - Open Source Project
http://www.zenloadbalancer.com
Distribution list (subscribe): [email protected] <mailto:[email protected]>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


_______________________________________________
Zenloadbalancer-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Zenloadbalancer-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support

Reply via email to