Forum Discussion

Steven_Carter_8's avatar
Steven_Carter_8
Icon for Nimbostratus rankNimbostratus
Feb 28, 2007

Getting up-to-date statistics

Greetings, I am trying to write an application that grabs all the server statistics. I am able to get that information correctly, however I am wondering if there is a quick method to update the statistics for the current servers I have.

 

 

Basically, I would like to a refresh option that updates the connection statistics every few seconds.
  • What do you mean by "updating statistics"? The connection statistics are automatically updated when traffic flows though the BIG-IP. I'm confused as to what you are asking. If you are asking how to reset the statistics, then that can be done with the appropriate (Pool, PoolMember, VirtualServer, etc) reset_statistics() methods.

     

     

    -Joe
  • I'm sorry I wasn't very clear. What I am trying to do is bring in statistics from Big-IP to a local application (like iControl). Within that application I load the values into a dataset, and then into a datagrid to display on the screen. What I am trying to do is have a refresh button so that when it is clicked, the screen will get the most up-to-date statistics like current connections, server status (active / inactive), and so forth. I know how to update the datagrid, but it doesn't seem like the statistics are updated.

     

     

    I ran a test where I logged into Big-IP through IE, and ran the application. I opened the statistics initially and connected to Big-IP through the application. I received back all the stats and one server was up and one was down. I tried to then update the status of the down server through IE. I did that, and saw the change in IE, but when I tried to refresh the application, the data was stale. I hope this helps describe the problem better.
  • If you change the values from within the admin interface, those will be passed back in the iControl calls. Are you sure that you are setting the correct status in IE that you are polling for within iControl. There is an enabled status as well as a session enabled state (disabled means no connection, sessions disabled means no new connections). There may be a disconnect there. Tell me exactly what you are setting via the GUI and what method calls you are using to query the states and that'll give me a bigger picture of what's going on.

     

     

    Since I don't know your application, I can only recommend that you debug the refresh call and look at the contents of the value returned from iControl and make sure there isn't a disconnect between the values returned from the API and your data storage/view.

     

     

    -Joe
  • Thanks for all the help so far Joe.

     

     

    I am working around having to update the status through my application now. But, I still need to update the connections retrieved from Big-IP.

     

     

    Basically, right now I do the following:

     

     

    -create poolmember object

     

    -create dataset

     

    -store values from poolmember object into the dataset

     

    -bind dataset to datagrid

     

    -display datagrid

     

     

    I think I have some step that is wrong in this logic, and I think it is the process where I store the values from the poolmember object into the dataset. Is there a way I can bind the poolmember object to the dataset so that when information from the poolmember object changes, the dataset changes accordingly, and then a simply datagrid.refresh() call updates the display?
  • I am way way rusty on datasets and datagrids. Anyone else out there have any insight?

     

     

    -Joe